This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes EJB and other Java EE Technologies and the fly likes Problem integrating Weblogic 8.1 with Sonic MQ 6.1 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "Problem integrating Weblogic 8.1 with Sonic MQ 6.1" Watch "Problem integrating Weblogic 8.1 with Sonic MQ 6.1" New topic
Author

Problem integrating Weblogic 8.1 with Sonic MQ 6.1

clement valentine
Greenhorn

Joined: Apr 04, 2002
Posts: 19
Hello all,
Iam trying to get an MDB on WLS to listen to a Sonic MQ installation. Iam using Sonic's built in JNDI and have made the necessary setting under Foreign JMS server under Weblogic console (I followed the code share available on Sonic's site!). But the MDB always starts with the following warning and does not listen to the Q.

<Jan 9, 2006 11:47:07 PM CST> <Warning> <EJB> <BEA-010061> <The Message-Driven EJB: SonicMDB is unable to connect to the JMS destination: jms/SampleQ1. The Error was:
[EJB:011010]The JMS destination with the JNDI name: jms/SampleQ1 could not be found. Please ensure that the JNDI name in the weblogic-ejb-jar.xml is correct, and the JMS destination has been deployed.>

This is my weblogic-ejb-jar.xml

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE weblogic-ejb-jar PUBLIC "-//BEA Systems, Inc.//DTD WebLogic 8.1.0 EJB//EN" "http://www.bea.com/servers/wls810/dtd/weblogic-ejb-jar.dtd">
<weblogic-ejb-jar>
<weblogic-enterprise-bean>
<ejb-name>SonicMDB</ejb-name>
<message-driven-descriptor>
<pool>
<max-beans-in-free-pool>2</max-beans-in-free-pool>
<initial-beans-in-free-pool>1</initial-beans-in-free-pool>
</pool>
<destination-jndi-name>jms/SampleQ1</destination-jndi-name>
<initial-context-factory>weblogic.jndi.WLInitialContextFactory</initial-context-factory>
<provider-url>t3://localhost:7001</provider-url>
<connection-factory-jndi-name>jms/QCF</connection-factory-jndi-name>
</message-driven-descriptor>
</weblogic-enterprise-bean>
</weblogic-ejb-jar>


I have configured the jndi name for the destination and connection factory correctly under the console.. Is there a bug with WLS 8.1 SP4?

Thanks guys
Reid M. Pinchback
Ranch Hand

Joined: Jan 25, 2002
Posts: 775
I can think of two things, one if which will sound really wierd.

I've had problem with getting Weblogic to work with "/" in the JNDI names for JMS objects. Yes, that sounds cracked, but I've seen it. The admin interface accepts them just fine, but the code fails because it can't find the objects. I've never been able to figure out why I've seen it when I've seen it, but the solution was always to just get rid of "/" in the bindings for queues and connection factories.

Another possibility that comes to mind is that everything you are doing in your MDB is correct, the problem is that Weblogic isn't successfully connecting to Sonic. You might be able to spot that by mucking around with the Weblogic server logging configuration. For example, does the connection from Weblogic to Sonic depend upon JNDI? If so, you might be missing the Sonic provider libraries.


Reid - SCJP2 (April 2002)
Roger Chung-Wee
Ranch Hand

Joined: Sep 29, 2002
Posts: 1683
Are you using wrappers?

If you have (recommended), then jms/SampleQ1 will be what you set up in your local JNDI tree that corresponds the remote or foreign destination.

If you have not, then you must specify the name of the destination as bound in the foreign provider's JNDI tree.


SCJP 1.4, SCWCD 1.3, SCBCD 1.3
clement valentine
Greenhorn

Joined: Apr 04, 2002
Posts: 19
Hi guys,
Iam not using the Sun's FSContext but the Sonic's jndi. I have added the following sonic jars to the wls classpath:
------------------------------------------------------=--------
@rem Add the Sonic JMS Provider
set SONICMQ_LIB=<SONIC_HOME>\lib
set SONICMQ_CLASSPATH=%SONICMQ_LIB%\mfcontext.jar;%SONICMQ_LIB%\sonic_Client.jar;%SONICMQ_LIB%\sonic_ASPI.jar;%SONICMQ_LIB%\sonic_XA.jar;%SONICMQ_LIB%\sonic_Selector.jar;%SONICMQ_LIB%\sonic_Crypto.jar;%SONICMQ_LIB%\jndi.jar
set WEBLOGIC_CLASSPATH=%WEBLOGIC_CLASSPATH%;%SONICMQ_CLASSPATH%
-----------------------------------------------------------------

This is my foreign JMS server configuration in WLS console
------------------------------------------------------------
Name: WLSSONIC
JNDI Initial Context Factory: com.sonicsw.jndi.mfcontext.MFContextFactory
JNDI Provider URL: tcp://localhost:2506
JNDI Properties:
com.sonicsw.jndi.mfcontext.idleTimeout=6000
com.sonicsw.jndi.mfcontext.domain=Domain1
java.naming.security.principal=Administrator
java.naming.security.credentials=Administrator
--------------------------------------------------

This is the snippet from WLS config.xml
------------------------------------------
<code>
<ForeignJMSServer ConnectionURL="tcp://localhost:2506"
InitialContextFactory="com.sonicsw.jndi.mfcontext.MFContextFactory"
JNDIProperties="java.naming.provider.url=tcp://localhost:2506;java.naming.factory.initial=com.sonicsw.jndi.mfcontext.MFContextFactory;com.sonicsw.jndi.mfcontext.idleTimeout=6000;com.sonicsw.jndi.mfcontext.domain=Domain1 java.naming.security.principal=Administrator java.naming.security.credentials=Administrator" Name="WLSSONIC">
<ForeignJMSConnectionFactory LocalJNDIName="jms/QCF"
Name="SonicMQQueueConnectionFactory"
PasswordEncrypted="{3DES}O26K63V7o0pOryfotUFNpA=="
RemoteJNDIName="SonicMQQueueConnectionFactory" Username="Administrator"/>
<ForeignJMSDestination LocalJNDIName="jms/SampleQ1"
Name="SonicMQSampleQ1" RemoteJNDIName="SonicMQSampleQ1"/>
</ForeignJMSServer>
</code>

---------------------------------------------------------------------


Thanks guys
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Problem integrating Weblogic 8.1 with Sonic MQ 6.1
 
Similar Threads
Message Driven Bean reading multiple times from a jms queue
Issue with MDB and weblogic 9.2
MDB deployed in WebLogic and Queues in IBM MQ
Probelem with MDB l(on weblogic 7.0) listening to MQ (Start-up class issue )
Error while deploying jar in Weblogic