3 Replies Latest reply on Nov 2, 2001 1:56 PM by mkaseman

    MDB and reconnecting

    konrad.kaminski

      I already posted it at jboss-dev but since there hasn't been any answer so far maybe someone here will answer it.

      Hi!

      I'm using JBoss 2.4.3 and MDB's, which are connected to MQSeries. I found out that when MQSeries is going down the MDB is not trying to reconnect. The problem is that in org.jboss.ejb.plugins.jms.JMSContainerInvoker.ExceptionListenerImpl the notStoped (which should probably be notStopped anyway) variable is always set to false. The comment, in which it's set to true (at declaration time), should probably be removed (that is, notStoped should be set to true). I also think that the time between reconnecting trials should be somehow configured (now it's fixed to 10 seconds).

      I also have another problem, which I think is more difficult (this should probably go to jboss-user, but since I'm here...). At deployment time if JMS server (MQSeries in my case) is not running the MDB will not deploy and therefore the whole application will not deploy at all. Is there any simple solution to that problem?

      Thanks, Konrad Kami?ski

        • 1. Re: MDB and reconnecting

          Here's the mail from dev:

          Hi!

          >I'm using JBoss 2.4.3 and MDB's, which are connected to MQSeries. I
          >found out that when MQSeries is going down the MDB is not trying to
          >reconnect. The problem is that in
          >org.jboss.ejb.plugins.jms.JMSContainerInvoker.ExceptionListenerImpl the
          >notStoped (which should probably be notStopped) variable is always set
          >to false. The comment, in
          >which it's set to true (at declaration time), should probably be
          >removed
          >(that is, notStoped should be set to true).

          Yes, ofcourse, and it was coded that way and worked like a charm. Going
          through the CVS I see that Jason Dillon suddenly changed that. I don't
          know why (why Dillon?) and I have not seen it until know. I will fix it
          soon.

          >I also think that the time
          >between reconnecting trials
          >should be somehow configured (now it's fixed to 10 seconds).

          I'll ad that to the feature to do list.

          >I also have another problem, which I think is more difficult (this
          >should probably go to jboss-user, but since I'm here...). At deployment
          >time if JMS server (MQSeries in
          >my case) is not running the MDB will not deploy and therefore the whole
          >application will not deploy at all. Is there any simple solution to
          >that problem?

          Well, that would in my opinion have to be an optional behaviour
          configured in the advanced container section, since this feature will
          lead to great chances of not correctly reporting errors.

          Please contribute the code to do this if you feel strongly for it.


          //Peter
          >Thanks, Konrad Kamiñski

          • 2. Re: MDB and reconnecting

            It's now fixed both in MAIN and Branch_2_4.

            //Peter

            • 3. Re: MDB and reconnecting
              mkaseman

              Maybe you can give me a little insight into getting MQSeries to work with JBOSS 2.4.3. I have a sample JBOSS.JCML file from 2.4.0, that doesn't seem to work with 2.4.3. When I try to connet using this code snippet

              factory = (QueueConnectionFactory)ctx.lookup( qcfLookup );

              I get an error message,
              com.eds.mtv.jms.jboss.MQJMSIVT
              Looing up topic/testTopic worked fine
              Retrieving a QueueConnectionFactory from JNDI
              QueueConnectionFactory error: javax.naming.NameNotFoundException: ivtQCF not bound
              at sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(StreamRemoteCall.java:245)
              at sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCall.java:220)
              at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:122)
              at org.jnp.server.NamingServer_Stub.lookup(Unknown Source)
              at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:349)
              at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:333)
              at javax.naming.InitialContext.lookup(InitialContext.java:350)
              at com.eds.mtv.jms.jboss.MQJMSIVT.getConnectionFactoryFromJNDI(MQJMSIVT.java:93)
              at com.eds.mtv.jms.jboss.MQJMSIVT.(MQJMSIVT.java:71)
              at com.eds.mtv.jms.jboss.MQJMSIVT.main(MQJMSIVT.java:34)



              DefaultJMSProvider
              org.jboss.jms.jndi.MQSeriesProvider
              XAQueueConnectionFactory
              XATopicConnectionFactory