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"
at container build time, so the resources may be created in application scope.
This needs to be present BEFORE the app server starts, it cannot be added
during startup via prebootcmd.

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 Nov 27, 2018
1 parent e29c73f commit 93179d7
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 0 deletions.
5 changes: 5 additions & 0 deletions conf/docker/app/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@ FROM quay.io/poikilotherm/payara-full:fix-multiple

# Disable "phone home"
RUN rm ${PAYARA_DIR}/glassfish/modules/phonehome-bootstrap.jar
# Do not validate resources, or JMS resources defined in
# glassfish-resources.xml cannot be created
RUN asadmin start-domain && \
asadmin --user=${ADMIN_USER} --passwordfile=${PASSWORD_FILE} create-jvm-options -- "-Ddeployment.resource.validation=false" && \
asadmin stop-domain

ARG LIB_PATH="${PAYARA_DIR}/glassfish/domains/${DOMAIN_NAME}/lib/"

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 93179d7

Please sign in to comment.