MDB not connecting to Messaging System - weblogic.developer.interest.jms(Archived)

Has anybody faced with the following error. We are using WL9.2 MP2 on AIX.
          
          Also we are using JNDI Filesystem Provider and we have included fscontext.jar and providerutil.jar in the classpath.
          
          --------------------ERROR-----------------------
          
          Error getting JMSServer member info
          
          - with nested exception:
          [Error getting JMSServer member info NestedException Message is :com.ibm.mq.jms.MQQueue incompatible with weblogic.jms.common.Destination]
          at weblogic.ejb.container.deployer.EJBModule.activate(EJBModule.java:422)
          at weblogic.application.internal.flow.ModuleListenerInvoker.activate(ModuleListenerInvoker.java:107)
          at weblogic.application.internal.flow.DeploymentCallbackFlow$2.next(DeploymentCallbackFlow.java:381)
          at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:26)
          at weblogic.application.internal.flow.DeploymentCallbackFlow.activate(DeploymentCallbackFlow.java:71)
          Truncated. see log file for complete stacktrace
          Error getting JMSServer member info NestedException Message is :com.ibm.mq.jms.MQQueue incompatible with weblogic.jms.common.Destination
          at weblogic.ejb.container.deployer.MessageDrivenBeanInfoImpl.createMDManagers(MessageDrivenBeanInfoImpl.java:1286)
          at weblogic.ejb.container.deployer.MessageDrivenBeanInfoImpl.activate(MessageDrivenBeanInfoImpl.java:1050)
          at weblogic.ejb.container.deployer.EJBDeployer.activate(EJBDeployer.java:1270)
          at weblogic.ejb.container.deployer.EJBModule.activate(EJBModule.java:405)
          at weblogic.application.internal.flow.ModuleListenerInvoker.activate(ModuleListenerInvoker.java:107)
          Truncated. see log file for complete stacktrace
          
          --------------- END ERROR -----------------------
          
          After looking at the weblogic forums we found that the issue has been resolved in WL 9.2 MP3, CR343580. In the weblogic downloads we did not find WL 9.2 MP3 for AIX. Can anybody guide us in getting MP3 for WL 9.2 on AIX. Is there any other solution to this problem. 

This is a common mistake. The MDB is attempting to pass an MQ destination to WebLogic rather than MQ - so of course it fails.
          
          When configuring an MDB to use foreign destinations, one must configure the MDB to use a foreign JMS connection factory in addition to the foreign JMS destination.
          
          This is discussed in detail in the MDB programmer's guide in the edocs, and here's a blog that discusses one approach:
          
          http://ibswings.blogspot.com/2008/02/integrating-mq-broker-6-with-bea.html
          
          Tom 

Hi Tom,
          First of all thanks for your reply. Just to give you more information this is working in Weblogic 8.1. In the weblogic console of 8.1, I don't see any Foreign JMS server configured. How ever under the provider URL path i have .bindings file. My question is that how is it working in 8.1. Is there any diffrence on how this works on 8.1 and 9.2 ?
          For your reference I am attaching the ejb-jar.xml and weblogic-ejb-jar.xml
          ------------------------
          ejb-jar.xml
          ------------------
          <ejb-jar>
          <description><![CDATA[This is the deployment descriptor for the auto-dialer Message driven bean]]></description>
          <display-name>MQ Series Message Pull Message Driven Bean</display-name>
          <enterprise-beans>
          <message-driven>
          <description><![CDATA[This bean pulls message from a queue and passes it on to a handler.]]></description>
          <ejb-name>MQSeriesMessagePullMDB</ejb-name>
          <ejb-class>com.capitalone.ccs.mqseries.ejb.MQSeriesMessagePullMDB</ejb-class>
          <transaction-type>Container</transaction-type>
          <acknowledge-mode>auto-acknowledge</acknowledge-mode>
          <message-driven-destination>
          <destination-type>javax.jms.Queue</destination-type>
          </message-driven-destination>
          
          <env-entry>
          <description><![CDATA[The user name to be used to invoke a Chordiant Service]]></description>
          <env-entry-name>username</env-entry-name>
          <env-entry-type>java.lang.String</env-entry-type>
          <env-entry-value>service</env-entry-value>
          </env-entry>
          <env-entry>
          <description><![CDATA[The password to be used to invoke a Chordiant Service]]></description>
          <env-entry-name>password</env-entry-name>
          <env-entry-type>java.lang.String</env-entry-type>
          <env-entry-value>NA</env-entry-value>
          </env-entry>
          <env-entry>
          <description><![CDATA[The no of retry attempts.]]></description>
          <env-entry-name>retry_count</env-entry-name>
          <env-entry-type>java.lang.String</env-entry-type>
          <env-entry-value>5</env-entry-value>
          </env-entry>
          </message-driven>
          </enterprise-beans>
          
          <assembly-descriptor>
          <container-transaction>
          <method>
          <ejb-name>MQSeriesMessagePullMDB</ejb-name>
          <method-name>onMessage</method-name>
          <method-params>
          <method-param>javax.jms.Message</method-param>
          </method-params>
          
          </method>
          <trans-attribute>NotSupported</trans-attribute>
          </container-transaction>
          </assembly-descriptor>
          
          </ejb-jar>
          ---------------------------
          weblogic-ejb-jar.xml
          ---------------------------
          
          <weblogic-ejb-jar>
          <weblogic-enterprise-bean>
          <ejb-name>MQSeriesMessagePullMDB</ejb-name>
          <message-driven-descriptor>
          <pool>
          <max-beans-in-free-pool>10</max-beans-in-free-pool>
          <initial-beans-in-free-pool>3</initial-beans-in-free-pool>
          </pool>
          
          <destination-jndi-name>AUTODIALER1</destination-jndi-name>
          <initial-context-factory>com.sun.jndi.fscontext.RefFSContextFactory</initial-context-factory>
          <provider-url>file:/prod/fcm/dev/domain/FCM_DEV_1/DAA_APP_CONFIG/config</provider-url>
          <connection-factory-jndi-name>XA_DHONAHLEE</connection-factory-jndi-name>
          </message-driven-descriptor>
          
          <reference-descriptor>
          </reference-descriptor>
          
          <enable-call-by-reference>True</enable-call-by-reference>
          <jndi-name>ejb/MQSeriesMessagePullMDB</jndi-name>
          <local-jndi-name>MQSeriesMessagePullMDBLocal</local-jndi-name>
          <remote-client-timeout>0</remote-client-timeout>
          </weblogic-enterprise-bean>
          </weblogic-ejb-jar>
          
          Regards
          Aziz Momin 

Hmmm.
          
          The descriptor looks fine as long as "XA_DHONAHLEE" resolves to an MQ connection factory. So I don't know what could be going wrong.
          
          There are known problems integrating with MQ 6.0 for which I think there are patches on top of MP2 - but at first glance this doesn't look like the same kind of problem. You might want to try posting to the EJB newsgroup.
          
          Tom 

As a possible work-around you could try using the "foreign server/destination" configurable as described in the MDB and JMS documentation, rather than use an MDB descriptor that directly references the foreign JNDI, connection factory, and destination.
          
          Tom 

We have applied the patch CR343580 on WL 9.2MP2 and now we are able to connect to the messaging system.

Related

MDB for Foreign JMS server

I am trying to access MQ que with Message Driven bean in weblogic 8.1.
          I have defined Foreign JMS server in weblogic pointing to MQ JNDI name.
          I am not sure what to define in "weblogic-ejb-jar.xml" and "ejb-jar.xml" to refer to que connection factory and que.
          
          Error message that I am getting while deploying is as follows:
          <The Message-Driven EJB: MesssageHandlerBean is unable to connect to the JMS destination: jms.MediaQueue. The Error was:
          [EJB:011010]The JMS destination with the JNDI name: jms.MediaQueue could not be found. Please ensure that the JNDI name in the weblogic-ejb-jar.xml is correct, and the JMS destination has been deployed.>
          
          Looks like it weblogic is not able to identify JNDI name that I have defined in foreign server for remote que.
          
          Please let me know how i can reference foreign JMS server JNDI names.
          
          Thanks a bunch for help.
          
          Please find attached configuration files.
          
          weblogic-ejb-jar.xml
          
          <weblogic-ejb-jar>
          <weblogic-enterprise-bean>
          <ejb-name>MesssageHandlerBean</ejb-name>
          <message-driven-descriptor>
          <destination-jndi-name>
          jms.MediaQueue
          </destination-jndi-name>
          <initial-context-factory>
          com.sun.jndi.fscontext.RefFSContextFactory
          </initial-context-factory>
          <provider-url>file://localhost/d:/mqm</provider-url>
          <connection-factory-jndi-name>
          jms.MediaQcf
          </connection-factory-jndi-name>
          </message-driven-descriptor>
          <jndi-name>MesssageHandlerBean</jndi-name>
          </weblogic-enterprise-bean>
          </weblogic-ejb-jar>
          
          ejb-jar.xml
          
          <enterprise-beans>      
          <message-driven>
          <ejb-name>MesssageHandlerBean</ejb-name>
          <ejb-class>com.ejb.MesssageHandlerBean</ejb-class>
          <transaction-type>Container</transaction-type>
          <message-driven-destination>
          <destination-type>javax.jms.Queue</destination-type>
          </message-driven-destination>
          </message-driven>
          </enterprise-beans>
          
          
          weblogic "config.xml" for foeign JMS server.
          
          <ForeignJMSServer ConnectionURL="file://localhost/d:/mqm" InitialContextFactory="com.sun.jndi.fscontext.RefFSContextFactory"
          JNDIProperties="" Name="MQJMS Server" Targets="cgServer">
          
          <ForeignJMSConnectionFactory LocalJNDIName="jms.MediaQcf"
          Name="MQ JMS Connection Factory" PasswordEncrypted=""
          RemoteJNDIName="jms/lMediaQcf" Username=""/>
          <ForeignJMSDestination LocalJNDIName="jms.MediaQueue"
          Name="MQJMS Destination" RemoteJNDIName="jms/IMediaQueue"/>
          </ForeignJMSServer>
          
          Message was edited by:
          akashgarg.akash#gmail.com
          
          Message was edited by:
          akashgarg.akash#gmail.com 
Thanks for going over the problem it is resolved now by changing weblogic-ejb-jar.xml. To point to weblogic initial context factory. Since weblogic has a foreign server defined so MDB is able to read from MQ que.
          
          Thanks
          Akash
          
          <weblogic-enterprise-bean> <ejb-name>MesssageHandlerBean</ejb-name> <message-driven-descriptor> <destination-jndi-name>jms.MediaQueue</destination-jndi-name> <initial-context-factory> weblogic.jndi.WLInitialContextFactory</initial-context-factory> <provider-url>t3://localhost:7001</provider-url> <connection-factory-jndi-name>jms.MediaQcf</connection-factory-jndi-name> </message-driven-descriptor> <jndi-name>MesssageHandlerBean</jndi-name> </weblogic-enterprise-bean>

security problem while creating sender/receiver to Queue

Hi
          I am trying to access a Queue using a thread which is a java thread create by us and not the WLS J2EE engine. The Queue has basic security on it in the form of userid/password.
          I am able to lookup the Queue using intialcontext [which contains the userid/password as SECURITY_PRINCIPAL and SECURITY_CREDENTIALS]. I am able to create a Connection from a QueueContection factory - but the moment I try to session.createSender() or createReceiver I get an error like this:
          
          02 Sep 2004 11:16:25:422 [ERROR] Access denied to resource: type=<jms>, applicat
          ion=, destinationType=queue, resource=sqout, action=send
          weblogic.jms.common.JMSSecurityException: Access denied to resource: type=<jms>,
          application=, destinationType=queue, resource=sqout, action=send
          at weblogic.jms.JMSService.checkPermission(JMSService.java:1140)
          at weblogic.jms.JMSService.checkSendPermission(JMSService.java:1152)
          at weblogic.jms.frontend.FESession.producerCreate(FESession.java:635)
          at weblogic.jms.frontend.FESession.invoke(FESession.java:2550)
          at weblogic.jms.dispatcher.Request.wrappedFiniteStateMachine(Request.jav
          a:621)
          at weblogic.jms.dispatcher.DispatcherImpl.dispatchSync(DispatcherImpl.ja
          va:153)
          at weblogic.jms.client.JMSSession.createProducer(JMSSession.java:1736)
          at weblogic.jms.client.JMSSession.createSender(JMSSession.java:1539)
          at psdi.iface.jms.JMSQueueSender.createClient(JMSQueueSender.java:43)
          at psdi.iface.jms.JMSQueueSender.<init>(JMSQueueSender.java:30)
          
          What do I need to do to receive or send data to Queue. I cant use an EJB - and I am stuck with a java thread. I suspect thats not propagating the security context. But I am using a initialcontext loaded with the security stuff. Is this something new to WLS 8.1.3. I think it used to work in prev versions.
          thanks
          Anamitra 
one more thing to mention - this error seems erratic - ie it happens sometimes and it does not happen sometime. Any pointer is highly appreciated.
          thanks
          Anamitra 
Can I ask why you are using your own Thread ?
          This is not really 'allowed' - and maybe an alternative approach would not give you these problems. 
Hi
          thanks for the reply. the use of own threads is a long story. But I guess I finally figured out how to get around the problem. It seems the thread that instantiates the InitialContext class with the security credentials can access the Queues. I was caching the InitalContext instance and hence this problem.
          
          But now I have another problem and I guess thats something which I am missing in the DD of the MDB. I am unable to make the MDB connect to the Queue [which I secured via the Weblogic Console]. I am attaching the DD here -can anyone tell me what I am missing.
          thanks
          Anamitra
          
          
          <!DOCTYPE ejb-jar PUBLIC "-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 2.0//EN"
                         "http://java.sun.com/dtd/ejb-jar_2_0.dtd">
          
          
          <ejb-jar id="ejb-jar_ID">
               <display-name>MEA JMS EJB Module</display-name>
          <enterprise-beans>
          
          <message-driven id="MessageDriven_JMSContQueueProcessor_1">
          <ejb-name>JMSContQueueProcessor-1</ejb-name>
          <ejb-class>psdi.iface.jms.JMSContQueueProcessor</ejb-class>
          <transaction-type>Container</transaction-type>
          <message-driven-destination>
          <destination-type>javax.jms.Queue</destination-type>
          </message-driven-destination>
          <env-entry>
          <env-entry-name>MESSAGEPROCESSOR</env-entry-name>
               <env-entry-type>java.lang.String </env-entry-type>
               <env-entry-value>psdi.iface.jms.QueueToMaximoProcessor</env-entry-value>
          </env-entry>
               <security-identity>
               <run-as>
                    <role-name>integrationuser</role-name>
               </run-as>
               </security-identity>
          
          </message-driven>
          
          </enterprise-beans>
          
          
          
          
          <assembly-descriptor>
          
                    <security-role>
                         <role-name>integrationuser</role-name>
                    </security-role>
          <container-transaction>
               <method>
               <ejb-name>JMSContQueueProcessor-1</ejb-name>
               <method-name>*</method-name>
               </method>
          
               <trans-attribute>Required</trans-attribute>
          
          </container-transaction>
          
          </assembly-descriptor>
          </ejb-jar> 
Hi,
          I came across your question and I also have a similar one.I hope you figured yours by now.I'm trying to implement security features on my JMS Queue.I'm using WLS8.1 SP4.
          These are my DDs
          ejb-jar-xml:
          ..............................
          <!-- Assembly Descriptor -->
          <assembly-descriptor >
          
          <security-role>
          
          <role-name>DS</role-name>
          
          </security-role>
          
          <method-permission>
          
               <role-name>DS</role-name>
                         
                    <method>
          
          <ejb-name>SampleMDB</ejb-name>
          
          <method-name>onMessage</method-name>
          
                    <method-params>
          
          <method-param>javax.jms.Message</method-param>
          
                    </method-params>
          
          </method>     
          
          </method-permission>
                    
          <container-transaction>
          
                         <method>
          
                                        <ejb-name>SampleMDB</ejb-name>
          
                                        <method-name>onMessage</method-name>
          
                                   <method-params>
          
                                                       <method-param>javax.jms.Message</method-param>
          
                              </method-params>
          
                         </method>     
                                   
                         <trans-attribute>Required</trans-attribute>
          
               </container-transaction>
                         
          </assembly-descriptor>
          
          </ejb-jar>
          
          
          weblogic-ejb-jar.xml:
          <?xml version="1.0" encoding="UTF-8"?>
          
          <!DOCTYPE weblogic-ejb-jar PUBLIC "-//BEA Systems, Inc.//DTD WebLogic 8.1.0 EJB//EN" "http://www.bea.com/servers/wls810/dtd/weblogic-ejb-jar.dtd">
          
          <!-- This weblogic-ejb-jar.xml is for the example code SampleMDB.java that an application will write
          In this case,
          Application queue name = DS HeV/636/inbound
               Application deployed # t3://vhaispapp6.vha.med.va.gov:7001
          -->
          <weblogic-ejb-jar>
          
          <weblogic-enterprise-bean>
          
          <ejb-name>SampleMDB</ejb-name>
          
          <message-driven-descriptor>
          
          <!-- Listen to the Application queue for e.g. DS HeV/636/inbound -->
                    <destination-jndi-name>DSTest/636/inbound</destination-jndi-name>
          
          <initial-context-factory>weblogic.jndi.WLInitialContextFactory
          </initial-context-factory>
          
          <!-- Provider URL where Application queue is deployed -->
                    <provider-url>t3://localhost:7001</provider-url>
          
          <connection-factory-jndi-name>DeliveryService/QueueConnectionFactory
          </connection-factory-jndi-name>
          
          <jms-client-id>VHADS</jms-client-id>
          
          </message-driven-descriptor>
          
          </weblogic-enterprise-bean>
          
          
          <security-role-assignment>
          
          <role-name>DS</role-name>
          
          <principal-name>DeliveryServiceUser</principal-name>
          
          </security-role-assignment>
          
          <enable-bean-class-redeploy>True</enable-bean-class-redeploy>
          
          </weblogic-ejb-jar>
          
          
          Now,on my JMS Queue(DSTest/636/inbound), I did Right click and set Scoped Role and Security Policy on on "Receive" method.And now this is the error I'm getting:
          <Jan 24, 2005 2:51:54 PM EST> <Warning> <EJB> <BEA-010061> <The Message-Driven E
          JB: SampleMDB is unable to connect to the JMS destination: DSTest/636/inbound. T
          he Error was:
          weblogic.jms.common.JMSSecurityException: Access denied to resource: type=<jms>,
          application=, destinationType=queue, resource=DSTest-636-inbound, action=receiv
          e
          weblogic.jms.common.JMSSecurityException: Access denied to resource: type=<jms>,
          application=, destinationType=queue, resource=DSTest-636-inbound, action=receiv
          e
          at weblogic.jms.JMSService.checkPermission(JMSService.java:1154)
          at weblogic.jms.JMSService.checkRecvPermission(JMSService.java:1171)
          at weblogic.jms.frontend.FESession.consumerCreate(FESession.java:1049)
          at weblogic.jms.frontend.FESession.invoke(FESession.java:2552)
          at weblogic.jms.dispatcher.Request.wrappedFiniteStateMachine(Request.jav
          a:643)
          
          Any help would be highly appreciated.
          Thanks in advance
          -Ankur 
have u got any solution for this? 
Add following in ejb-jar.xml:
          <assembly-descriptor>
          .....................
          <security-role>
          <description><Role description></description>
          <role-name>GoodRole</role-name>
          </security-role>
          .................
          </assembly-descriptor>
          
          and following in weblogic-ejb-jar.xml:
          
          <security-role-assignment>
          <role-name>GoodRole</role-name>
          <principal-name>user1</principal-name>
          <principal-name>user2</principal-name>
          </security-role-assignment>
          
          here "GoodRole" is just a dumy name, u can use any string instead.
          user1 and user2 are the users[belong to admin group] with privilage to access the queue, defiend through console.
          
          Thanks,
          Qumar

WLS 9.2 with TIBCO ems integration doesnt seem to be working

Hi, I followed the steps provided by Tibco doc on how to integrate with WLS 8 and they worked fine with my app, the messages were getting in to the Tibco queues, but I didnt find any steps on how to integrate TIBCO with WLS 9.2.
          Still I managed to extrapolate the below steps from the WLS 9.2 JMS foreign server config instructions to have them work with TIBCO, but my App fails with errors saying... "Failed to send message using the connection..."
          Anyone has the correct working instructions to integrate TIBCO with WLS 9.2?
          
          ---------- In Tibco ems --------------------
          Created 2 queues:
          OrderJMSQueue
          ShippingMDBQueue
          
          Created 2 connection factories:
          ShippingMDBQueueCF
          OrderJMSQueueCF
          
          ---------- end In Tibco ems --------------------
          
          ---------- In WLS 9.2 server --------------------
          1. In C:\WLS92\user_projects\domains\pqedomain\bin\startweblogic.bat
          Add:
               set CLASSPATH=C:\Tibco\ems\clients\java\tibjms.jar;%CLASSPATH%
               
               (assuming that Tibco is installed under C:\)
          2. Start the WLS 9.2 Server
          3. Open the WLS 9.2 admin page: http://localhost:7080/console
          4. Select Services -> Messaging -> JMS Modules
          5. Click New
               a. Set Name: "jms-mod"
          6. Click on "jms-mod"
          7. Create a Resource "Foreign JMs server"
               Name: PurchasingAppJMSServer
               JNDI Initial Context Factory: com.tibco.tibjms.naming.TibjmsInitialContextFactory
               JNDI Connection URL : tibjmsnaming://localhost:7222
               
          8. Under PurchasingAppJMSServer
               a. Click on Destinations -> New
                    i. Name: OrderJMSQueue
                    ii. Local JNDI Name: OrderJMSQueue
                    iii. Remote JNDI Name: OrderJMSQueue
               b. Click on Save
          
          9. Again under PurchasingAppJMSServer
          a. Click on Destinations -> New
          i. Name: ShippingMDBQueue
          ii. Local JNDI Name: ShippingMDBQueue
          iii. Remote JNDI Name: ShippingMDBQueue
          b. Click on Save
               
               
          10. Again under PurchasingAppJMSServer
               a. Click on Connection Factories -> New
          i. Name: OrderJMSQueueCF
          ii. Local JNDI Name: OrderJMSQueueCF
          iii. Remote JNDI Name: OrderJMSQueueCF
          b. Click on Save
          11. Again under PurchasingAppJMSServer
          a. Click on Connection Factories -> New
          i. Name: ShippingMDBQueueCF
          ii. Local JNDI Name: ShippingMDBQueueCF
          iii. Remote JNDI Name: ShippingMDBQueueCF
          b. Click on Save
          
          12. Come up to the Home page
          13. Click on Services -> Foreign JNDI Providers
          14. Click on New
          15. Enter Name: PurchasingAppJMSServer
          16. Click Save
          17. Click on "PurchasingAppJMSServer" under the "Summary of Foreign JNDI Servers"
               a. Set Initial Context Factory: com.tibco.tibjms.naming.TibjmsInitialContextFactory
               b. Set Provider URL: tibjmsnaming://localhost:7222
               c. Set User: admin
               d. Click Save 
Hi,
          
          I have the same problem, unable to send messages from a WLS 9.2 web application to a TIBCO queue. I can successfully connect to the TIBCO queue using the Hermes JMS client, so i know the credentials are correct.
          
          The only thing i can offer to for you to try, is that are credentials required for the remote Connection Factory? You appear to be supplying them for the Initial Context. Although, in saying that, i don't think it will help as i'm setting them on my connection factory, but no joy.
          
          The submitting of the remote connection factory credentials seems pretty importantly linked to the web / weblogic xml files going by the 'Note' part on Step 8 from the BEA docs links below - not having an example doesn't really help though.
          
          http://e-docs.bea.com/wls/docs92/ConsoleHelp/taskhelp/jms_modules/foreign_servers/CreateForeignConnectionFactories.html
          
          In my case i have tried it with the web.xml and weblogic.xml configured with the necessary resource references, so now i get the below error when i deploy the web application. Before i did this i get it when the application tried to look up the remote QueueConnectionFactory.
          
          web.xml[b]
          <resource-ref>
          <res-ref-name>jms/jndiCodeQCF</res-ref-name>
          <res-type>javax.jms.QueueConnectionFactory</res-type>
          <res-auth>Container</res-auth>
          <res-sharing-scope>Shareable</res-sharing-scope>
          </resource-ref>
          
          <resource-env-ref>
          <resource-env-ref-name>jms/jndiCodeQ</resource-env-ref-name>
          <resource-env-ref-type>javax.jms.Queue</resource-env-ref-type>
          </resource-env-ref>
          
          weblogic.xml[b]
          <wls:resource-description>
          <wls:res-ref-name>jms/jndiCodeQCF</wls:res-ref-name>
          <wls:jndi-name>jms/jndiLocalQCF</wls:jndi-name>
          </wls:resource-description>
          
          <wls:resource-env-description>
          <wls:resource-env-ref-name>jms/jndiCodeQ</wls:resource-env-ref-name>
          <wls:jndi-name>jms/jndiLocalQueue</wls:jndi-name>
          </wls:resource-env-description>
          
          
          The error i get after deploying the web application (my queue connection factory JNDI name is 'jms/jndiLocalQCF')is:
          
          <28/07/2007 01:52:22 PM EST> <Warning> <J2EE> <BEA-160064> <There was an error while making the initial connection to the JMS resource named jms/jndiLocalQCF from within an EJB or a servlet. The server will attempt the connection again later. The error was javax.jms.JMSException: [J2EE:160048]JNDI lookup of the JMS connection factory jms/jndiLocalQCF failed: javax.naming.AuthenticationException: Not permitted: invalid name or password [Root exception is javax.jms.JMSSecurityException: invalid name or password]>
          
          And the stack trace when the application code tries to lookup the local Queue Connection Factory indicates the username / credentials for the remote queue connection factory are not getting passed, even though i've set them on the connection factory. Here's the stack trace:
          
          Caused by: javax.jms.JMSSecurityException: invalid name or password
          at com.tibco.tibjms.Tibjmsx.buildException(Tibjmsx.java:549)
          at com.tibco.tibjms.TibjmsConnection._create(TibjmsConnection.java:713)
          at com.tibco.tibjms.TibjmsConnection.<init>(TibjmsConnection.java:1955)
          at com.tibco.tibjms.TibjmsQueueConnection.<init>(TibjmsQueueConnection.java:37)
          at com.tibco.tibjms.TibjmsxCFImpl._createImpl(TibjmsxCFImpl.java:187)
          at com.tibco.tibjms.TibjmsxCFImpl._createConnection(TibjmsxCFImpl.java:240)
          at com.tibco.tibjms.TibjmsQueueConnectionFactory.createQueueConnection(TibjmsQueueConnectionFactory.java:79)
          at com.tibco.tibjms.naming.TibjmsContext$Messenger.request(TibjmsContext.java:352)
          at com.tibco.tibjms.naming.TibjmsContext.lookup(TibjmsContext.java:678)
          at com.tibco.tibjms.naming.TibjmsContext.lookup(TibjmsContext.java:516)
          at javax.naming.InitialContext.lookup(InitialContext.java:351)
          at weblogic.deployment.jms.ForeignOpaqueReference.getReferent(ForeignOpaqueReference.java:181)
          at weblogic.jndi.internal.WLNamingManager.getObjectInstance(WLNamingManager.java:95)
          at weblogic.jndi.internal.ServerNamingNode.resolveObject(ServerNamingNode.java:348)
          at weblogic.jndi.internal.BasicNamingNode.resolveObject(BasicNamingNode.java:856)
          at weblogic.jndi.internal.BasicNamingNode.lookup(BasicNamingNode.java:209)
          at weblogic.jndi.internal.BasicNamingNode.lookup(BasicNamingNode.java:214)
          at weblogic.jndi.internal.WLEventContextImpl.lookup(WLEventContextImpl.java:269)
          at weblogic.jndi.internal.WLContextImpl.lookup(WLContextImpl.java:362)
          at javax.naming.InitialContext.lookup(InitialContext.java:351)
          
          So any help with this would be great, but i'm thinking a product fix will be required.
          
          Thanks in advance,
          Anthony
          
          --
          Edited by amaguire at 07/28/2007 9:14 PM
          
          --
          Edited by amaguire at 07/28/2007 9:16 PM
          
          --
          Edited by amaguire at 07/28/2007 11:34 PM 
The same thing is happening in our app trying to connect to a queue from a session bean. I decompiled the TIBCO jars and tweaked the code in TibjmsQueueConnectionFactory.java so that it would print out a message whenever createQueueConnection() or createQueueConnection(userName, password) were called. Running our app indicated that WebLogic is not passing the userName,password down, i.e. it's calling createQueueConnection() when is should be calling createQueueConnection(userName, password).
          
          BEA has verified that this is indeed a problem in 9.2 and that it worked correctly in 9.0. A CR has been assigned (CASE_ID_NUM: 738324).
          
          HTH, 
I have tried this succesfully with 8.2 and 9.2. No patch was required though it is not a bad idea to apply patch.
          As mentioned above, On weblogic side, I configured:
          1) Foreign JMS Server
          2) Foreign JMS Destination
          3) Foreign JMS Connection Factory
          I did not configure foreign jms provider.
          
          On EMS side, I created a Queue. That's it.
          I used default connection factory in EMS (QueueConnectionFactory)
          
          This is how my MDB class looks like:
          
          import javax.jms.JMSException;
          import javax.jms.Message;
          import javax.jms.TextMessage;
          import weblogic.ejbgen.MessageDriven;
          import weblogic.ejbgen.ForeignJmsProvider;
          
          #MessageDriven(ejbName = "SubscriberMessageDrivenBean",
                    destinationJndiName = "subscriberNotificationQueue",
                    destinationType = "javax.jms.Queue",
                    maxBeansInFreePool = "200",
                    initialBeansInFreePool = "20",
                    transTimeoutSeconds = "180",
                    defaultTransaction = MessageDriven.DefaultTransaction.NOT_SUPPORTED
               )
                    
          #ForeignJmsProvider(connectionFactoryJndiName="QueueConnectionFactoryLocal")
          
          public class SubscriberMessageDrivenBean extends JMSInterface {     
               
               public void OnMessage(Message inMessage) {
          
          try {
               System.out.println("Reached onMessage");
               
          } catch (JMSException exp) {
          e.printStackTrace();
          }
          
          }
          }
          
          and ejb-jar.xml like this......
          
          <?xml version="1.0" encoding="UTF-8"?>
          
          <!--
          ** This file was automatically generated by
          ** EJBGen WebLogic Server 9.2 SP1 Sun Jan 7 00:56:31 EST 2007 883308
          -->
          <ejb-jar
          xmlns="http://java.sun.com/xml/ns/j2ee"
          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
          xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/ejb-jar_2_1.xsd"
          version="2.1">
          <enterprise-beans>
          <message-driven>
          <ejb-name>SubscriberMessageDrivenBean</ejb-name>
          <ejb-class>com.att.cpni.common.interfaces.jms.atlas.SubscriberMessageDrivenBean</ejb-class>
          <transaction-type>Container</transaction-type>
          <activation-config>
          <activation-config-property>
          <activation-config-property-name>destinationType</activation-config-property-name>
          <activation-config-property-value>javax.jms.Queue</activation-config-property-value>
          </activation-config-property>
          </activation-config>
          </message-driven>
          </enterprise-beans>
          <assembly-descriptor>
          <container-transaction>
          <method>
          <ejb-name>AccountMessageDrivenBean</ejb-name>
          <method-name>*</method-name>
          </method>
          <trans-attribute>NotSupported</trans-attribute>
          </container-transaction>
          <container-transaction>
          <method>
          <ejb-name>SubscriberMessageDrivenBean</ejb-name>
          <method-name>*</method-name>
          </method>
          <trans-attribute>NotSupported</trans-attribute>
          </container-transaction>
          </assembly-descriptor>
          </ejb-jar>
          
          and weblogic-ejb-jar.xml like this.......
          
          <?xml version="1.0" encoding="UTF-8"?>
          
          <!--
          ** This file was automatically generated by
          ** EJBGen WebLogic Server 9.2 SP1 Sun Jan 7 00:56:31 EST 2007 883308
          -->
          <weblogic-ejb-jar
          xmlns="http://www.bea.com/ns/weblogic/90" xmlns:j2ee="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.bea.com/ns/weblogic/90 http://www.bea.com/ns/weblogic/90/weblogic-ejb-jar.xsd">
          <weblogic-enterprise-bean>
          <ejb-name>SubscriberMessageDrivenBean</ejb-name>
          <message-driven-descriptor>
          <pool>
          <max-beans-in-free-pool>200</max-beans-in-free-pool>
          <initial-beans-in-free-pool>20</initial-beans-in-free-pool>
          </pool>
          <destination-jndi-name>subscriberNotificationQueue</destination-jndi-name>
          <connection-factory-jndi-name>QueueConnectionFactoryLocal</connection-factory-jndi-name>
          </message-driven-descriptor>
          <transaction-descriptor>
          <trans-timeout-seconds>180</trans-timeout-seconds>
          </transaction-descriptor>
          </weblogic-enterprise-bean>
          </weblogic-ejb-jar>

How will MDB listen to foreign destination hosted in another server?

two weblogic servers (WL1 & WL2). MDB deployed in WL1. Mesaages will be posted in JMS server of WL2. My requirement is MDB will listen to these messages posted in WL2. How can i implement this using foreign JMS server?? or any other idea?? or online sample application or materials or tutorials??
          Please give some ideas/ sample codes.
          Thanks in advance.
          
          --
          Edited by ovesib at 06/14/2007 4:51 AM 
Hi,
          
          There are lots of scenerio possible to accomplish this task.
          1) If both the WLS servers[WL1 & WL2] are in a single cluster, u do not need to do any thing, just make sure "Replicate the JNDI name in cluster" attribute of ur queue is set.[i.e by default set].
          
          2) If these two servvers[WL1 & WL2] are in two different cluster or in two diffrent domain.
          a) Provide the URL weblogic server[i.e WL2] in MDB.
          as:
          <weblogic-ejb-jar>
          <weblogic-enterprise-bean>
          <ejb-name>exampleMessageDrivenA</ejb-name>
          <message-driven-descriptor>
          <destination-jndi-name>...</destination-jndi-name>
          <initial-context-factory>...</initial-context-factory>
          <provider-url> </provider-url>
          <connection-factory-jndi-name>..<connection-factory-jndi-name>
          </message-driven-descriptor>
          </weblogic-enterprise-bean>
          </weblogic-ejb-jar>
          
          
          b) You can also use foreign JMS server or JMS message bridge to transfer messages from WL2 to WL1.
          
          I don't think, there is need of sample application.
          You just need to make certain configuration at weblogic side. in case of, 2)b only you need to make some changes in deployment descripter[i.e weblogic-ejb-jar.xml]of the MDB.
          
          Fore more info:
          http://e-docs.bea.com/wls/docs81/ejb/message_beans.html
          
          Thanks,
          Qumar Hussain 
See also:
               
          FAQ: Integrating Remote JMS Providers
          
          8.1 version: http://e-docs.bea.com/wls/docs81/faq/interop.html
          
          9.2 version:
          http://e-docs.bea.com/wls/docs92/jms/interop.html
          
          Tom 
Hi ovesib:
          
          Just go thru this link
          http://dev2dev.bea.com/cs/user/blog%3ffile=/blog/unix_r_us/archive/2006/02/connecting_webl_1.html
          
          beautiful explanation to the solution u r looking for.
          
          
          
          Regards
          Yogesh 
thanks all of you.
          WL1 & WL2 is in 2 different domain.
          According to my requirement server instance, filestore,domain name are same.In that case foreign JMS server is not working. So I have choosen the option mentioned below.
          
          *****************************************
          2) If these two servvers[WL1 & WL2] are in two different cluster or in two diffrent domain.
          a) Provide the URL weblogic server[i.e WL2] in MDB.
          as:
          <weblogic-ejb-jar>
          <weblogic-enterprise-bean>
          <ejb-name>exampleMessageDrivenA</ejb-name>
          <message-driven-descriptor>
          <destination-jndi-name>...</destination-jndi-name>
          <initial-context-factory>...</initial-context-factory>
          <provider-url> </provider-url>
          <connection-factory-jndi-name>..<connection-factory-jndi-name>
          </message-driven-descriptor>
          </weblogic-enterprise-bean>
          </weblogic-ejb-jar>
          
          SECURITY_PRINCIPAL, SECURITY_CREDENTIALS is not mentioned here? then how will this connect with the jms queue hosted in different domain?? qumar_tcs plz help me.
          **********************************************
          problem is like this
          
          <Jun 21, 2007 5:02:32 PM IST> <Warning> <EJB> <BEA-010061> <The Message-Driven E
          JB: ReceiverMDB is unable to connect to the JMS destination: TestJMSQueue. The E
          rror was:
          weblogic.jms.common.JMSException: Connection not found
          weblogic.jms.common.JMSException: Connection not found
          at weblogic.jms.dispatcher.InvocableManager.invocableFind(ILweblogic/jms
          /common/JMSID;)Lweblogic/jms/dispatcher/Invocable;(InvocableManager.java:136)
          at weblogic.jms.dispatcher.Request.wrappedFiniteStateMachine()Lweblogic/
          jms/dispatcher/Response;(Request.java:630)
          at weblogic.jms.dispatcher.DispatcherImpl.dispatchSync(Lweblogic/jms/dis
          patcher/Request;)Lweblogic/jms/dispatcher/Response;(DispatcherImpl.java:179)
          at weblogic.jms.client.JMSConnection.createSessionInternal(ZIZ)Lweblogic
          /jms/client/JMSSession;(JMSConnection.java:410)
          at weblogic.jms.client.JMSConnection.createQueueSession(ZI)Ljavax/jms/Qu
          eueSession;(JMSConnection.java:357)
          at weblogic.ejb20.internal.JMSConnectionPoller.setUpQueueSessions(Ljavax
          /jms/Destination;Ljava/lang/String;III)V(JMSConnectionPoller.java:1732)
          at weblogic.ejb20.internal.JMSConnectionPoller.createJMSConnection()V(JM
          SConnectionPoller.java:2119)
          at weblogic.ejb20.internal.JMSConnectionPoller.connectToJMS()V(JMSConnec
          tionPoller.java:1192)
          at weblogic.ejb20.internal.JMSConnectionPoller.trigger(Lweblogic/time/co
          mmon/Schedulable;)V(JMSConnectionPoller.java:984)
          at weblogic.time.common.internal.ScheduledTrigger.run()Ljava/lang/Object
          ;(ScheduledTrigger.java:243)
          at weblogic.security.acl.internal.AuthenticatedSubject.doAs(Lweblogic/se
          curity/subject/AbstractSubject;Ljava/security/PrivilegedAction;)Ljava/lang/Objec
          t;(AuthenticatedSubject.java:321)
          at weblogic.security.service.SecurityManager.runAs(Lweblogic/security/ac
          l/internal/AuthenticatedSubject;Lweblogic/security/acl/internal/AuthenticatedSub
          ject;Ljava/security/PrivilegedAction;)Ljava/lang/Object;(SecurityManager.java:12
          1)
          at weblogic.time.common.internal.ScheduledTrigger.executeLocally()V(Sche
          duledTrigger.java:229)
          at weblogic.time.common.internal.ScheduledTrigger.execute(Lweblogic/kern
          el/ExecuteThread;)V(ScheduledTrigger.java:223)
          at weblogic.time.server.ScheduledTrigger.execute(Lweblogic/kernel/Execut
          eThread;)V(ScheduledTrigger.java:50)
          at weblogic.kernel.ExecuteThread.execute(Lweblogic/kernel/ExecuteRequest
          ;)V(ExecuteThread.java:224)
          at weblogic.kernel.ExecuteThread.run()V(ExecuteThread.java:183)
          at java.lang.Thread.startThreadFromVM(Ljava/lang/Thread;)V(Unknown Sourc
          e) 
Hi Ovesib,
          
          First of all, I would suggest you to follow the JMS naming rules, as you might face diffrent issues in future. for more info:
          http://e-docs.bea.com/wls/docs81/ConsoleHelp/jms_config.html#1152343
          
          second, if you don't specify the JMS security polices for your JMS resources explicitly, than you can proceed further by just enabling the "trust" between the domains.
          For more info:
          http://e-docs.bea.com/wls/docs81/ConsoleHelp/security_7x.html#1180569
          
          Third, if you specify the JMS security polices for your JMS resources explicitly, than you can use "res-auth" attribute to pass the credential.
          fore more info check "Container-Managed Security" in:
          http://e-docs.bea.com/wls/docs81/jms/j2ee_components.html
          
          and for more info about weblogic-ejb-jar.xml and ejb-jar.xml elments:
          http://e-docs.bea.com/wls/docs81/ejb/DDreference-ejb-jar.html
          http://e-docs.bea.com/wls/docs81/security/ejb_client.html#1035152
          
          Thanks,
          Qumar Hussain 
FYI: Many things changed between 8.1 and 9.x. 9.x may provide more integration options (per the FAQ). Also, 9.x does not have the same naming rule restrictions - two communicating 9.x domains need only ensure that the domain names are different - in theory, there's no longer a need to ensure that resources in the two different domains don't have matching names (such as WL server names, store names, and JMS server names).

redelivery limit not working for transaction timeout?

hi,
          we have a redelivery limit on a queue that works, except for when there is a transaction timeout. in this case, the message seems to be redelivered infinitely. Is this a bug? a feature?
          
          we are using Weblogic Server 8.1 SP4. we don't have the source code, so i am not sure how the error handling is done or what exceptions are thrown.
          
          ------------------ejb-jar.xml------------
          <message-driven>
          <ejb-name>ImporFileReceiver</ejb-name>
          <ejb-class>au.com.auspost.pcms.common.integration.ejb.mdb.ImporFileReceiverMdb</ejb-class>
          <transaction-type>Container</transaction-type>
          <acknowledge-mode>Auto-acknowledge</acknowledge-mode>
          <message-driven-destination>
          <destination-type>javax.jms.Queue</destination-type>
          <subscription-durability>NonDurable</subscription-durability>
          </message-driven-destination>
          </message-driven>
          <container-transaction>
          <method>
          <ejb-name>ImporFileReceiver</ejb-name>
          <method-intf>Local</method-intf>
          <method-name>onMessage</method-name>
          <method-params>
          <method-param>javax.jms.Message</method-param>
          </method-params>
          
          </method>
          <trans-attribute>NotSupported</trans-attribute>
          </container-transaction>
          <container-transaction>
          <method>
          <ejb-name>ImporFileReceiver</ejb-name>
          <method-intf>Remote</method-intf>
          <method-name>onMessage</method-name>
          <method-params>
          <method-param>javax.jms.Message</method-param>
          </method-params>
          
          </method>
          <trans-attribute>NotSupported</trans-attribute>
          </container-transaction>
          
          ------------------------ weblogic-ejb-jar.xml ---------
          
          <weblogic-enterprise-bean>
          <ejb-name>ImporFileReceiver</ejb-name>
          <message-driven-descriptor>
          <pool>
          <max-beans-in-free-pool>10</max-beans-in-free-pool>
          <initial-beans-in-free-pool>10</initial-beans-in-free-pool>
          </pool>
          
          <destination-jndi-name>jms/pcmsImportFileQueue</destination-jndi-name>
          <connection-factory-jndi-name>jms/pcmsConnectionFactory</connection-factory-jndi-name>
          </message-driven-descriptor>
          
          <transaction-descriptor>
          <trans-timeout-seconds>3600</trans-timeout-seconds>
          </transaction-descriptor>
          
          <reference-descriptor>
          </reference-descriptor>
          
          <dispatch-policy>pcms.execute.queue.mdb.internal</dispatch-policy>
          <remote-client-timeout>0</remote-client-timeout>
          </weblogic-enterprise-bean>
          
          ------------------------ config.xml -----------------
          
          <JMSServer Name="eParcel JMS server"
          Store="eParcel JMS Server File Store" Targets="wls_pcms_prod1">
          <JMSQueue CreationTime="1190981682976"
          ErrorDestination="PCMS Import File Error Queue"
          JNDIName="jms/pcmsImportFileQueue"
          Name="PCMS Import File Queue" RedeliveryLimit="2"/>
          <JMSQueue CreationTime="1208347415759"
          JNDIName="jms/pcmsImportFileErrorQueue" Name="PCMS Import File Error Queue"/>
          </JMSServer>
          <JMSConnectionFactory JNDIName="jms/pcmsConnectionFactory"
          Name="eParcel JMS Connection Factory" Targets="wlc_pcms_prod"/>
          <JMSConnectionFactory JNDIName="jms/pcmsXAConnectionFactory"
          Name="eParcel JMS XA Connection Factory" Targets="wlc_pcms_prod" XAConnectionFactoryEnabled="true"/>
          
          -------------- weblogic log ---------------
          
          ####<24/04/2008 01:53:58 PM EST> <Warning> <EJB> <HX415> <wls_pcms_prod1> <ExecuteThread: '12' for queue: 'weblogic.kernel.Default'> <project_admin> <> <BEA-010065> <MessageDrivenBean threw an Exception in onMessage(). The exception was:
          javax.ejb.EJBException: Transaction Rolledback.: weblogic.transaction.internal.TimedOutException: Transaction timed out after 3599 seconds
          Name=[EJB au.com.auspost.pcms.common.integration.ejb.ImportFileHandlerBean.handleMessage(org.apache.xmlbeans.XmlObject)],Xid=BEA1-696C9947A48195BA18DC(68926234),Status=Active,numRepliesOwedMe=0,numRepliesOwedOthers=0,seconds since begin=3599,seconds left=60,activeThread=Thread[ExecuteThread: '12' for queue: 'weblogic.kernel.Default',5,Thread Group for Queue: 'weblogic.kernel.Default'],XAServerResourceInfo[weblogic.jdbc.wrapper.JTSXAResourceImpl]=(ServerResourceInfo[weblogic.jdbc.wrapper.JTSXAResourceImpl]=(state=ended,assigned=none),xar=weblogic.jdbc.wrapper.JTSXAResourceImpl#447373e,re-Registered = false),SCInfo[wlsd_auspost_prod+wls_pcms_prod1]=(state=active),properties=({weblogic.transaction.name=[EJB au.com.auspost.pcms.common.integration.ejb.ImportFileHandlerBean.handleMessage(org.apache.xmlbeans.XmlObject)], weblogic.jdbc=t3://10.3.2.35:7003}),OwnerTransactionManager=ServerTM[ServerCoordinatorDescriptor=(CoordinatorURL=wls_pcms_prod1+10.3.2.35:7003+wlsd_auspost_prod+t3+, XAResources={JMS_eParcel JMS Server File Store, weblogic, wlsd_auspost_prod, com},NonXAResources={})],CoordinatorURL=wls_pcms_prod1+10.3.2.35:7003+wlsd_auspost_prod+t3+)
          at weblogic.transaction.internal.ServerTransactionImpl.wakeUp(I)V(ServerTransactionImpl.java:1614)
          at weblogic.transaction.internal.ServerTransactionManagerImpl.processTimedOutTransactions(Ljava/util/List;I)V(ServerTransactionManagerImpl.java:1117)
          at weblogic.transaction.internal.TransactionManagerImpl.wakeUp()V(TransactionManagerImpl.java:1881)
          at weblogic.transaction.internal.ServerTransactionManagerImpl.wakeUp()V(ServerTransactionManagerImpl.java:1034)
          at weblogic.transaction.internal.WLSTimer.trigger(Lweblogic/time/common/Schedulable;)V(WLSTimer.java:31)
          at weblogic.time.common.internal.ScheduledTrigger.run()Ljava/lang/Object;(Optimized Method)
          at weblogic.security.acl.internal.AuthenticatedSubject.doAs(Lweblogic/security/subject/AbstractSubject;Ljava/security/PrivilegedAction;)Ljava/lang/Object;(Optimized Method)
          at weblogic.security.service.SecurityManager.runAs(Lweblogic/security/acl/internal/AuthenticatedSubject;Lweblogic/security/acl/internal/AuthenticatedSubject;Ljava/security/PrivilegedAction;)Ljava/lang/Object;(SecurityManager.java:121)
          at weblogic.time.common.internal.ScheduledTrigger.executeLocally()V(ScheduledTrigger.java:229)
          at weblogic.time.common.internal.ScheduledTrigger.execute(Lweblogic/kernel/ExecuteThread;)V(ScheduledTrigger.java:223)
          at weblogic.kernel.ExecuteThread.execute(Lweblogic/kernel/ExecuteRequest;)V(Optimized Method)
          at weblogic.kernel.ExecuteThread.run()V(ExecuteThread.java:178)
          at java.lang.Thread.startThreadFromVM(Ljava/lang/Thread;)V(Unknown Source)
          ; nested exception is: weblogic.transaction.internal.TimedOutException: Transaction timed out after 3599 seconds
          Name=[EJB au.com.auspost.pcms.common.integration.ejb.ImportFileHandlerBean.handleMessage(org.apache.xmlbeans.XmlObject)],Xid=BEA1-696C9947A48195BA18DC(68926234),Status=Active,numRepliesOwedMe=0,numRepliesOwedOthers=0,seconds since begin=3599,seconds left=60,activeThread=Thread[ExecuteThread: '12' for queue: 'weblogic.kernel.Default',5,Thread Group for Queue: 'weblogic.kernel.Default'],XAServerResourceInfo[weblogic.jdbc.wrapper.JTSXAResourceImpl]=(ServerResourceInfo[weblogic.jdbc.wrapper.JTSXAResourceImpl]=(state=ended,assigned=none),xar=weblogic.jdbc.wrapper.JTSXAResourceImpl#447373e,re-Registered = false),SCInfo[wlsd_auspost_prod+wls_pcms_prod1]=(state=active),properties=({weblogic.transaction.name=[EJB au.com.auspost.pcms.common.integration.ejb.ImportFileHandlerBean.handleMessage(org.apache.xmlbeans.XmlObject)], weblogic.jdbc=t3://10.3.2.35:7003}),OwnerTransactionManager=ServerTM[ServerCoordinatorDescriptor=(CoordinatorURL=wls_pcms_prod1+10.3.2.35:7003+wlsd_auspost_prod+t3+, XAResources={JMS_eParcel JMS Server File Store, weblogic, wlsd_auspost_prod, com},NonXAResources={})],CoordinatorURL=wls_pcms_prod1+10.3.2.35:7003+wlsd_auspost_prod+t3+). 
Hi,
          
          Is the MDB participating in a transaction in the first place? For an MDB to be transactional the transaction-type must be "container" and the trans-attribute for the onMessage method must be "Required". The descriptor below seems to show a trans-attribute of NotSupported.
          
          Tom 
Thanks Tom,
          Good point. The timeout exception is on ImportFileHandlerBean.handleMessage()....which is a session bean. The MDB must call this session bean, which also has a 3600 second timeout. It is confusing since the descriptor for the MDB has the transaction-timeout set, but i assume this is ignored for 'not-supported').
          
          I guess you would need to look at the code, but is there anyway a message go back on the queue, and not get the redelivery incremented?
          
          (I just had an evil thought...maybe the code could be physically sending the message onto the queue again when there is a timeout on the session bean.....hence would not get the redelivery incremented.....)
          
          
          -------------- ejb-jar.xml ----------------
          
          <session>
          <ejb-name>ImportFileHandler</ejb-name>
          <local-home>au.com.auspost.pcms.common.integration.ejb.ImportFileHandlerLocalHome</local-home>
          <local>au.com.auspost.pcms.common.integration.ejb.ImportFileHandlerLocal</local>
          <ejb-class>au.com.auspost.pcms.common.integration.ejb.ImportFileHandlerBean</ejb-class>
          <session-type>Stateless</session-type>
          <transaction-type>Container</transaction-type>
          </session>
          
          ----------- weblogic-ejb.jar.xml -----------
          
          <weblogic-enterprise-bean>
          <ejb-name>ImportFileHandler</ejb-name>
          <stateless-session-descriptor>
          </stateless-session-descriptor>
          
          <transaction-descriptor>
          <trans-timeout-seconds>3600</trans-timeout-seconds>
          </transaction-descriptor>
          
          <reference-descriptor>
          </reference-descriptor>
          
          <enable-call-by-reference>True</enable-call-by-reference>
          <local-jndi-name>ejb/ImportFileHandlerLocal</local-jndi-name>
          <remote-client-timeout>0</remote-client-timeout>
          </weblogic-enterprise-bean> 
It is confusing since the descriptor for the MDB has the transaction-timeout set, but i assume this is ignored for 'not-supported'                    Correct. Since the message isn't participating in a transaction, the transaction timeout doesn't apply.
          
          >>> I guess you would need to look at the code, but is there anyway a message go back on the queue, and not get the redelivery incremented?
          
          Not that I can think of.
          
          >>> (I just had an evil thought...maybe the code could be physically sending the message onto the queue again when there is a timeout on the session bean.....hence would not get the redelivery incremented.....)
          
          You could test this by instrumenting the app code to print "msg.getJMSMessageId()", which is unique for each message. You can also test this by checking out the JMS statistics - the total message count will increase with each new message, but won't increase for a redelivery.
          
          In addition, you could enable JMS debugging. I think you can do this via the on the console -> wl server -> debug pages, or by adding one of more flags on the JVM command line:
          
          -Dweblogic.Debug.DebugJMSBackEnd=true
          -Dweblogic.Debug.DebugJMSXA=true
          -Dweblogic.Debug.DebugJMSFrontEnd=true
          -Dweblogic.Debug.DebugJMSCommon=true
          -Dweblogic.Debug.DebugJMSConfig=true
          -Dweblogic.Debug.DebugJMSStore=true
          -Dweblogic.Debug.DebugJMSBoot=true
          
          I think its likely that only the first two or three debug flags are helpful in your case.
          
          ).
          
          Tom

Categories

Resources