Skip to content

Commit

Permalink
Add JMS resources to glassfish-resources.xml
Browse files Browse the repository at this point in the history
Adding a special JVM option "-Ddeployment.resource.validation=false" so the
resources may be created in application scope.

See also:
* payara/Payara#3449
* https://javaee.github.io/glassfish/doc/5.0/release-notes.pdf#G3.1590480

TODO: this needs to be documented and added to classic installer, too!
  • Loading branch information
poikilotherm committed Dec 10, 2018
1 parent e1b3f42 commit 1224031
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 0 deletions.
4 changes: 4 additions & 0 deletions conf/docker/app/init_2_configure.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@ create-system-properties "postgres.port=5432"
create-system-properties "postgres.database=dataverse
create-system-properties "postgres.user=dataverse"
create-password-alias "postgres-pass" --passwordfile ${PAYARA_DIR}/dbpass
# Do not validate resources, or JMS resources defined in
# glassfish-resources.xml cannot be created
create-system-properties "deployment.resource.validation=false"
EOF

echo "$(cat ${POSTBOOT_COMMANDS}.tmp | cat - ${POSTBOOT_COMMANDS} )" > ${POSTBOOT_COMMANDS}
Expand Down
21 changes: 21 additions & 0 deletions src/main/webapp/WEB-INF/glassfish-resources.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,25 @@
<property name="create" value="true" />
</jdbc-connection-pool>
<jdbc-resource jndi-name="java:app/DV/VDCNetDS" pool-name="dvnDbPool"/>

<!-- Java Messaging Service Configuration -->
<admin-object-resource
jndi-name="jms/DataverseIngest"
res-adapter="jmsra"
res-type="javax.jms.Queue">
<property name="Name" value="DataverseIngest"/>
</admin-object-resource>
<connector-connection-pool
connection-definition-name="javax.jms.QueueConnectionFactory"
max-pool-size="250"
max-wait-time-in-millis="60000"
name="jms/IngestQueueConnectionPool"
pool-resize-quantity="2"
resource-adapter-name="jmsra"
steady-pool-size="1"/>
<connector-resource
jndi-name="jms/IngestQueueConnectionFactory"
pool-name="jms/IngestQueueConnectionPool">
<property name="Name" value="IngestQueueConnectionFactory"/>
</connector-resource>
</resources>

0 comments on commit 1224031

Please sign in to comment.