[mq-users] Need help to create an internal bridge to forward a queue to a topic

  • From: <ftz@...>
  • To: users@...
  • Subject: [mq-users] Need help to create an internal bridge to forward a queue to a topic
  • Date: Wed, 6 Feb 2013 14:44:59 +0000 (GMT)

I'm trying to set-up an internal bridge from a queue to a topic and I'm
getting a "Lookup failed" exception.

Here's some more details:

Env: GlassFish 3.1.2.2 (fresh install) and embedded JMS host

Create queue connection pool (javax.jms.QueueConnectionFactory): pool1
(jndi and pool name)
Create topic connection pool (javax.jms.TopicConnectionFactory): pool2
(jndi and pool name)
Create queue: queue1 (jndi and queue name)
Create topic: queue1 (jndi and queue name)
The domain.xml is configured as follows:

 <jms-service default-jms-host="default_JMS_host">
    <jms-host host="localhost" name="default_JMS_host"
lazy-init="false">
        <property name="imq.bridge.enabled" value="true"></property>
    <property name="imq.bridge.admin.user" value="admin"></property>
        <property name="imq.bridge.admin.password"
value="admin"></property>
        <property name="imq.bridge.bridge1.type"
value="jms"></property>
        <property name="imq.bridge.activelist"
value="bridge1"></property>
        <property name="imq.bridge.bridge1.xmlurl"
value="file:///c:/tmp/bridge.xml"></property>
    </jms-host>
  </jms-service>
And the bridge.xml file:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE jmsbridge SYSTEM "sun_jmsbridge_1_0.dtd">
<jmsbridge name="bridge1">
  <link name="link1">
    <source connection-factory-ref="pool1" destination-ref="queue1">
    </source>
    <target connection-factory-ref="pool2" destination-ref="topic1">
    </target>
  </link>
  <connection-factory ref-name="pool1" lookup-name="pool1"/> 
  <connection-factory ref-name="pool2" lookup-name="pool2" />
  <destination ref-name="queue1" name="queue1" type="queue"
lookup-name="queue1" />
  <destination ref-name="topic1" name="topic1" type="topic"
lookup-name="topic1" />
</jmsbridge>
EXCEPTION:

[01/Feb/2013:16:14:56 CAT] WARNING [B2217]: Failed to start bridge
service manager: javax.naming.NamingException: Lookup failed for
'pool1' in
SerialContext[myEnv={java.naming.factory.initial=com.sun.enterprise.nam
ing.impl.SerialInitContextFactory,
java.naming.factory.state=com.sun.corba.ee.impl.presentation.rmi.
JNDIStateFactoryImpl,
java.naming.factory.url.pkgs=com.sun.enterprise.naming} [Root exception
is javax.naming.NameNotFoundException: pool1 not found] at
com.sun.enterprise.naming.impl.SerialContext.lookup(SerialContext.java:
518) at
com.sun.enterprise.naming.impl.SerialContext.lookup(SerialContext.java:
455) at javax.naming.InitialContext.lookup(InitialContext.java:411) at
javax.naming.InitialContext.lookup(InitialContext.java:411) at
com.sun.messaging.bridge.service.jms.JMSBridge.createConnectionFactory(
JMSBridge.java:513) at
com.sun.messaging.bridge.service.jms.JMSBridge.createLink(JMSBridge.jav
a:333) at
com.sun.messaging.bridge.service.jms.JMSBridge.init(JMSBridge.java:227)
at
com.sun.messaging.bridge.service.jms.BridgeImpl.start(BridgeImpl.java:1
25) at
com.sun.messaging.bridge.BridgeServiceManagerImpl.startBridge(BridgeSer
viceManagerImpl.java:447) at
com.sun.messaging.bridge.BridgeServiceManagerImpl.start(BridgeServiceMa
nagerImpl.java:255) at
com.sun.messaging.jmq.jmsserver.Broker._start(Broker.java:1548) at
com.sun.messaging.jmq.jmsserver.Broker.start(Broker.java:456) at
com.sun.messaging.jmq.jmsserver.BrokerProcess.start(BrokerProcess.java:
164) at
com.sun.messaging.jmq.jmsserver.DirectBrokerProcess.start(DirectBrokerP
rocess.java:92) at
com.sun.messaging.jmq.jmsclient.runtime.impl.BrokerInstanceImpl.start(B
rokerInstanceImpl.java:206) at
java.lang.reflect.Method.invoke(Method.java:601) at
com.sun.enterprise.glassfish.bootstrap.GlassFishMain.main(GlassFishMain
.java:97) at
com.sun.enterprise.glassfish.bootstrap.ASMain.main(ASMain.java:55)
Caused by: javax.naming.NameNotFoundException: pool1 not found at
com.sun.enterprise.naming.impl.TransientContext.doLookup(TransientConte
xt.java:248)


What am I missing? 

Thank you!


[mq-users] Need help to create an internal bridge to forward a queue to a topic

ftz 02/06/2013
Terms of Use; Privacy Policy; Copyright ©2013-2015 (revision 20150226.965aeb8)
 
 
Close
loading
Please Confirm
Close