4 Replies Latest reply on Apr 14, 2004 5:44 PM by jason1

    Which factory for HA-JMS from Java client?

      I get the following exception using HAILXAConnectionFactory or HAILConnectionFactory from a remote Java client. When I add -Djava.security.manager, I cannot even connect to the server via the HA-JNDI Context.

      Please advise on which connection factory JNDI name to use from 3.2.4RC1.

      tia

      javax.naming.NamingException: Invalid reference. Error: org.jboss.mq.il.ha.HAILServerIL (no security manager: RMI class loader disabled)
      at org.jboss.mq.referenceable.ObjectRefAddr.extractObjectRefFrom(ObjectRefAddr.java:82)
      at org.jboss.mq.referenceable.SpyConnectionFactoryObjectFactory.getObjectInstance(SpyConnectionFactoryObjectFactory.java:48)
      at javax.naming.spi.NamingManager.getObjectInstance(Unknown Source)
      at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:620)
      at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:507)
      at javax.naming.InitialContext.lookup(Unknown Source)
      at cdot.util.ServiceLocator.getTopicConnectionFactory(ServiceLocator.java:323)
      at cdot.util.ServiceLocator.getTopicResources(ServiceLocator.java:389)
      at cdot.util.TopicReceiver.init(TopicReceiver.java:89)
      at cdot.ctms.layer.messaging.test.TopicListener.start(TopicListener.java:106)
      at cdot.ctms.layer.messaging.test.TopicListener.main(TopicListener.java:93)

        • 1. Re: Which factory for HA-JMS from Java client?
          abhaybadhe

          try XAConnectionFactory

          • 2. Re: Which factory for HA-JMS from Java client?

            I connect fine with UIL2ConnectionFactory and XAConnectionFactory, but have other problems because I don't think these are meant for clustered JMS. For instance, here is the behavior I see using these connection factories.

            My scenario is this:
            - two clustered servers (3.2.4RC1)
            - client uses basic clustered, jndi.properties for HA (e.g., no java.provider.url set)
            - start a Java client as a topic subscriber w/ an ExceptionListener that attempts to re-connect upon failure
            - when the topic subscriber connects, I see topic/testTopic AllSubscriptionsCount=1 on the non-HAILSingleton (this seems odd to me, but I don't know the semantics of connecting in this new, HAIL env)
            - when I shutdown the server w/ the subscriber attached to it, the ExceptionListener gets notified, but cannot reconnect to the other clustered server (the one that is actually the HAILSingleton!!)
            - Trying to reconnect, I get this error:
            org.jboss.mq.SpyJMSException: Cannot authenticate user; - nested throwable: (java.net.ConnectException: Connection refused: connect)

            Has something has been added to the latest src drop that resolves:
            1. connecting to HAIL from a Java client
            2. re-connecting upon failure using ExceptionListener

            • 3. Re: Which factory for HA-JMS from Java client?

              If you'd bothered to look for previous topics on the subject you would have
              learnt that HAIL is not supported outside the jboss VM.

              You would also have learnt that there is an updated version in CVS which will
              be released in 3.2.4 and is documented on the wiki.

              Regards,
              Adrian

              • 4. Re: Which factory for HA-JMS from Java client?

                Actually, before posting this thread I bothered to...

                1. search every forum and only found information pertaining to this problem on the JMS TODO forum, which was not helpful in determining exactly what is in the latest src drop.

                2. to review all release notes on the Wiki. Perhaps, I did not interpret them correctly.

                Regardless, I downloaded April 13th nightly drop of 3.2.4RC2 sourcecode, built it, tested it with my same classes and everything is golden!

                I would advise anyone interested in HAIL JMS to only use a version built after Apr. 13th. It works great.