1 Reply Latest reply on Apr 22, 2012 2:53 AM by aarti R

    Does JBoss-Messaging have an implementation of an HTTPConnectionFactory.?

    aarti R Newbie

      We have a standalone client which is a message consumer on the queue configured in jboss 5.1.2

      . In earlier version we used HTTPServerILService mbean with jbossmq . C:\jboss-4.2.2.GA\server\default\deploy\jms\jbossmq-httpil.sar\META-INF We had the url specified there and would create a queue connection to remote queue. How do i connect to remote queue with jboss messaging. Do we have something equivalent here.

       

      This is what we used to do from remote client on jboss 4.2.2 with jboss mq to create a queue connection factory.

       

      urlName="http://test:8080/connect/broker/jms?objectType=connectionFactory"

      URL url = new URL(urlName);

      HttpURLConnection connection = null;

      connection = (HttpURLConnection) url.openConnection();

       

      Any help on how to achieve this will be greatly appreciated.

        • 1. Re: Does JBoss-Messaging have an implementation of an HTTPConnectionFactory.?
          aarti R Newbie

          Ok am doing an jndi lookup from my client to create queue connection and queue.

           

          Here is code and i get the exception on createQueueConnection()

          log

          .info("Connecting to remote print job queue....."

          );

           

          InitialContext ic = getInitialContext();

           

           

          log.info("Got ic....."

          );

           

          //connectionFactory = getConnectionFactory();

           

          // get connection factory

           

          connectionFactory

          = (QueueConnectionFactory) ic

          .lookup(

          "ConnectionFactory"

          );

           

           

          log.info("Got conn factory....."

          );

           

          // get connection

           

          connection = connectionFactory

          .createQueueConnection(); // At this line i see the below exception.

           

          org.jboss.jms.exception.MessagingNetworkFailureException
          at org.jboss.jms.client.delegate.DelegateSupport.handleThrowable(DelegateSupport.java:240)
          at org.jboss.jms.client.delegate.ClientConnectionFactoryDelegate.org$jboss$jms$client$delegate$ClientConnectionFactoryDelegate$createConnectionDelegate$aop(ClientConnectionFactoryDelegate.java:208)
          at org.jboss.jms.client.delegate.ClientConnectionFactoryDelegate$createConnectionDelegate_N3019492359065420858.invokeNext(ClientConnectionFactoryDelegate$createConnectionDelegate_N3019492359065420858.java)
          at org.jboss.jms.client.container.StateCreationAspect.handleCreateConnectionDelegate(StateCreationAspect.java:80)
          at org.jboss.aop.advice.org.jboss.jms.client.container.StateCreationAspect0.invoke(StateCreationAspect0.java)
          at org.jboss.jms.client.delegate.ClientConnectionFactoryDelegate$createConnectionDelegate_N3019492359065420858.invokeNext(ClientConnectionFactoryDelegate$createConnectionDelegate_N3019492359065420858.java)
          at org.jboss.jms.client.delegate.ClientConnectionFactoryDelegate.createConnectionDelegate(ClientConnectionFactoryDelegate.java)
          at org.jboss.jms.client.JBossConnectionFactory.createConnectionInternal(JBossConnectionFactory.java:205)
          at org.jboss.jms.client.JBossConnectionFactory.createQueueConnection(JBossConnectionFactory.java:101)
          at org.jboss.jms.client.JBossConnectionFactory.createQueueConnection(JBossConnectionFactory.java:95)
          at com.clearorbit.connect.broker.ClientEngine.connect(ClientEngine.java:224)
          at com.clearorbit.connect.broker.ClientEngine.startup(ClientEngine.java:167)
          at com.clearorbit.connect.broker.ClientEngine.<init>(ClientEngine.java:111)
          at com.clearorbit.connect.broker.ClientEngine.<init>(ClientEngine.java:81)
          at com.clearorbit.connect.broker.ui.ConfigurationManagerFrame.initClientEngine(ConfigurationManagerFrame.java:162)
          at com.clearorbit.connect.broker.ui.ConfigurationManagerFrame.getInstance(ConfigurationManagerFrame.java:146)
          at com.clearorbit.connect.broker.ui.ConfigurationManager.build(ConfigurationManager.java:124)
          at com.clearorbit.connect.broker.ui.ConfigurationManager.<init>(ConfigurationManager.java:61)
          at com.clearorbit.connect.broker.ui.ConfigurationManager.<init>(ConfigurationManager.java:70)
          at com.clearorbit.connect.broker.ui.ConfigurationManager.main(ConfigurationManager.java:184)
          at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
          at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
          at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
          at java.lang.reflect.Method.invoke(Unknown Source)
          at com.clearorbit.connect.broker.ClientMain.executeClient(ClientMain.java:43)
          at com.clearorbit.connect.broker.ClientMain.main(ClientMain.java:59)
          Caused by: org.jboss.remoting.CannotConnectException: Error setting up client lease upon performing connect.
          at org.jboss.remoting.Client.connect(Client.java:1830)
          at org.jboss.remoting.Client.connect(Client.java:678)
          at org.jboss.jms.client.remoting.JMSRemotingConnection$1.run(JMSRemotingConnection.java:374)
          at java.security.AccessController.doPrivileged(Native Method)
          at org.jboss.jms.client.remoting.JMSRemotingConnection.start(JMSRemotingConnection.java:368)
          at org.jboss.jms.client.delegate.ClientConnectionFactoryDelegate.org$jboss$jms$client$delegate$ClientConnectionFactoryDelegate$createConnectionDelegate$aop(ClientConnectionFactoryDelegate.java:175)
          ... 24 more
          Caused by: java.lang.NoClassDefFoundError
          at org.jboss.remoting.ConnectionValidator.start(ConnectionValidator.java:797)
          at org.jboss.remoting.ConnectionValidator.addConnectionListener(ConnectionValidator.java:404)
          at org.jboss.remoting.Client.addConnectionListener(Client.java:504)
          at org.jboss.remoting.MicroRemoteClientInvoker.establishLease(MicroRemoteClientInvoker.java:534)
          at org.jboss.remoting.Client.setupClientLease(Client.java:1964)
          at org.jboss.remoting.Client.connect(Client.java:1826)
          ... 29 more