Skip to content

Commit

Permalink
Cleanup installer, code and docs relying on the DB connection. IQSS#6819
Browse files Browse the repository at this point in the history
  • Loading branch information
poikilotherm committed Jul 13, 2020
1 parent e90d9e7 commit 0aaac25
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 28 deletions.
2 changes: 1 addition & 1 deletion doc/sphinx-guides/source/admin/timers.rst
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ The following JVM option instructs the application to act as the dedicated timer

``-Ddataverse.timerServer=true``

**IMPORTANT:** Note that this option is automatically set by the Dataverse installer script. That means that when **configuring a multi-server cluster**, it will be the responsibility of the installer to remove the option from the :fixedwidthplain:`domain.xml` of every node except the one intended to be the timer server. We also recommend that the following entry in the :fixedwidthplain:`domain.xml`: ``<ejb-timer-service timer-datasource="jdbc/VDCNetDS">`` is changed back to ``<ejb-timer-service>`` on all the non-timer server nodes. Similarly, this option is automatically set by the installer script. Changing it back to the default setting on a server that doesn't need to run the timer will prevent a potential race condition, where multiple servers try to get a lock on the timer database.
**IMPORTANT:** Note that this option is automatically set by the Dataverse installer script. That means that when **configuring a multi-server cluster**, it will be the responsibility of the installer to remove the option from the :fixedwidthplain:`domain.xml` of every node except the one intended to be the timer server. We also recommend that the following entry in the :fixedwidthplain:`domain.xml`: ``<ejb-timer-service timer-datasource="java:global/jdbc/dataverse">`` is changed back to ``<ejb-timer-service>`` on all the non-timer server nodes. Similarly, this option is automatically set by the installer script. Changing it back to the default setting on a server that doesn't need to run the timer will prevent a potential race condition, where multiple servers try to get a lock on the timer database.

**Note** that for the timer to work, the version of the PostgreSQL JDBC driver your instance is using must match the version of your PostgreSQL database. See the :ref:`timer-not-working` section of Troubleshooting in the Admin Guide.

Expand Down
18 changes: 2 additions & 16 deletions scripts/installer/as-setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -150,22 +150,8 @@ function final_setup(){
./asadmin $ASADMIN_OPTS delete-jvm-options -Xmx512m
./asadmin $ASADMIN_OPTS create-jvm-options "-Xmx${MEM_HEAP_SIZE}m"


./asadmin $ASADMIN_OPTS create-jdbc-connection-pool --restype javax.sql.DataSource \
--datasourceclassname org.postgresql.ds.PGPoolingDataSource \
--property create=true:User=$DB_USER:PortNumber=$DB_PORT:databaseName=$DB_NAME:ServerName=$DB_HOST \
dvnDbPool

./asadmin $ASADMIN_OPTS set resources.jdbc-connection-pool.dvnDbPool.property.password='${ALIAS=db_password_alias}'

###
# Create data sources
./asadmin $ASADMIN_OPTS create-jdbc-resource --connectionpoolid dvnDbPool jdbc/VDCNetDS

###
# Set up the data source for the timers

./asadmin $ASADMIN_OPTS set configs.config.server-config.ejb-container.ejb-timer-service.timer-datasource=jdbc/VDCNetDS
# Set up the data source for the timers (using the @DataSourceDefinition from util/DataSourceProducer.java)
./asadmin $ASADMIN_OPTS set configs.config.server-config.ejb-container.ejb-timer-service.timer-datasource=java:global/jdbc/dataverse

./asadmin $ASADMIN_OPTS create-jvm-options "\-Djavax.xml.parsers.SAXParserFactory=com.sun.org.apache.xerces.internal.jaxp.SAXParserFactoryImpl"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
@Singleton
@DataSourceDefinition(
name = "java:global/jdbc/dataverse",
// Using PGXADataSource instead of deprecated PGPoolingDataSource
className = "org.postgresql.xa.PGXADataSource",
user = "dataverse",
password = "${ALIAS=db_password_alias}",
Expand Down
11 changes: 0 additions & 11 deletions src/main/resources/META-INF/persistence.xml
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,4 @@
<!--<property name="eclipselink.logging.parameters" value="true"/>-->
</properties>
</persistence-unit>
<!-- the persistence unit below is no longer necessary; needs to be removed
from gnrs/TestNRS and from here: - L.A.
<persistence-unit name="VDCNet-test" transaction-type="RESOURCE_LOCAL">
<provider>oracle.toplink.essentials.ejb.cmp3.EntityManagerFactoryProvider</provider>
<properties>
<property name="toplink.jdbc.url" value="jdbc:postgresql://localhost:5432/VDCNet-dev"/>
<property name="toplink.jdbc.user" value="vdcApp"/>
<property name="toplink.jdbc.driver" value="org.postgresql.jdbc3.Jdbc3PoolingDataSource"/>
<property name="toplink.jdbc.password" value="secret"/>
</properties>
</persistence-unit -->
</persistence>

0 comments on commit 0aaac25

Please sign in to comment.