activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ChristineZ <christi...@duosp.co.za>
Subject Re: Integrating embedded brokers on JBoss
Date Mon, 07 Aug 2006 14:38:15 GMT

I found another way of dealing with the problem. Instead of using MBeans and
getting the SocketException, I'm adding the activemq-ra-4.0.1.rar file into
the deploy directory of JBoss and the panacya*.xml and panacya*.jar as well.

I changed the xml file so that all the topics and queues that I use are
created and the ConnectionFactory as well. It seems like it's binding the
ConnectionFactory into the JNDIView of JBoss:

16:33:37,705 INFO  [ConnectionFactoryBindingService] Bound ConnectionManager
'jboss.jca:service=ConnectionFactoryBinding,name=activemq/Connection
Factory' to JNDI name 'java:activemq/ConnectionFactory'

but I can't retrieve it.

<connection-factories>

   <tx-connection-factory>
      <jndi-name>activemq/QueueConnectionFactory</jndi-name>
      <xa-transaction/>
      <track-connection-by-tx/> <!-- Thanks to Adrian Brock for pointing
this one out! -->
      <rar-name>activemq-ra-4.0.1.rar</rar-name>
     
<connection-definition>javax.jms.QueueConnectionFactory</connection-definition>
     
<security-domain-and-application>JmsXARealm</security-domain-and-application>
   </tx-connection-factory>

   <tx-connection-factory> 
      <jndi-name>activemq/ConnectionFactory</jndi-name>
      <xa-transaction/>
      <track-connection-by-tx/> <!-- Thanks to Adrian Brock for pointing
this one out! -->
      <rar-name>activemq-ra-4.0.1.rar</rar-name>
     
<connection-definition>javax.jms.ConnectionFactory</connection-definition>
     
<security-domain-and-application>JmsXARealm</security-domain-and-application>
   </tx-connection-factory>
   
   <tx-connection-factory>
      <jndi-name>activemq/TopicConnectionFactory</jndi-name>
      <xa-transaction/>
      <track-connection-by-tx/> <!-- Thanks to Adrian Brock for pointing
this one out too! -->
      <rar-name>activemq-ra-4.0.1.rar</rar-name>
     
<connection-definition>javax.jms.TopicConnectionFactory</connection-definition>
     
<security-domain-and-application>JmsXARealm</security-domain-and-application>
   </tx-connection-factory>

   <mbean code="org.jboss.resource.deployment.AdminObject"
name="activemq.queue:name=outboundQueue">
      <attribute name="JNDIName">activemq/queue/outbound</attribute>
      <depends
optional-attribute-name="RARName">jboss.jca:service=RARDeployment,name='activemq-ra-4.0.1.rar'</depends>
      <attribute name="Type">javax.jms.Queue</attribute>
      <attribute name="Properties">
            PhysicalName=queue.outbound
      </attribute>
   </mbean>

   <mbean code="org.jboss.resource.deployment.AdminObject"
name="activemq.queue:name=statusQueue">
      <attribute name="JNDIName">queue/StatusQueue</attribute>
      <depends
optional-attribute-name="RARName">jboss.jca:service=RARDeployment,name='activemq-ra-4.0.1.rar'</depends>
      <attribute name="Type">javax.jms.Queue</attribute>
      <attribute name="Properties">
            PhysicalName=StatusQueue
      </attribute>
   </mbean>
   
   <mbean code="org.jboss.resource.deployment.AdminObject"
name="activemq.queue:name=commandQueue">
      <attribute name="JNDIName">queue/CommandQueue</attribute>
      <depends
optional-attribute-name="RARName">jboss.jca:service=RARDeployment,name='activemq-ra-4.0.1.rar'</depends>
      <attribute name="Type">javax.jms.Queue</attribute>
      <attribute name="Properties">
            PhysicalName=CommandQueue
      </attribute>
   </mbean>
   
   <mbean code="org.jboss.resource.deployment.AdminObject"
name="activemq.queue:name=messageQueue">
      <attribute name="JNDIName">queue/MessageQueue</attribute>
      <depends
optional-attribute-name="RARName">jboss.jca:service=RARDeployment,name='activemq-ra-4.0.1.rar'</depends>
      <attribute name="Type">javax.jms.Queue</attribute>
      <attribute name="Properties">
            PhysicalName=MessageQueue
      </attribute>
   </mbean>
   
   <mbean code="org.jboss.resource.deployment.AdminObject"
name="activemq.topic:name=eventsTopic">
      <attribute name="JNDIName">topic/Events</attribute>
      <depends
optional-attribute-name="RARName">jboss.jca:service=RARDeployment,name='activemq-ra-4.0.1.rar'</depends>
      <attribute name="Type">javax.jms.Topic</attribute>
      <attribute name="Properties">
            PhysicalName=Events
      </attribute>
   </mbean>
   
</connection-factories>

This is the exception I'm getting in JBoss, although I'm using
activemq/ConnectionFactory to look it up:

16:36:53,114 ERROR [MessageConnection] *** Cannot lookup ConnectionFactory
in JNDI
javax.naming.NameNotFoundException: activemq/QueueConnectionFactory
        at org.jboss.ha.jndi.TreeHead.lookup(TreeHead.java:223)
        at org.jboss.ha.jndi.HAJNDI.lookup(HAJNDI.java:134)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:585)
        at
org.jboss.ha.framework.interfaces.HARMIClient.invoke(HARMIClient.java:229)
        at $Proxy63.lookup(Unknown Source)
        at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:610)
        at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:572)
        at javax.naming.InitialContext.lookup(InitialContext.java:351)
        at za.co.duosp.messages.HaJndi.internalLookup(HaJndi.java:148)
        at za.co.duosp.messages.HaJndi.internalLookup(HaJndi.java:157)
        at za.co.duosp.messages.HaJndi.internalLookup(HaJndi.java:157)
        at za.co.duosp.messages.HaJndi.internalLookup(HaJndi.java:157)
        at za.co.duosp.messages.HaJndi.lookupHaObject(HaJndi.java:130)
        at
za.co.duosp.messages.MessageConnection.createConnection(MessageConnection.java:70)
        at
za.co.duosp.messages.MessageConnection.getConnection(MessageConnection.java:136)
        at za.co.duosp.messages.MsgSender.getSender(MsgSender.java:124)
        at za.co.duosp.messages.MsgSender.internalSendMsg(MsgSender.java:74)
        at za.co.duosp.messages.MsgSender.sendMessage(MsgSender.java:55)
        at
za.co.duosp.model.comms.persistant.CommandProxy.sendCommand(CommandProxy.java:51)
        at
za.co.duosp.model.vehicle.CommsServerImpl.sendMessage(CommsServer.java:160)
        at
za.co.duosp.model.vehicle.CommsServer.sendMessage(CommsServer.java:66)
        at
za.co.duosp.model.vehicle.Datalogger.getPositionNow(Datalogger.java:362)
        at
za.co.duosp.web.event.FleetSearchVehicleAction.update(FleetSearchVehicleAction.java:84)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:585)
        at
za.co.duosp.web.subactions.StaticMethodSubAction.actionExecute(StaticMethodSubAction.java:72)
        at
za.co.duosp.web.struts.SubActionAction.executeActions(SubActionAction.java:238)
        at
za.co.duosp.web.struts.SubActionAction.actionExecute(SubActionAction.java:191)
        at za.co.duosp.web.struts.BaseAction.execute(BaseAction.java:105)
        at
org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:421)
        at
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:226)
        at
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1164)
        at
org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:415)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
        at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
        at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
        at za.co.duosp.web.filters.ZipFilter.doFilter(ZipFilter.java:53)
        at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
        at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
        at
za.co.duosp.web.filters.HibernateFilter.doFilter(HibernateFilter.java:63)
        at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
        at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
        at
org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:81)
        at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
        at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
        at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
        at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
        at
org.jboss.web.tomcat.security.CustomPrincipalValve.invoke(CustomPrincipalValve.java:39)
        at
org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:159)
        at
org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:59)
        at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
        at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
        at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
        at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
        at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:856)
        at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:744)
        at
org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
        at
org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112)
        at java.lang.Thread.run(Thread.java:595)

I'm using JBoss 4.0.3 and ActiveMQ 4.0.1
-- 
View this message in context: http://www.nabble.com/Integrating-embedded-brokers-on-JBoss-tf2026378.html#a5686117
Sent from the ActiveMQ - User forum at Nabble.com.


Mime
View raw message