1 2 3 4 5 6 Previous Next 79 Replies Latest reply: Jul 23, 2003 6:56 AM by quentin Go to original post RSS
  • 60. Re: MQSeries/JBoss MDB/3rd Party Messaging
    Thomas Cherel Novice

    Everything looks correct to me.
    The question is the two JNDI names, queue/MQqueue (in jboss.xml) and QueueConnectionFactory in jms-ds.xml, what object are they refering to? They need to be objects which are instances of the ibm MQ JMS classes (by using the JMSAdmin tool for example, as described in multiple places in this thread).
    If this is already the case, I will aslo suggest to use a different JNDI name than QueueConnectionFactory for the WS MQ connection factory. I believe that this name is already used by JBoss for its own factory.

    Thomas

  • 61. Re: MQSeries/JBoss MDB/3rd Party Messaging
    bcraig Newbie

    Did you receive an answer to the question about the
    JBOSSMQSeriesProvider java class? I am interested in
    obtaining this handler as well for MQ workflow.

    Brent

  • 62. Re: MQSeries/JBoss MDB/3rd Party Messaging
    pjrmoreira Newbie

    Hello,

    I will reproduce all the steps I've done to see if anyone can help me with my problem. I've tried to this process in both JBoss 3.04 and 3.21 and I have the same problem in both:

    1- I copied the following files from the MQSeries java lib directory to the JBoss lib directory:
    com.ibm.mq.jar
    com.ibm.mqjms.jar
    com.ibm.mqbind.jar
    fscontext.jar
    providerutil.jar

    2- In jms-service.xml, I've duplicated the org.jboss.jms.jndi.JMSProviderLoader mbean with the following content:


    MQSeriesJMSProvider
    org.jboss.jms.jndi.JBossMQProvider
    java:/MQQueueConnectionFactory
    java:/MQQueueConnectionFactory


    3- In standardjboss.xml, duplicate the Standard Message Driven Bean container configuration, with the following content:

    <container-configurations>
    <container-configuration>
    <container-name>Standard Message Driven Bean to MQSeries Message Driven Bean</container-name>
    <call-logging>false</call-logging>
    <container-invoker>org.jboss.ejb.plugins.jms.JMSContainerInvoker</container-invoker>
    <container-interceptors>
    org.jboss.ejb.plugins.LogInterceptor
    org.jboss.ejb.plugins.RunAsSecurityInterceptor
    <!-- CMT -->

    org.jboss.ejb.plugins.TxInterceptorCMT
    org.jboss.ejb.plugins.MetricsInterceptor
    org.jboss.ejb.plugins.MessageDrivenInstanceInterceptor
    <!-- BMT -->

    org.jboss.ejb.plugins.MessageDrivenInstanceInterceptor
    org.jboss.ejb.plugins.MessageDrivenTxInterceptorBMT
    org.jboss.ejb.plugins.MetricsInterceptor org.jboss.resource.connectionmanager.CachedConnectionInterceptor
    </container-interceptors>
    <client-interceptors>

    org.jboss.proxy.ejb.HomeInterceptor
    org.jboss.proxy.SecurityInterceptor
    org.jboss.proxy.TransactionInterceptor
    org.jboss.invocation.InvokerInterceptor


    new org.jboss.proxy.ejb.StatelessSessionInterceptor
    org.jboss.proxy.SecurityInterceptor
    org.jboss.proxy.TransactionInterceptor
    org.jboss.invocation.InvokerInterceptor

    </client-interceptors>
    <instance-pool>org.jboss.ejb.plugins.MessageDrivenInstancePool</instance-pool>
    <instance-cache/>
    <persistence-manager/>
    <transaction-manager>org.jboss.tm.TxManager</transaction-manager>
    <container-invoker-conf>
    MQSeriesJMSProvider
    StdJMSPool
    15
    1

    10

    queue/DLQ
    10
    0


    </container-invoker-conf>
    <container-pool-conf>
    100
    </container-pool-conf>
    </container-configuration>

    4- I've modified the JMSAdmin.cfg and register the MQSeries objects in JBoss JNDI
    INITIAL_CONTEXT_FACTORY=org.jnp.interfaces.NamingContextFactory
    PROVIDER_URL=jnp://localhost:1099
    def qcf(MQQueueConnectionFactory) qmanager(qeue_manager) host(localhost) channel(queue_manager_channel) transport(client)
    chg ctx(queue)
    def q(MQRequestQueue) qmanager(qeue_manager) queue(TestQueue)

    5-I've created a simple MDB with the following configuration:

    jboss.xml

    <enterprise-beans>
    <message-driven>
    <ejb-name>MDBTest</ejb-name>
    <destination-jndi-name>queue/MQRequestQueue</destination-jndi-name>
    <configuration-name>Standard Message Driven Bean</configuration-name>
    <resource-ref>
    <res-ref-name>jms/MQRequestQueue</res-ref-name>
    <jndi-name>MQRequestQueue</jndi-name>
    </resource-ref>
    </message-driven>
    </enterprise-beans>


    ejb-jar.xml

    <enterprise-beans>
    <message-driven>
    <ejb-name>MDBTest</ejb-name>
    <ejb-class>MDBTest</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>
    <resource-ref>
    <res-ref-name>jms/MQRequestQueue</res-ref-name>
    <res-type>javax.jms.QueueConnectionFactory</res-type>
    <res-auth>Container</res-auth>
    </resource-ref>
    </message-driven>
    </enterprise-beans>


    6- Whenever I try to deploy my MDB I have the following problem:

    12:39:32,641 INFO [EjbModule] Creating
    12:39:32,672 INFO [EjbModule] Deploying MDBTest
    12:39:32,672 INFO [MessageDrivenContainer] Creating
    12:39:32,672 INFO [MessageDrivenInstancePool] Creating
    12:39:32,672 INFO [MessageDrivenInstancePool] Created
    12:39:32,672 INFO [JMSContainerInvoker] Creating
    12:39:32,672 INFO [JMSContainerInvoker] Created
    12:39:32,672 INFO [MessageDrivenContainer] Created
    12:39:32,672 INFO [EjbModule] Created
    12:39:32,688 INFO [EjbModule] Starting
    12:39:32,688 INFO [MessageDrivenContainer] Starting
    12:39:32,704 INFO [JMSContainerInvoker] Starting
    12:39:32,704 INFO [DLQHandler] Creating
    12:39:32,922 INFO [DLQHandler] Created
    12:39:32,922 ERROR [JMSContainerInvoker] Starting failed
    java.lang.ClassCastException
    at org.jboss.ejb.plugins.jms.JMSContainerInvoker.innerCreate(JMSContaine
    rInvoker.java:540)
    at org.jboss.ejb.plugins.jms.JMSContainerInvoker.startService(JMSContain
    erInvoker.java:579)
    at org.jboss.system.ServiceMBeanSupport.start(ServiceMBeanSupport.java:1
    92)
    at org.jboss.ejb.MessageDrivenContainer.startService(MessageDrivenContai
    ner.java:220)
    at org.jboss.system.ServiceMBeanSupport.start(ServiceMBeanSupport.java:1
    92)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
    java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
    sorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:324)
    at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBea
    nDispatcher.java:284)
    at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:549)
    at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceControl
    ler.java:966)
    at $Proxy11.start(Unknown Source)
    at org.jboss.system.ServiceController.start(ServiceController.java:392)
    at sun.reflect.GeneratedMethodAccessor6.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
    sorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:324)
    at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBea
    nDispatcher.java:284)
    at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:549)
    at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:177)

    (...)

    12:39:32,954 INFO [EjbModule] Started
    12:39:32,954 INFO [EJBDeployer] Deployed: file:/D:/jboss-3.2.1_tomcat-4.1.24/se
    rver/default/deploy/EJBModule.jar
    12:39:33,000 INFO [MainDeployer] Deployed package: file:/D:/jboss-3.2.1_tomcat-
    4.1.24/server/default/deploy/EJBModule.jar
    12:39:33,000 ERROR [URLDeploymentScanner] MBeanException: Exception in MBean ope
    ration 'checkIncompleteDeployments()'
    Cause: Incomplete Deployment listing:
    Packages waiting for a deployer:

    Incompletely deployed packages:

    MBeans waiting for classes:

    MBeans waiting for other MBeans:
    [ObjectName: jboss.j2ee:jndiName=local/MDBTest,service=EJB
    state: FAILED
    I Depend On:
    Depends On Me: java.lang.ClassCastException]


    Thanks

    Paulo




  • 63. Re: MQSeries/JBoss MDB/3rd Party Messaging
    Stephen Baishya Newbie

    pjrmoreira ,

    you need to add:

    <xa-connection>false<xa-connection>

    to the "<message-driven>" section of your jboss.xml file. JBoss expects an XAQueueConnectionFactory if you do not use this undocumented feature, and your JMS JNDI context contains a non-XA QueueConnectionFactory.

    Regards,

    Stephen Baishya

  • 64. Re: MQSeries/JBoss MDB/3rd Party Messaging
    Stephen Baishya Newbie

    Has anyone managed to overcome the issue with JBoss not liking an MQSeries queue to be "too full"? I have just upgraded to JBoss 3.2.1 and still get the following when I put 180+ messages onto the input queue for an MDB:

    12:43:13,406 ERROR [STDERR] java.lang.NullPointerException
    12:43:13,406 ERROR [STDERR] at com.ibm.mq.jms.MQSession.run(MQSession.java:807)
    12:43:13,406 ERROR [STDERR] at org.jboss.jms.asf.StdServerSession.run(StdServerSession.java:179)
    12:43:13,406 ERROR [STDERR] at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:732)
    12:43:13,422 ERROR [STDERR] at java.lang.Thread.run(Thread.java:536)

    Regards,

    Stephen Baishya

  • 65. Re: MQSeries/JBoss MDB/3rd Party Messaging
    pjrmoreira Newbie

    Stephen,

    After the change I'm still having the problem. I was looking to the JBoss log, and I found the following text:

    2003-06-10 14:33:17,640 DEBUG [org.jboss.ejb.plugins.jms.JMSContainerInvoker] Initializing
    2003-06-10 14:33:17,640 DEBUG [org.jboss.ejb.plugins.jms.JMSContainerInvoker] Looking up provider adapter: java:/DefaultJMSProvider
    2003-06-10 14:33:17,640 DEBUG [org.jboss.ejb.plugins.jms.JMSContainerInvoker] Provider adapter: org.jboss.jms.jndi.JBossMQProvider@a010ba
    2003-06-10 14:33:17,640 INFO [org.jboss.ejb.plugins.jms.DLQHandler] Creating
    2003-06-10 14:33:17,640 DEBUG [org.jboss.jms.jndi.JBossMQProvider] no provider url; connecting to local JNDI
    2003-06-10 14:33:17,640 DEBUG [org.jboss.jms.jndi.JBossMQProvider] created context: javax.naming.InitialContext@198ee2f
    2003-06-10 14:33:17,640 DEBUG [org.jboss.ejb.plugins.jms.DLQHandler] Using factory: org.jboss.mq.SpyXAConnectionFactory@13f5841
    2003-06-10 14:33:17,640 DEBUG [org.jboss.mq.GenericConnectionFactory] Handing out ClientIL: org.jboss.mq.il.jvm.JVMClientILService
    2003-06-10 14:33:17,640 DEBUG [org.jboss.ejb.plugins.jms.DLQHandler] Created connection: org.jboss.mq.SpyConnection@13d7254
    2003-06-10 14:33:17,640 DEBUG [org.jboss.mq.referenceable.SpyDestinationObjectFactory] SpyDestinationObjectFactory->getObjectInstance()
    2003-06-10 14:33:17,640 DEBUG [org.jboss.ejb.plugins.jms.DLQHandler] Using Queue: QUEUE.DLQ
    2003-06-10 14:33:17,640 INFO [org.jboss.ejb.plugins.jms.DLQHandler] Created
    2003-06-10 14:33:17,640 DEBUG [org.jboss.jms.jndi.JBossMQProvider] no provider url; connecting to local JNDI
    2003-06-10 14:33:17,640 DEBUG [org.jboss.jms.jndi.JBossMQProvider] created context: javax.naming.InitialContext@11d20d3
    2003-06-10 14:33:17,640 DEBUG [org.jboss.ejb.plugins.jms.JMSContainerInvoker] context: javax.naming.InitialContext@11d20d3
    2003-06-10 14:33:17,640 DEBUG [org.jboss.ejb.plugins.jms.JMSContainerInvoker] jndiSuffix: MQRequestQueue
    2003-06-10 14:33:17,640 DEBUG [org.jboss.ejb.plugins.jms.JMSContainerInvoker] Got destination type Queue for MDBTest
    2003-06-10 14:33:17,640 DEBUG [org.jboss.jms.ConnectionFactoryHelper] using connection factory: org.jboss.mq.SpyXAConnectionFactory@13f5841
    2003-06-10 14:33:17,640 DEBUG [org.jboss.jms.ConnectionFactoryHelper] using username/password: null/null
    2003-06-10 14:33:17,640 DEBUG [org.jboss.mq.GenericConnectionFactory] Handing out ClientIL: org.jboss.mq.il.jvm.JVMClientILService
    2003-06-10 14:33:17,640 DEBUG [org.jboss.jms.ConnectionFactoryHelper] created XAQueueConnection: org.jboss.mq.SpyXAConnection@1562c67
    2003-06-10 14:33:17,640 DEBUG [org.jboss.ejb.plugins.jms.JMSContainerInvoker] Using client id: null
    2003-06-10 14:33:17,640 ERROR [org.jboss.ejb.plugins.jms.JMSContainerInvoker] Starting failed

    Therefore, I think that the cause of the problem is that JBoss is getting a connection from the Default JMS Provider instead of using one from the MQ Provider. Do you know how can I change this behavior? I was wondering about how does JBoss know that it has to use the connection factory defined in the MQ JMS provider instead of using the Default JMS Provider.

    Thanks

    Paulo

  • 66. Re: MQSeries/JBoss MDB/3rd Party Messaging
    pjrmoreira Newbie

    I found the solution to my problem.

    Thanks to all of you

  • 67. Re: MQSeries/JBoss MDB/3rd Party Messaging
    Handerson Gomes Newbie

    Hey Paulo,

    Please, tell us the solution for this problem.
    I'm trying to do the same thing here.

    Thanks

    Handerson

  • 68. Re: MQSeries/JBoss MDB/3rd Party Messaging
    Angel Mario Newbie

    Hello,
    I solved my problem.
    The mistake was that I was using jboss-3.2.0_tomcat-4.1.24.
    I have try my configuration in jboss-3.2.1_tomcat-4.1.24, in jboss-3.2.2RC1_tomcat-4.1.24, and in jboss-4.0.0DR1_tomcat-4.1.24.
    And excluding in jboss-4.0.0DR1_tomcat-4.1.24, it run.

    I have to say that when I deploy my MQ MDB I recibe few warnings, but the MQ MDB run well.

    12:12:15,370 WARN [StdServerSessionPool] Using a non-XA QueueConnection. It will not be able to participate in a Global UOW
    12:12:15,380 WARN [StdServerSessionPool] Using a non-XA QueueConnection. It will not be able to participate in a Global UOW
    ...
    ...
    12:12:15,510 WARN [StdServerSessionPool] Using a non-XA QueueConnection. It will not be able to participate in a Global UOW


    Regards,

    Mario.

    P.D: I am going to try with <xa-connection>false<xa-connection> for these warns.

  • 69. Re: MQSeries/JBoss MDB/3rd Party Messaging
    Stephen Baishya Newbie

    The problem with MQSeries and "deep queues" seems to be fixed in 3.2.2RC1.

    Stephen Baishya

  • 70. Re: MQSeries/JBoss MDB/3rd Party Messaging
    Angel Mario Newbie

    Hello all,

    I have another question...

    I have running JBOSS+MQSeries, but when I stop Jboss and then I restart it, I get an error because the objects that I create using JMSAdmin have disappeared.

    How I could avoid this error?

    Regards.

    Mario.

  • 71. Re: MQSeries/JBoss MDB/3rd Party Messaging
    Stefano Maestri Expert

    I used config posted from Mario and others, but when I deploy an MDB I get this error:



    12:52:04,804 INFO [DLQHandler] Creating
    12:52:04,812 ERROR [DLQHandler] Initialization failed
    javax.jms.JMSException: Error creating the dlq connection: null
    at org.jboss.ejb.plugins.jms.DLQHandler.createService(DLQHandler.java:152)
    at org.jboss.system.ServiceMBeanSupport.create(ServiceMBeanSupport.java:158)
    at org.jboss.ejb.plugins.jms.JMSContainerInvoker.innerCreate(JMSContainerInvoker.java:394)
    at org.jboss.ejb.plugins.jms.JMSContainerInvoker.startService(JMSContainerInvoker.java:579)
    at org.jboss.system.ServiceMBeanSupport.start(ServiceMBeanSupport.java:192)
    at org.jboss.ejb.MessageDrivenContainer.startService(MessageDrivenContainer.java:220)
    at org.jboss.system.ServiceMBeanSupport.start(ServiceMBeanSupport.java:192)
    at sun.reflect.GeneratedMethodAccessor8.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:324)
    at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284)
    at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:549)
    at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:966)
    at $Proxy11.start(Unknown Source)
    at org.jboss.system.ServiceController.start(ServiceController.java:392)
    at sun.reflect.GeneratedMethodAccessor7.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:324)
    at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284)
    at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:549)
    at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:177)
    at $Proxy470.start(Unknown Source)
    at org.jboss.ejb.EjbModule.startService(EjbModule.java:329)
    at org.jboss.system.ServiceMBeanSupport.start(ServiceMBeanSupport.java:192)
    at sun.reflect.GeneratedMethodAccessor8.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:324)
    at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284)
    at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:549)
    at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:966)
    at $Proxy11.start(Unknown Source)
    at org.jboss.system.ServiceController.start(ServiceController.java:392)
    at sun.reflect.GeneratedMethodAccessor7.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:324)
    at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284)
    at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:549)


    Ideas?
    Thanks a lot for the attention.

    Stefano

  • 72. Re: MQSeries/JBoss MDB/3rd Party Messaging
    quentin Newbie

    Have you got this to go yet? I seem to be at the very same error.

  • 73. Re: MQSeries/JBoss MDB/3rd Party Messaging
    wardl Newbie

    What is the reliability of a MQSeries/JBoss implementation? I have just started playing with MQ 5.3/JBoss3.0. My application could be processing thousands of messages daily and reliability will be very important. Is this configuration up to the task?

    Would a MQSeries /WebLogic be any less sticky?

    Thanks for your opinions.

    Ward

  • 74. Re: MQSeries/JBoss MDB/3rd Party Messaging
    quentin Newbie

    Hard to say since I can't get it to work! I am sure its my mistake but I have spent way too much time on this and I can't get further than the error posted by the poster previous to me. What I can say is that configuration is far from straightforward. If its production then at the very least you'll need to have a tested out disaster recovery setup. You won't be able to get by with any "just install MQ and jboss" plan.