OSDir


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Artemis 2.4.0 + JBoss 7.2 JMS Bridge


To my knowledge, the only jar which should be required is
artemis-jms-client-all.jar as the whole point of this jar is to encapsulate
everything which a JMS client would need.  Jetty implementation jars should
definitely not be required to instantiate org.apache.activemq.artemis.
jndi.ActiveMQInitialConnectionFactory.

I believe your problem here is that you're using this name:

  org.apache.activemq.artemis.jndi.ActiveMQInitialConnectionFactory

When you should be using this name:

  org.apache.activemq.artemis.jndi.ActiveMQInitialContextFactory

The class org.apache.activemq.artemis.jndi.ActiveMQInitialConnectionFactory
doesn't exist in the Artemis code-base which is why the classload can't
find it.


Justin


On Sat, Jun 9, 2018 at 2:33 AM, acefael <ese@xxxxxxxxxx> wrote:

> Hello,
>
> my goal ist to setup a bridge (any bridge really) between a JBoss 7.2
> (HornetQ 2.3.0.RC1) and Artemis 2.4.0. Currently I am trying the jms
> bridge.  Configuration in JBoss' standalone.xml is
>
> <jms-bridge name="artemis-bridge" module="org.activemq.artemis">
>   <source>
>     <connection-factory name="java:/ConnectionFactory"/>
>     <destination name="/jms/queue/name"/>
>   </source>
>   <target>
>     <connection-factory name="CF"/>
>     <destination name="testQueue"/>
>     <context>
>       <property key="java.naming.factory.initial"
> value="org.apache.activemq.artemis.jndi.ActiveMQInitialConnectionFacto
> ry"/>
>       <property key="java.naming.provider.url" value="tcp://
> 127.0.0.1:61616"/>
>       <property key="connectionFactory.CF" value="tcp://127.0.0.1:61616"
> />
>       <property key="queue.testQueue" value="testQueue" />
>     </context>
>   </target>
>   <quality-of-service>AT_MOST_ONCE</quality-of-service>
>   <failure-retry-interval>500</failure-retry-interval>
>   <max-retries>1</max-retries>
>   <max-batch-size>500</max-batch-size>
>   <max-batch-time>500</max-batch-time>
>   <add-messageID-in-header>true</add-messageID-in-header>
> </jms-bridge>
>
> It builds on the 'org.activemq.artemis' module, which I built myself.
> What artemis jars should really go in the module?
> artemis-jms-client-all.jar is not enough.  I have been adding jars
> from artemis' lib/ directory and JBoss could not instantiate
> ActiveMQInitialConnectionFactory, until I added the jetty jar too.
> After that, the stack trace shows me that somehow the initial context
> factory from jetty is used, which understandably is not able to look
> up things in JBoss' JNDI tree.
>
> Any hints on how to get this to work are indeed much appreciated.
> I've been trying roundabout a day now.
>
> Cheers
>