1 Reply Latest reply on Mar 29, 2004 7:17 AM by Adrian Brock

    JmsXA/QueueConnection Factory

    sahumx Newbie

      When I used in jboss.xml the config:
      <res-ref-name>jms/QueueConnectionFactory</res-ref-name>
      <jndi-name>QueueConnectionFactory</jndi-name>
      and
      <resource-env-ref-name>jms/AsyncSenderQueue</resource-env-ref-name>
      <jndi-name>queue/jms/opc/OrderQueue</jndi-name>

      The messages seem to be sent to the Queue but seem not to be picked from Queue(I tried with XAQueueConnectionFactory).
      When I use
      <res-ref-name>jms/QueueConnectionFactory</res-ref-name>
      <jndi-name>java:/JmsXAQ</jndi-name>
      the messages seem to be picked up by the MDB...My first question is why was it not picked with the first connection factory, but picked incase of the second one.
      I am also now getting an java.lang.exception and the message seem to resent many times, but finnally seem to get processed...but I do not understand why it is erroring and why it is send many times...I am sending the output of the log..

      Please help

      2004-03-25 07:40:26,406 DEBUG [org.jboss.mq.referenceable.SpyDestinationObjectFactory] SpyDestinationObjectFactory->getObjectInstance()
      2004-03-25 07:40:26,453 DEBUG [org.jboss.jms.jndi.JBossMQProvider] no provider url; connecting to local JNDI
      2004-03-25 07:40:26,484 DEBUG [org.jboss.jms.jndi.JBossMQProvider] created context: javax.naming.InitialContext@bfc8d0
      2004-03-25 07:40:26,484 DEBUG [org.jboss.jms.ConnectionFactoryHelper] using connection factory: org.jboss.mq.SpyXAConnectionFactory@75ca3e
      2004-03-25 07:40:26,484 DEBUG [org.jboss.jms.ConnectionFactoryHelper] using username/password: guest/guest
      2004-03-25 07:40:26,484 TRACE [org.jboss.mq.Connection] Connection Initializing
      2004-03-25 07:40:26,484 TRACE [org.jboss.mq.Connection] Getting the serverIL
      2004-03-25 07:40:26,484 TRACE [org.jboss.mq.Connection] serverIL=org.jboss.mq.il.jvm.JVMServerIL@18dabf1
      2004-03-25 07:40:26,484 TRACE [org.jboss.mq.Connection] Authenticating
      2004-03-25 07:40:26,484 TRACE [org.jboss.mq.Connection] Authenticating user guest
      2004-03-25 07:40:26,484 TRACE [org.jboss.mq.server.TracingInterceptor] CALLED : authenticate
      2004-03-25 07:40:26,484 TRACE [org.jboss.mq.security.ServerSecurityInterceptor] Autenticating user guest/guest
      2004-03-25 07:40:26,484 TRACE [org.jboss.mq.sm.file.DynamicLoginModule] initialize
      2004-03-25 07:40:26,484 TRACE [org.jboss.mq.sm.file.DynamicLoginModule] Saw unauthenticatedIdentity=guest
      2004-03-25 07:40:26,484 TRACE [org.jboss.mq.sm.file.DynamicLoginModule] login
      2004-03-25 07:40:26,484 TRACE [org.jboss.mq.sm.file.DynamicLoginModule] User 'guest' authenticated, loginOk=true
      2004-03-25 07:40:26,484 TRACE [org.jboss.mq.sm.file.DynamicLoginModule] commit, loginOk=true
      2004-03-25 07:40:26,484 TRACE [org.jboss.mq.security.SecurityManager] Username: guest is authenticated
      2004-03-25 07:40:26,484 TRACE [org.jboss.mq.security.SecurityManager] Adding group : class org.jboss.security.NestableGroup Roles(members:guest)
      2004-03-25 07:40:26,484 TRACE [org.jboss.mq.server.TracingInterceptor] RETURN : authenticate
      2004-03-25 07:40:26,484 TRACE [org.jboss.mq.server.TracingInterceptor] CALLED : checkUser
      2004-03-25 07:40:26,484 TRACE [org.jboss.mq.server.TracingInterceptor] ARG : guest
      2004-03-25 07:40:26,484 TRACE [org.jboss.mq.server.TracingInterceptor] ARG : (password not shown)
      2004-03-25 07:40:26,484 TRACE [org.jboss.mq.server.TracingInterceptor] RETURN : checkUser
      2004-03-25 07:40:26,484 TRACE [org.jboss.mq.Connection] Starting the clientIL service
      2004-03-25 07:40:26,484 DEBUG [org.jboss.mq.GenericConnectionFactory] Handing out ClientIL: org.jboss.mq.il.jvm.JVMClientILService
      2004-03-25 07:40:26,484 TRACE [org.jboss.mq.Connection] Connection establishment successful
      2004-03-25 07:40:26,484 DEBUG [org.jboss.jms.ConnectionFactoryHelper] created XAQueueConnection: org.jboss.mq.SpyXAConnection@119087d
      2004-03-25 07:40:26,484 TRACE [org.jboss.mq.Connection] Checking clientID :null
      2004-03-25 07:40:26,484 TRACE [org.jboss.mq.server.TracingInterceptor] CALLED : getID
      2004-03-25 07:40:26,484 TRACE [org.jboss.mq.server.TracingInterceptor] RETURN : getID
      2004-03-25 07:40:26,484 TRACE [org.jboss.mq.Connection] Connection establishment successful
      2004-03-25 07:40:26,515 TRACE [org.jboss.mq.Connection] Starting connection, ClientID=ID:9
      2004-03-25 07:40:26,515 TRACE [org.jboss.mq.server.TracingInterceptor] CALLED : setEnabled
      2004-03-25 07:40:26,515 TRACE [org.jboss.mq.server.TracingInterceptor] ARG : true
      2004-03-25 07:40:26,515 TRACE [org.jboss.mq.server.ClientConsumer] ClientConsumer:ID:9->setEnabled(enabled=true)
      2004-03-25 07:40:26,515 TRACE [org.jboss.mq.server.TracingInterceptor] RETURN : setEnabled
      2004-03-25 07:40:26,515 TRACE [org.jboss.mq.SpyXAResource] Start xid=XidImpl [FormatId=257, GlobalId=maheswar//259, BranchQual=2], flags=0
      2004-03-25 07:40:26,515 TRACE [org.jboss.mq.SpyXAResourceManager] Starting tx xid=XidImpl [FormatId=257, GlobalId=maheswar//259, BranchQual=2]
      2004-03-25 07:40:26,515 TRACE [org.jboss.mq.SpySession] Setting current tx org.jboss.mq.SpyQueueSession@7a9bff xid=XidImpl [FormatId=257, GlobalId=maheswar//259, BranchQual=2] previous: null
      2004-03-25 07:40:26,531 TRACE [org.jboss.mq.SpyXAResourceManager] Adding xid=XidImpl [FormatId=257, GlobalId=maheswar//259, BranchQual=2], message=org.jboss.mq.SpyTextMessage {
      Header {
      jmsDestination : QUEUE.jms/opc/OrderQueue
      jmsDeliveryMode : 2
      jmsExpiration : 0
      jmsPriority : 4
      jmsMessageID : ID:9-10802004265311
      jmsTimeStamp : 1080200426531
      jmsCorrelationID: null
      jmsReplyTo : null
      jmsType : null
      jmsRedelivered : false
      jmsProperties : {}
      jmsPropertiesReadWrite:true
      msgReadOnly : false
      producerClientId: ID:9
      }
      Body {
      text :<?xml version="1.0" encoding="UTF-8"?>
      <!DOCTYPE PurchaseOrder PUBLIC "-//Sun Microsystems, Inc. - J2EE Blueprints Group//DTD PurchaseOrder 1.1//EN" "/com/sun/j2ee/blueprints/purchaseorder/rsrc/schemas/PurchaseOrder.dtd">

      10011
      sahumx
      MihirSahu@hotmail.com
      2004-03-25


      BluesPrints
      Duke

      1234 Moon Way
      Sunville
      California
      10001
      United States

      MihirSahu@hotmail.com
      408-555-5555




      BluesPrints
      Duke

      1234 Moon Way
      Sunville
      California
      10001
      United States

      MihirSahu@hotmail.com
      408-555-5555


      145.0

      1234-2334
      10/2001
      Duke Express


      JETBLACK
      JB-2
      JB-2-1
      0
      1
      145.0



      }
      }
      2004-03-25 07:40:26,531 TRACE [org.jboss.mq.SpyXAResourceManager] TXState=org.jboss.mq.SpyXAResourceManager$TXState@1016505{ txState=0, sendMessages=[], ackedMessages=[] }
      2004-03-25 07:40:26,546 DEBUG [org.jboss.ejb.plugins.cmp.jdbc.JDBCStoreEntityCommand.CounterEJB] Executing SQL: UPDATE CounterEJB SET counter=? WHERE name=?
      2004-03-25 07:40:26,546 DEBUG [org.jboss.ejb.plugins.cmp.jdbc.JDBCStoreEntityCommand.CounterEJB] Rows affected = 1
      2004-03-25 07:40:26,546 INFO [org.jboss.resource.connectionmanager.CachedConnectionManager] Closing a connection for you. Please close them yourself: org.jboss.resource.adapter.jms.JmsSession@173b35d
      java.lang.Exception: STACKTRACE
      at org.jboss.resource.connectionmanager.CachedConnectionManager.registerConnection(CachedConnectionManager.java:282)
      at org.jboss.resource.connectionmanager.BaseConnectionManager2.allocateConnection(BaseConnectionManager2.java:506)
      at org.jboss.resource.connectionmanager.BaseConnectionManager2$ConnectionManagerProxy.allocateConnection(BaseConnectionManager2.java:814)
      at org.jboss.resource.adapter.jms.JmsSessionFactoryImpl.createQueueSession(JmsSessionFactoryImpl.java:119)
      at com.sun.j2ee.blueprints.asyncsender.ejb.AsyncSenderEJB.sendAMessage(AsyncSenderEJB.java:75)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:324)
      at org.jboss.ejb.StatelessSessionContainer$ContainerInterceptor.invoke(StatelessSessionContainer.java:683)
      at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invoke(CachedConnectionInterceptor.java:185)
      at org.jboss.ejb.plugins.StatelessSessionInstanceInterceptor.invoke(StatelessSessionInstanceInterceptor.java:72)
      at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:84)
      at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:267)
      at org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:128)
      at org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.java:118)
      at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:191)
      at org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invoke(ProxyFactoryFinderInterceptor.java:122)
      at org.jboss.ejb.StatelessSessionContainer.internalInvoke(StatelessSessionContainer.java:331)
      at org.jboss.ejb.Container.invoke(Container.java:700)
      at org.jboss.ejb.plugins.local.BaseLocalProxyFactory.invoke(BaseLocalProxyFactory.java:375)
      at org.jboss.ejb.plugins.local.StatelessSessionProxy.invoke(StatelessSessionProxy.java:83)
      at $Proxy115.sendAMessage(Unknown Source)
      at com.sun.j2ee.blueprints.petstore.controller.ejb.actions.OrderEJBAction.perform(OrderEJBAction.java:153)
      at com.sun.j2ee.blueprints.waf.controller.ejb.StateMachine.processEvent(StateMachine.java:111)
      at com.sun.j2ee.blueprints.waf.controller.ejb.EJBControllerLocalEJB.processEvent(EJBControllerLocalEJB.java:69)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:324)
      at org.jboss.ejb.StatefulSessionContainer$ContainerInterceptor.invoke(StatefulSessionContainer.java:928)
      at org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.java:118)
      at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invoke(CachedConnectionInterceptor.java:185)
      at org.jboss.ejb.plugins.StatefulSessionInstanceInterceptor.invoke(StatefulSessionInstanceInterceptor.java:269)
      at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:84)
      at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:267)
      at org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:128)
      at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:191)
      at org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invoke(ProxyFactoryFinderInterceptor.java:122)
      at org.jboss.ejb.StatefulSessionContainer.internalInvoke(StatefulSessionContainer.java:416)
      at org.jboss.ejb.Container.invoke(Container.java:700)
      at org.jboss.ejb.plugins.local.BaseLocalProxyFactory.invoke(BaseLocalProxyFactory.java:375)
      at org.jboss.ejb.plugins.local.StatefulSessionProxy.invoke(StatefulSessionProxy.java:41)
      at $Proxy109.processEvent(Unknown Source)
      at com.sun.j2ee.blueprints.petstore.controller.web.ShoppingWebController.handleEvent(ShoppingWebController.java:96)
      at com.sun.j2ee.blueprints.waf.controller.web.RequestProcessor.processRequest(RequestProcessor.java:141)
      at com.sun.j2ee.blueprints.waf.controller.web.MainServlet.doProcess(MainServlet.java:115)
      at com.sun.j2ee.blueprints.waf.controller.web.MainServlet.doPost(MainServlet.java:104)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
      at com.sun.j2ee.blueprints.signon.web.SignOnFilter.doFilter(SignOnFilter.java:133)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:213)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
      at com.sun.j2ee.blueprints.encodingfilter.web.EncodingFilter.doFilter(EncodingFilter.java:77)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:213)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
      at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:256)
      at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
      at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
      at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
      at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
      at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
      at org.jboss.web.tomcat.security.JBossSecurityMgrRealm.invoke(JBossSecurityMgrRealm.java:220)
      at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
      at org.apache.catalina.valves.CertificatesValve.invoke(CertificatesValve.java:246)
      at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
      at org.jboss.web.tomcat.tc4.statistics.ContainerStatsValve.invoke(ContainerStatsValve.java:76)
      at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
      at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
      at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
      at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2416)
      at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)
      at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
      at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:171)
      at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
      at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:172)
      at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
      at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:65)
      at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
      at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:577)
      at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
      at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
      at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
      at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174)
      at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
      at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
      at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
      at org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:223)
      at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:601)
      at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:392)
      at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:565)
      at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:619)
      at java.lang.Thread.run(Thread.java:536)
      2004-03-25 07:40:26,562 TRACE [org.jboss.mq.SpyXAResource] End xid=XidImpl [FormatId=257, GlobalId=maheswar//259, BranchQual=2], flags=33554432