Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

WL6.1 SP3: How to Properly configure the JMS Messaging Bridge

305 views
Skip to first unread message

Anil Arora

unread,
Sep 11, 2002, 8:40:07 PM9/11/02
to

I've been having all sorts of problems configuring a JMS Message Bridge between
two WL 6.1 SP3 Servers. I got a hold of CR081511.jar and CR081404 as recommended
by some people on this newsgroup. My configuration is as follows. Two WL servers
(one primary, one secondary) with a JMS Server set up, a JMS Topic (sourcing/DataCacheTopic),
and a TopicConnectionFactory (sourcing/TopicConnectionFactory). On both servers
I have deployed a message driven bean that listens on the sourcing/DataCacheTopic.
Both machines have a user "system" with the password "password" in the "Administrator"
group.
Ok...here's the part that is difficult. I'm trying to set up a message bridge
between the two so that topic events from the primary will be sent to the secondary.
I am using the jms-notran-adp.rar adapter. I created a SourceMessageBridgeDestination
pointing to the primary machine information (AdapterJNDIName=eis.jms.WLSConnectionFactoryJNDINoTX,
URL=t3://localhost:9001, ConnectionFactoryJNDIName=sourcing/TopicConnectionFactory,
DestinationJNDIName=sourcing/DataCacheTopic). I created a TargetMessageBridgeDestination
pointing to the secondary machine information (AdapterJNDIName=eis.jms.WLSConnectionFactoryJNDINoTX,
URL=t3://localhost:8001, ConnectionFactoryJNDIName=sourcing/TopicConnectionFactory,
DestinationJNDIName=sourcing/DataCacheTopic).
Then I created a SourcingMessagingBridge where the source was SourceMessageBridgeDestination
and the target was TargetMessageBridgeDestination. QoS is Duplicate-Okay, QoS
Degradation is true, Async Mode Enabled, Durability Enabled.
Seems simple enough, right? Well, I start up the primary server, with no problem.
Then I start up the secondary server, I see the following:

<Sep 11, 2002 5:23:21 PM PDT> <Info> <JMS> <User connection factory "SourcingTopicConnectionFactory"
is started.>
<Sep 11, 2002 5:23:21 PM PDT> <Info> <JMS> <JMSServer "SourcingJMSServer", no
persistent store configured.>
<Sep 11, 2002 5:23:22 PM PDT> <Info> <JMS> <JMSServer "SourcingJMSServer", configured
no session pools.>
<Sep 11, 2002 5:23:22 PM PDT> <Info> <JMS> <JMSServer "SourcingJMSServer" is started.>
<Sep 11, 2002 5:23:22 PM PDT> <Info> <Connector> <Initializing connection pool
for resource adapter Weblogic Messaging Bridge Adapter (No TX).>
<Sep 11, 2002 5:23:22 PM PDT> <Warning> <Connector> << Weblogic Messaging Bridge
Adapter (No TX) > Connection Pool has been initialized with no connections.>
<Sep 11, 2002 5:23:22 PM PDT> <Info> <Connector> << Weblogic Messaging Bridge
Adapter (No TX) > Connection Pool initialization has completed successfully.>
<Sep 11, 2002 5:23:22 PM PDT> <Info> <J2EE> <Deployed : jms-notran-adp>
<Sep 11, 2002 5:23:23 PM PDT> <Info> <EJB> <EJB Deploying file: cacheejb.jar>
<Sep 11, 2002 5:23:24 PM PDT> <Info> <EJB> <EJB Deployed EJB with JNDI name sourcing/cacheWorkerMessageBean.>
..
<Sep 11, 2002 5:23:27 PM PDT> <Info> <MessagingBridge> <Messaging Bridge "SourcingMessagingBridge"
has been successfully deployed.>
<Sep 11, 2002 5:23:27 PM PDT> <Info> <MessagingBridge> <Bridge "SourcingMessagingBridge"
suceesfully found the two adapters configured for it.>
<Sep 11, 2002 5:23:27 PM PDT> <Info> <MessagingBridge> <Bridge "SourcingMessagingBridge"
is getting the connections to the two adapters.>
<Sep 11, 2002 5:23:27 PM PDT> <Info> <Connector> <Unable to locate context: java:/comp/env/wls-connector-resref>
<Sep 11, 2002 5:23:27 PM PDT> <Info> <Connector> <Unable to determine Resource
Principal for Container Managed Security Context.>
<Sep 11, 2002 5:23:27 PM PDT> <Info> <Connector> <Unable to locate context: java:/comp/env/wls-connector-resref>
<Sep 11, 2002 5:23:27 PM PDT> <Info> <Connector> <Unable to determine Resource
Principal for Container Managed Security Context.>
..
<Sep 11, 2002 5:23:29 PM PDT> <Info> <Connector> <There was/were 1 physical conn
ection(s) created with the following Meta Data: Product name of EIS instance:
Ja
va Messaging Service Product version of EIS instance: 1.0.2 Maximum number of
co
nnections supported from different processes: 0 User name for connection: null>

<Sep 11, 2002 5:23:29 PM PDT> <Info> <MessagingBridge> <Bridge "SourcingMessagingBridge"
is configured to allow degradation of its quality of service in cases where the
configured quality of service is not reachable.>
<Sep 11, 2002 5:23:29 PM PDT> <Info> <MessagingBridge> <Bridge "SourcingMessagingBridge"
is configured to work in "Duplicate-okay" mode and it is actually working in "Duplicate-okay"
mode.>
<Sep 11, 2002 5:23:29 PM PDT> <Info> <MessagingBridge> <Bridge "SourcingMessagingBridge"
starts transferring messages.>
<Sep 11, 2002 5:23:29 PM PDT> <Info> <MessagingBridge> <Bridge "SourcingMessagingBridge"
encountered some problems to one of its adapters or underlying systems. It stopped
transferring messages and will try to reconnect to the adapters shortly. (Exception
caught was java.lang.Exception: java.lang.reflect.UndeclaredThrowableException:
java.lang.reflect.InvocationTargetException: javax.resource.Reso
urceException: Error creating asynchronous consumer or setting message lisenter
at weblogic.jms.adapter.JMSBaseConnection.throwResourceException(JMSBaseConnection.java:1086)
at weblogic.jms.adapter.JMSBaseConnection.setMessageListenerInternal(JMSBaseConnection.java:984)
at weblogic.jms.adapter.JMSBaseConnection.setMessageListener(JMSBaseConnection.java:892)
at weblogic.jms.adapter.JMSConnectionHandle.setMessageListener(JMSConnectionHandle.java:121)
at java.lang.reflect.Method.invoke(Native Method)
at weblogic.connector.common.internal.ConnectionWrapper.invoke(ConnectionWrapper.java:60)
at $Proxy92.setMessageListener(Unknown Source)
at weblogic.jms.bridge.internal.MessagingBridge.beginForwarding(MessagingBridge.java:844)
at weblogic.jms.bridge.internal.MessagingBridge.execute(MessagingBridge.java:924)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:139)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)
)
java.lang.Exception: java.lang.reflect.UndeclaredThrowableException: java.lang.reflect.InvocationTargetException:
javax.resource.ResourceException: Error creating asynchronous consumer or setting
message lisenter
at weblogic.jms.adapter.JMSBaseConnection.throwResourceException(JMSBaseConnection.java:1086)
at weblogic.jms.adapter.JMSBaseConnection.setMessageListenerInternal(JMSBaseConnection.java:984)
at weblogic.jms.adapter.JMSBaseConnection.setMessageListener(JMSBaseConnection.java:892)
at weblogic.jms.adapter.JMSConnectionHandle.setMessageListener(JMSConnectionHandle.java:121)
at java.lang.reflect.Method.invoke(Native Method)
at weblogic.connector.common.internal.ConnectionWrapper.invoke(ConnectionWrapper.java:60)
at $Proxy92.setMessageListener(Unknown Source)
at weblogic.jms.bridge.internal.MessagingBridge.beginForwarding(MessagingBridge.java:844)
at weblogic.jms.bridge.internal.MessagingBridge.execute(MessagingBridge.java:924)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:139)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)
at weblogic.jms.bridge.internal.MessagingBridge.createExceptionWithLinkedExceptionInfo(MessagingBridge.java:2193)
at weblogic.jms.bridge.internal.MessagingBridge.prepareForRebegin(MessagingBridge.java:1362)
at weblogic.jms.bridge.internal.MessagingBridge.beginForwarding(MessagingBridge.java:860)
at weblogic.jms.bridge.internal.MessagingBridge.execute(MessagingBridge.java:924)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:139)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)
>

First of all, I don't quite understand what this means. Could someone explain
what the error means?
I tried changing the configuration of the message destinations to use weblogic.jms.ConnectionFactory
instead of sourcing/TopicConnectionFactory. But that didn't seem to work.
One thing I noticed was that if I opened the connector deployment descriptor through
the console and validated it, it complained that the the capacity-increment (set
to 0) was not a positive number and shrink-period-minutes (set to 0) was not a
positive number. I change the capacity-increment to 1 and the shrink-period-minutes
to 5. When I restarted the server, I still see:

<Sep 11, 2002 5:36:41 PM PDT> <Info> <MessagingBridge> <Bridge "SourcingMessagingBridge"
suceesfully found the two adapters configured for it.>
<Sep 11, 2002 5:36:51 PM PDT> <Info> <MessagingBridge> <Bridge "SourcingMessagingBridge"
is getting the connections to the two adapters.>
<Sep 11, 2002 5:36:51 PM PDT> <Info> <MessagingBridge> <Bridge "SourcingMessagingBridge"
failed to connect to the source destination and will try again in 20 seconds.
(java.lang.Exception: javax.resource.ResourceException: Problem granting connection
request to a ManagedConnectionFactory which does not exist in connection pool.
Check your MCF's hashcode()
at weblogic.connector.common.internal.ConnectionPoolManager.getConnection(ConnectionPoolManager.java:149)
at weblogic.connector.common.internal.ConnectionManagerImpl.allocateConnection(ConnectionManagerImpl.java:20)
at weblogic.jms.adapter.JMSBaseConnectionFactory.getSourceConnection(JMSBaseConnectionFactory.java:97)
at weblogic.jms.bridge.internal.MessagingBridge.getConnections(MessagingBridge.java:696)
at weblogic.jms.bridge.internal.MessagingBridge.execute(MessagingBridge.java:901)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:139)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)


I know this is a long message, but if someone could give some insight into this,
I would greatly appreciate it.

Anil Arora

unread,
Sep 11, 2002, 8:55:14 PM9/11/02
to

I also added some debug flags (-Dweblogic.Debug.DebugMessagingBridgeStartup=true
-Dweblogic.Debug.DebugMessagingBridgeRuntime=true) and saw the following:

<Sep 11, 2002 5:49:49 PM PDT> <Debug> <MessagingBridge> <Messaging Bridge Debugging
STARTUP! creating bridge SourcingMessagingBridge>
<Sep 11, 2002 5:49:49 PM PDT> <Debug> <MessagingBridge> <Messaging Bridge Debugging
STARTUP! Bridge SourcingMessagingBridge's source properties are:
AdapterJNDIName=eis.jms.WLSConnectionFactoryJNDINoTX
Classpath=null
ConnectionURL = t3://localhost:9001
DestinationType = Topic
DestinationJNDIName = sourcing/DataCacheTopic
InitialContextFactory = weblogic.jndi.WLInitialContextFactory
ConnectionFactoryJNDIName = sourcing/TopicConnectionFactory>
<Sep 11, 2002 5:49:49 PM PDT> <Debug> <MessagingBridge> <Messaging Bridge Debugging
STARTUP! Bridge SourcingMessagingBridge's target properties are:
AdapterJNDIName=eis.jms.WLSConnectionFactoryJNDINoTX
Classpath=null
ConnectionURL = t3://localhost:8001
DestinationType = Topic
DestinationJNDIName = sourcing/DataCacheTopic
InitialContextFactory = weblogic.jndi.WLInitialContextFactory
ConnectionFactoryJNDIName = sourcing/TopicConnectionFactory>
<Sep 11, 2002 5:49:49 PM PDT> <Debug> <MessagingBridge> <Messaging Bridge Debugging
STARTUP! Bridge SourcingMessagingBridge is successfully initialized>
..
<Sep 11, 2002 5:53:48 PM PDT> <Info> <MessagingBridge> <Bridge "SourcingMessagin


gBridge" is getting the connections to the two adapters.>

<Sep 11, 2002 5:54:18 PM PDT> <Debug> <MessagingBridge> <Messaging Bridge Debugg
ing RUNTIME! Bridge SourcingMessagingBridge Getting source connection>
<Sep 11, 2002 5:54:18 PM PDT> <Info> <MessagingBridge> <Bridge "SourcingMessagin
gBridge" failed to connect to the source destination and will try again in 55
se
conds. (java.lang.Exception: javax.resource.ResourceException: Problem granting


connection request to a ManagedConnectionFactory which does not exist in connect
ion pool. Check your MCF's hashcode()
at weblogic.connector.common.internal.ConnectionPoolManager.getConnectio
n(ConnectionPoolManager.java:149)
at weblogic.connector.common.internal.ConnectionManagerImpl.allocateConn
ection(ConnectionManagerImpl.java:20)
at weblogic.jms.adapter.JMSBaseConnectionFactory.getSourceConnection(JMS
BaseConnectionFactory.java:97)
at weblogic.jms.bridge.internal.MessagingBridge.getConnections(Messaging
Bridge.java:696)
at weblogic.jms.bridge.internal.MessagingBridge.execute(MessagingBridge.
java:901)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:139)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)

)>

Dongbo Xiao

unread,
Sep 12, 2002, 9:20:04 AM9/12/02
to Anil Arora
The MCF problem is a known problem and seems to only occur when the RA
is hot-deployed & the config file "points" to the rar in the
applications directory. If you move the rar to a directory
other than the applications directory & modify the
config.xml file to get it from there, then the MCF error should not
occur.

Dongbo

Dongbo Xiao

unread,
Sep 12, 2002, 9:34:47 AM9/12/02
to Anil Arora
Does your connection factory has the ClientId set? Does your
MDB uses the same connection factory? If so, the bridge
and the MDB will use the same client id to create connection and
durable subscription, which is not allowed.

To verify if that is the problem, set DurabilityEnabled to false
or change the config.xml so that the ClientId attribute is not
set on the factory but set in the MDB on the connection. The bridge
will set the ClientId if it does not get it from the factory.

Another thing is to make sure the CR081511.jar is dated as 8/13/2002
and it is loaded during the startup. The jar should be placed
before the weblogic.jar in your classpath for it to be properly loaded.

Dongbo

Anil Arora

unread,
Sep 12, 2002, 2:53:00 PM9/12/02
to

No, I didn't set the ClientId for the connectionFactory. I verified that the CR
was being put at the beginning of the classpath.
Using your suggestion, I did move the rar file to a different location other than
applications. I didn't see the MCF error. And the messages are propagating like
I expected.
I do see the following in my logs once in a while. It doesn't seem to be a problem,
but it is annoying. What does this mean?

<Sep 12, 2002 11:50:21 AM PDT> <Info> <Connector> <Unable to locate context: java:/comp/env/wls-connector-resref>
<Sep 12, 2002 11:50:21 AM PDT> <Info> <Connector> <Unable to determine Resource


Principal for Container Managed Security Context.>

<Sep 12, 2002 11:50:21 AM PDT> <Info> <Connector> <Unable to locate context: java:/comp/env/wls-connector-resref>
<Sep 12, 2002 11:50:21 AM PDT> <Info> <Connector> <Unable to determine Resource


Principal for Container Managed Security Context.>

Thanks,

Anil

0 new messages