5 Replies Latest reply on Jan 16, 2014 3:43 PM by Harish Maridi

    No Hornetq in jboss eap 6.0.1 alpha1

    Harish Maridi Newbie

      Hi,

       

      I need to implement an application which uses JMS (Connection Factory, and a Topic), version given to us is Jboss eap 6.0.1 aplha1 which is not included with hornetq.

      We are only using standalone mode.

      Is there any way that I can do JMS configurations without hornetq or how can I get hornetq for 6.0.1 alpha1? below is JBoss_Home folder structure. I did deployed our application to standalone/deployments. I created modules. Application working fine except JMS part. I am trying to migrate the application from Jboss 4.1 to 6.0.1 alpha1.

      I am using standalone.xml for my data source configurations. Please let me know how to do a JMS configuration on this server? I am not an expert on Jboss, please provide assistance.

      jbossFolderStruc.jpg

      Any help is appreciated.

      Thanks,

      HM

        • 1. Re: No Hornetq in jboss eap 6.0.1 alpha1
          jaikiran pai Master

          What do you mean when you say HornetQ is not present? The standalone.xml is the default profile for standalone mode and that one doesn't have the messaging/hornetq subsystem enabled. But the standalone-full.xml does have the messaging/hornetq subsystem. You have to start the server and point it to use the standalone-full.xml, which can be done by:

           

          ./standalone.sh -c standalone-full.xml

           

          (if you are using Windows OS, then instead of standalone.sh, the command is standalone.bat).

          • 2. Re: No Hornetq in jboss eap 6.0.1 alpha1
            Wolf-Dieter Fink Master

            In addition to jaikiran.jai_forums2005.yahoo.co.in you might have a look to the helloworld-jms quickstart where you find more informations and a CLI script to configure a JMS queue.

            1 of 1 people found this helpful
            • 3. Re: Re: No Hornetq in jboss eap 6.0.1 alpha1
              Harish Maridi Newbie

              Hi Jai Kiran,

               

              I am using standalone-full.xml now. I entered following entries in standalone-fill.xml

               

              <connection-factory name="BrokerTopicConnectionFactory">

                <connectors>

                    <connector-ref connector-name="netty"/>

                </connectors>

                <entries>

                    <entry name="java:jboss/exported/jms/cn=BrokerTopicConnectionFactory"/>

                </entries>

              </connection-factory>

              <jms-destinations>

              <jms-topic name="poTopic">

                  <entry name="java:jboss/exported/jms/cn=poTopic"/>

              </jms-topic>

              </jms-destinations>

               

              and I am able to see my connection factory and topic in the admin console.

              jms.jpg

               

              my code that refers connection factory is

              Object tmp = iniCtx.lookup("cn=BrokerTopicConnectionFactory");

              TopicConnectionFactory tcf = (TopicConnectionFactory) tmp;

               

              I am getting following error at second line of above code:

              09:48:29,948 ERROR [stderr] (http-dropbox.com/127.0.0.1:8080-1) java.lang.ClassCastException: javax.naming.Reference cannot be cast to javax.jms.TopicConnectionFactory

              09:48:29,949 ERROR [stderr] (http-dropbox.com/127.0.0.1:8080-1)    at com.av.mobi.jca.esb.em.gen.GenConnector$AsyncSampleOrderDelegate.publishRequest(GenConnector.java:915)

              09:48:29,950 ERROR [stderr] (http-dropbox.com/127.0.0.1:8080-1)    at com.av.mobi.jca.esb.em.genesis.GenConnector.doSampleOrder(GenConnector.java:734)

               

              I attached detailed log, there are some start up errors also.

              Application dependencies are:

              <module name="com.av.json" export="true"/>

                  <module name="com.av.axis2-adb" export="true"/>

                  <module name="com.av.axiom-api" export="true"/>

                  <module name="com.av.log4j" export="true"/>

                  <module name="com.av.axis2-kernel" export="true"/>

                  <module name="com.av.connector" export="true"/>

                  <module name="com.av.geronimo-jms" export="true" />

                  <module name="com.av.jbossall-client" export="true" />

                  <module name="sun.jdk" export="true" />

                

                  <module name="com.av.concurrent" />

                  <module name="com.av.ejb3-persistence" />

                  <module name="com.av.jboss-aop" />

                  <module name="com.av.jboss-common-core" />

                  <module name="com.av.jboss-ejb3-common" />

                  <module name="com.av.jboss-ejb3-core" />

                  <module name="com.av.jboss-ejb3-proxy-clustered" />

                  <module name="com.av.jboss-ejb3-proxy-impl" />

                  <module name="com.av.jboss-ejb3-proxy-spi-client" />

                  <module name="com.av.jboss-ejb3-security-client" />

                  <module name="com.av.jboss-integration" />

                  <module name="com.av.jboss-javaee" />

                  <module name="com.av.jboss-logging-spi" />

                  <module name="com.av.jboss-remoting" />

                  <module name="com.av.jboss-remoting-aspects" />

                  <module name="com.av.jboss-security-spi" />

                  <module name="com.av.jbosssx" />

                  <module name="com.av.jboss-transaction-aspects" />

                  <module name="com.av.jnpserver" />

               

              Please let me know what is wrong, or why am I getting reference object instead of connection factory object.

               

              Thanks,

              HM

              • 4. Re: No Hornetq in jboss eap 6.0.1 alpha1
                Harish Maridi Newbie

                Hi Jaikiran,

                 

                One more thing that I found out from the displaying the object that I got from InitialContext.lookup("myconnectionfactory").


                Working environment is getting:

                com.webmethods.jms.impl.WmTopicConnectionFactoryImpl[clientID=null clientGroup=JMSClient brokerHost=ccc959hhhjjj:6849 brokerName=NA-WMBroker-TEST2 brokerList=null keystore=null truststore=null readOnly=false]

                 

                My local is returning completly different one:

                Reference Class Name: com.webmethods.jms.impl.WmTopicConnectionFactoryImpl

                Type: com.webmethods.jms.impl.WmTopicConnectionFactoryImpl

                Content: <?xml version="1.0" encoding="UTF-8"?><topic-connection-factory version="3.0">

                <properties>

                <entry key="application" value="JMS"/>

                <entry key="brokerListOrder" value="RANDOM"/>

                <entry key="brokerHost" value="ccc959hhhjjj:6849"/>

                <entry key="sslEncrypted" value="false"/>

                <entry key="brokerName" value="NA-WMBroker-TEST2"/>

                <entry key="clientGroup" value="JMSClient"/>

                </properties>

                </topic-connection-factory>

                 

                This is the reason for classcast exception, but root cause is still unknown. any ideas please let me know. seems that it is related to mismatching jars or classes. Please shed some light.

                 

                Thanks,

                HM

                • 5. Re: No Hornetq in jboss eap 6.0.1 alpha1
                  Harish Maridi Newbie

                  I am able to fix this issue with dependency modification of jars. I started having different issue, which I will post in another post.

                   

                  Thanks for help.

                  HM