3 Replies Latest reply: Jul 19, 2014 10:01 PM by user13334084 RSS

    JMSAdapter not reconnecting to foreign JMS queue

    819690

      We have a SOA Composite with an inbound JMS Adapter. This JMS Adapter listens to a remote Weblogic JMS Domain queue. We have configured a foreign JMS server in SOA domain which points to the remote queue and JMS Adapter is configured to read using local JNDI as defined in the Foreign JMS Server configuration.

      Everything works find when both servers are up. There is 1 consumer shown on the remote weblogic JMS Queue, If we put a message in remote queue, the JMS Adapter is able to consume the message and composite is triggered.

      But if for any reason remote weblogic domain is restarted, the JMS Adapter does not reconnect to the remote queue automatically. 0 consumers is shown in remote Weblogic JMS queue and messages are not picked up by the JMS Adapter.

      This is resolved by either redeploying the composite or stopping and starting composite from EM console (Probably forcing the adapter to connect again).

      But shouldn't the reconnect happen automatically? Is there any configuration which we might be missing and which will enable the JMS Adapter to reconnect to the queue automatically when the queue is available?

        • 1. Re: JMSAdapter not reconnecting to foreign JMS queue
          user13334084

          Hi,

           

          To enable  JMS Adapter to connect to the Remote Domain Queues on restart of the Servers, we can try doing  the below configurations:

           

          1. In setDomainEnv.sh, set

           

          -Dweblogic.transaction.blocking.commit=false                                  
               
          -Dweblogic.transaction.blocking.rollback=false

           

           

          2. Also set CompletionTimeoutSeconds should be set to 0.

           

          This field is in wls console ---> domain --- > JTA ----- > Advanced ----> CompletionTimeoutSeconds.

           

          Try the above settings, if it doesn't help, please try accessing Remote Domain Queues via Direct Access as specified in point-3.

           

           

          3.Instead of accessing via  Foreign Server, can you try accessing the Remote Domain Queues by  Direct access via specification of the FactoryProperties property.

          Please refer the Documentation link for the Direct access under Section 8.4.6

           

           

          Thanks and Regards,

          Rajesh.V

          • 2. Re: JMSAdapter not reconnecting to foreign JMS queue
            user453537

            Please let us know if the above mentioned steps work for you. This will help us close the loop on this open issue.

            • 3. Re: JMSAdapter not reconnecting to foreign JMS queue
              user13334084

              Solution:

              ========

              Instead of using Foreign Server,  if we configure for Direct Access using specification of the FactoryProperties property in the jndi entry, this re-connection happens seamlessly.

              We don't have to manipulate setDomainEnv.sh.

              ===========================================================================================================================================

              Step-wise Break Down to achieve this:

              ===========================

              1.I recreated the scenario using two Physical Boxes.

                In Host-1, have set and configured JMS Adapter and in Host-2, have the Remote Domain Queues created.

               

              2.Created a composite as below:

               

              demoQ(Host2)--->Inbound JMS Adapter(Host1) ---> BPEL ---> Outbound JMS Adapter(Host1) --->demoQ2(Host2).

              I send a TextMessage to Source Queue which is demoQ and the composite delivers it to Destination Queue,demoQ2.

               

              3.Configurations done:

              Direct access using specification of the FactoryProperties property in the jndi entry, with access parameters indicating the remote domain.

              So configured a JNDI entry say

              eis/wls/RemoteQueues with below fields:

               

                a.ConnectionFactoryLocation = weblogic.jms.XAConnectionFactory

                b.FactoryProperties =  java.naming.factory.initial=weblogic.jndi.WLInitialContextFactory;java.naming.provider.url=t3://adc00efn.us.oracle.com:20993;java.naming.security.principal=weblogic;java.naming.security.credentials=welcome1;

               

               

              So instead of Configuring the foreign server to access the remote domain,I used the above mentioned Direct Access Method to communicate to RemoteDomain Queues(adc00efn.us.oracle.com is the Remote Domain Host).

               

              4.Pumped in some 100 messages to Source Queue(demoQ).The processing of the messages happen.Able to see 1 Consumer for this Queue in wls console.

               

              5.Midway through the processing ,stopped the soa_server hosting the JMS Server.So Remote Domain Queues are also down.

               

              6.We get an exception as below in logs

               

              "Caused by: java.rmi.ConnectException: Destination 10.229.234.246, 20993 unreachable; nested exception is:

                java.net.ConnectException: Connection refused; No available router to destination"

               

              7.On restarting the JMS Remote Domain SOA Server, hosting the Queues, the JMS Adapter connects successfully to the Remote Domain Queues and starts processing again.

              Able to see 1 Consumer again created for the Source Queue(demoQ).

               

               

              8.In the logs, we get the below snippet which reinforces that JMS Adapter has indeed connected to the RemoteDomain Queues.

               

              "[2014-07-19T12:46:44.265+00:00] [soa_server1] [NOTIFICATION] [] [oracle.soa.adapter.jms.connection] [tid: DaemonWorkThread: '3' of WorkManager: 'default_Adapters'] [userId: <anonymous>] [ecid: 8af2a96a-6a8a-4099-a58a-75778934b442-00001e6b,0] [APP: soa-infra] [oracle.soa.tracking.FlowId: 73] [oracle.soa.tracking.InstanceId: 217] [oracle.soa.tracking.SCAEntityId: 10003] [oracle.soa.tracking.FaultId: 2] [FlowId: 0000KTEdt8G5IfBpJW0Fyf1JmaG_00001C]  [composite_name: Q2Q] [composite_version: 1.0] [endpoint_name: Inbound_JMS] JmsManagedConnectionFactory_createManagedConnection: Created new managed connection for JMS user null

              [2014-07-19T12:46:44.290+00:00] [soa_server1] [NOTIFICATION] [] [oracle.soa.adapter.jms.inbound] [tid: DaemonWorkThread: '3' of WorkManager: 'default_Adapters'] [userId: weblogic] [ecid: 8af2a96a-6a8a-4099-a58a-75778934b442-00001e6b,0] [APP: soa-infra] [oracle.soa.tracking.FlowId: 73] [oracle.soa.tracking.InstanceId: 217] [oracle.soa.tracking.SCAEntityId: 10003] [oracle.soa.tracking.FaultId: 2] [FlowId: 0000KTEdt8G5IfBpJW0Fyf1JmaG_00001C]  [composite_name: Q2Q] [composite_version: 1.0] [endpoint_name: Inbound_JMS] JMSMessageConsumer_init: Successfully created MessageConsumer for [destination = demoQ (payload = 1)]

              [2014-07-19T12:46:44.293+00:00] [soa_server1] [NOTIFICATION] [] [oracle.soa.adapter.jms.inbound] [tid: DaemonWorkThread: '3' of WorkManager: 'default_Adapters'] [userId: weblogic] [ecid: 8af2a96a-6a8a-4099-a58a-75778934b442-00001e6b,0] [APP: soa-infra] [oracle.soa.tracking.FlowId: 73] [oracle.soa.tracking.InstanceId: 217] [oracle.soa.tracking.SCAEntityId: 10003] [oracle.soa.tracking.FaultId: 2] [FlowId: 0000KTEdt8G5IfBpJW0Fyf1JmaG_00001C]  [composite_name: Q2Q] [composite_version: 1.0] [endpoint_name: Inbound_JMS] JMSMessageConsumer_start: connection for JMSMessageConsumer [destination = demoQ (payload = 1)] has been started.

              [2014-07-19T12:46:44.293+00:00] [soa_server1] [NOTIFICATION] [] [oracle.soa.adapter.jms.inbound] [tid: DaemonWorkThread: '3' of WorkManager: 'default_Adapters'] [userId: weblogic] [ecid: 8af2a96a-6a8a-4099-a58a-75778934b442-00001e6b,0] [APP: soa-infra] [oracle.soa.tracking.FlowId: 73] [oracle.soa.tracking.InstanceId: 217] [oracle.soa.tracking.SCAEntityId: 10003] [oracle.soa.tracking.FaultId: 2] [FlowId: 0000KTEdt8G5IfBpJW0Fyf1JmaG_00001C]  [composite_name: Q2Q] [composite_version: 1.0] [endpoint_name: Inbound_JMS] JmsConsumer_setupMessageListener: Creating XA Enabled Message Endpoint..."

               

               

              9.So please reconfigure with Direct access using specification of the FactoryProperties property instead of Configuring the Foreign server.

               

              10.We don't have to set any new fields in setDomainEnv.sh. Also don't need to set CompletionTimeoutSeconds to 0 in wls console.

               

              11.Just making use of Direct Access solves the Issue of Re connection

               

               

              Thanks and Regards,

              Rajesh.V.