Discussions
Categories
- 197.2K All Categories
- 2.5K Data
- 546 Big Data Appliance
- 1.9K Data Science
- 450.8K Databases
- 221.9K General Database Discussions
- 3.8K Java and JavaScript in the Database
- 31 Multilingual Engine
- 552 MySQL Community Space
- 479 NoSQL Database
- 7.9K Oracle Database Express Edition (XE)
- 3.1K ORDS, SODA & JSON in the Database
- 555 SQLcl
- 4K SQL Developer Data Modeler
- 187.2K SQL & PL/SQL
- 21.4K SQL Developer
- 296.3K Development
- 17 Developer Projects
- 139 Programming Languages
- 293K Development Tools
- 110 DevOps
- 3.1K QA/Testing
- 646.1K Java
- 28 Java Learning Subscription
- 37K Database Connectivity
- 158 Java Community Process
- 105 Java 25
- 22.1K Java APIs
- 138.2K Java Development Tools
- 165.3K Java EE (Java Enterprise Edition)
- 19 Java Essentials
- 162 Java 8 Questions
- 86K Java Programming
- 81 Java Puzzle Ball
- 65.1K New To Java
- 1.7K Training / Learning / Certification
- 13.8K Java HotSpot Virtual Machine
- 94.3K Java SE
- 13.8K Java Security
- 205 Java User Groups
- 24 JavaScript - Nashorn
- Programs
- 468 LiveLabs
- 39 Workshops
- 10.2K Software
- 6.7K Berkeley DB Family
- 3.5K JHeadstart
- 5.7K Other Languages
- 2.3K Chinese
- 175 Deutsche Oracle Community
- 1.1K Español
- 1.9K Japanese
- 233 Portuguese
EWPS and JMS

We are running Documaker Standard Edition in a Docker container. We are using EWPS (in the same container) to receive requests and send them to Docupresentment to generate documents.
Currently, we are using http queues, but Oracle is recommending the use of JMS or MQ for high volume environments. I have Docupresentment listening on JMS queues (ActiveMQ is also installed in the container ..I can prove this by using thread.sh), but I am having trouble getting EWPS to communicate over JMS.
ewps.config.xml:
<entry name="queuefactory.class">com.docucorp.messaging.jms.DSIJMSJNDIMessageQueueFactory</entry>
<entry name="jms.inputqueue.connectstring">resultq</entry>
<entry name="jms.outputqueue.connectstring">requestq</entry>
<entry name="jms.qcf.name">queueConnectionFactory</entry>
<entry name="jms.initial.context.factory">org.apache.activemq.jndi.ActiveMQInitialContextFactory</entry>
<entry name="jms.provider.URL">tcp://0.0.0.0:61616</entry>
<entry name="jms.security.principal">admin</entry>
<entry name="jms.security.credentials">admin</entry>
<entry name="jms.inputqueue.connectstring">resultq</entry>
<entry name="jms.outputqueue.connectstring">requestq</entry>
Given that, the EWP log indicates:
2021-02-02 04:33:07,983-[http-nio-8080-exec-1]-Queue Manager properties -
#Tue Feb 02 04:33:07 UTC 2021
jms.qcf.name=queueConnectionFactory
jms.initial.context.factory=org.apache.activemq.jndi.ActiveMQInitialContextFactory
queuefactory.class=com.docucorp.messaging.jms.DSIJMSJNDIMessageQueueFactory
jms.outputqueue.connectstring=requestq
jms.inputqueue.connectstring=resultq
2021-02-02 04:33:07,984-[http-nio-8080-exec-1]-EWPS Configuration read from web.xml location '/WEB-INF/xml/ewps.config.xml'
2021-02-02 04:33:07,986-[http-nio-8080-exec-1]-EWPSDocumentServicesSkeleton : filecache is disabled
2021-02-02 04:33:08,443-[http-nio-8080-exec-1]-javax.naming.NameNotFoundException: queueConnectionFactory
I am missing something, and I suspect that I need to create a jndi.properties file so that EWP can find queueConnectionFactory.
Any ideas?
Thanks in advance!
Dave
Answers
-
Hi Dave,
I haven't tested this specifically with EWPS, but I did do a similar setup with IDS using RabbitMQ over JMS. In order to do this, I used the following settings in docserv.xml, which should be translatable to your EWPS.config.xml:
<section name="queue"> <section name="marshallers"> <entry name="marshaller.class">com.docucorp.messaging.data.marshaller.SOAPMIMEDSIMessageMarshaller</entry> <entry name="marshaller.class">com.docucorp.messaging.data.marshaller.SerializationDSIMessageMarshaller</entry> </section> <entry name="queuefactory.class">com.docucorp.messaging.jms.DSIJMSJNDIMessageQueueFactory</entry> <entry name="jms.initial.context.factory">com.sun.jndi.fscontext.RefFSContextFactory</entry> <entry name="jms.provider.URL">file:///home/oracle/odee/docupresentment</entry> <entry name="jms.qcf.name">idsqcf</entry> <entry name="jms.inputqueue.connectstring">idsreq</entry> <entry name="jms.outputqueue.connectstring">idsres</entry> </section>
Then, I created a .bindings file in the IDS directory - the RefFSContextFactory is automatically configured to look for this file in this directory; you may be able to do similar configuration for EWPS. Note you should replace the RabbitMQ class names with what's appropriate for your system.
idsqcf/ClassName=javax.jms.ConnectionFactory idsqcf/FactoryName=com.rabbitmq.jms.admin.RMQObjectFactory idsqcf/RefAddr/0/Content=jms/ConnectionFactory idsqcf/RefAddr/0/Type=name idsqcf/RefAddr/0/Encoding=String idsqcf/RefAddr/1/Content=javax.jms.ConnectionFactory idsqcf/RefAddr/1/Type=type idsqcf/RefAddr/1/Encoding=String idsqcf/RefAddr/2/Content=com.rabbitmq.jms.admin.RMQObjectFactory idsqcf/RefAddr/2/Type=factory idsqcf/RefAddr/2/Encoding=String # replace with IP address of RabbitMQ host. idsqcf/RefAddr/3/Content=127.0.0.1 idsqcf/RefAddr/3/Type=host idsqcf/RefAddr/3/Encoding=String idsreq/ClassName=javax.jms.Queue idsreq/FactoryName=com.rabbitmq.jms.admin.RMQObjectFactory idsreq/RefAddr/0/Content=jms/Queue idsreq/RefAddr/0/Type=name idsreq/RefAddr/0/Encoding=String idsreq/RefAddr/1/Content=javax.jms.Queue idsreq/RefAddr/1/Type=type idsreq/RefAddr/1/Encoding=String idsreq/RefAddr/2/Content=com.rabbitmq.jms.admin.RMQObjectFactory idsreq/RefAddr/2/Type=factory idsreq/RefAddr/2/Encoding=String # replace [IDSREQ] with RMQ name for request queue. idsreq/RefAddr/3/Content=IDSREQ idsreq/RefAddr/3/Type=destinationName idsreq/RefAddr/3/Encoding=String idsres/ClassName=javax.jms.Queue idsres/FactoryName=com.rabbitmq.jms.admin.RMQObjectFactory idsres/RefAddr/0/Content=jms/Queue idsres/RefAddr/0/Type=name idsres/RefAddr/0/Encoding=String idsres/RefAddr/1/Content=javax.jms.Queue idsres/RefAddr/1/Type=type idsres/RefAddr/1/Encoding=String idsres/RefAddr/2/Content=com.rabbitmq.jms.admin.RMQObjectFactory idsres/RefAddr/2/Type=factory idsres/RefAddr/2/Encoding=String # replace [IDSRES] with RMQ name for result queue. idsres/RefAddr/3/Content=IDSRES idsres/RefAddr/3/Type=destinationName idsres/RefAddr/3/Encoding=String
I might be able to come back later and test with with EWPS, but I thought I'd get this here to help you out a bit.
-A
-
Ok, I was able to get this working.
Modify
ewps.config.xml
as shown below:<queuemanager> <entry name="queuefactory.class">com.docucorp.messaging.jms.DSIJMSJNDIMessageQueueFactory</entry> <entry name="ReceiveRequestIntervalMillis">30000</entry> <entry name="jms.initial.context.factory">weblogic.jndi.WLInitialContextFactory</entry> <entry name="jms.provider.URL">URL_TO_JMS_SERVER</entry> <entry name="jms.security.principal">JMS_USER</entry> <entry name="jms.security.credentials">JMS_PASS</entry> <entry name="jms.qcf.name">JNDI_QUEUE_CONNECTION_FACTORY_NAME</entry> <entry name="jms.inputqueue.connectstring">JNDI_RESULT_QUEUE_NAME</entry> <entry name="jms.outputqueue.connectstring">JNDI_REQUEST_QUEUE_NAME</entry> <entry name="jms.outputqueue.expiry">6000</entry> </queuemanager>
Comment out/remove any other settings from the block.
Replace the items in all caps with the necessary settings for your system. The items prefixed with JNDI_ will be resolved through a JNDI context lookup, which is done via the class named in the
jms.initial.context.factory
. In the above example, I'm using the WebLogic context factory to connect to a JMS server hosted in WebLogic. You will use the context factory appropriate for your JMS implementation. You may also use a context file, which is noted in my first comment above (create a .bindings file and set thejms.initial.context.factory
tocom.sun.jndi.fscontext.RefFSContextFactory
).Copy the content of the
<queuemanager>
block into the the<IDSProvider>
block, then save the file.Finally, make sure you place the appropriate JAR file that contains the
jms.initial.context.factory
class into the IDSlib
directory.