aspose file tools*
The moose likes BEA/Weblogic and the fly likes sending message to remote jms Queue Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » BEA/Weblogic
Bookmark "sending message to remote jms Queue" Watch "sending message to remote jms Queue" New topic
Author

sending message to remote jms Queue

Anil B
Greenhorn

Joined: Nov 02, 2006
Posts: 5
I have created a Connection factory with jndi name 'jmsConnectionFactory1' and a jms queue with jndi name 'Queue-1' in system 10.238.115.217.

And I write the following code and run on a different system (10.238.115.201). It's throwing
weblogic.jms.common.JMSException: Connection not found

But if I create those same queues in local system and change the url to t3://localhost:7001 in provider url, connectionfactory,destination queue in the same code ;it works fine,the queue in local system gets the sent message.


Context context= new InitialContext();
context.addToEnvironment(Context.INITIAL_CONTEXT_FACTORY,"weblogic.jndi.WLInitialContextFactory");
context.addToEnvironment(Context.PROVIDER_URL,"t3://10.238.115.217:7001");
context.addToEnvironment(Context.SECURITY_AUTHENTICATION,"weblogic");
context.addToEnvironment(Context.SECURITY_CREDENTIALS,"weblogic");
context.addToEnvironment(Context.SECURITY_PRINCIPAL,"weblogic");

QueueConnectionFactory conFact=(QueueConnectionFactory)context.lookup("t3://10.238.115.217:7001/jmsConnectionFactory1");
QueueConnection connection=conFact.createQueueConnection();
Queue queue=(Queue)context.lookup("t3://10.238.115.217:7001/Queue-1");
QueueSession session=connection.createQueueSession(true,Session.AUTO_ACKNOWLEDGE);
QueueSender qs=session.createSender(queue);
TextMessage message=session.createTextMessage("hi its very urgent please");
qs.send(message);
connection.close();

please help me out..


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


this excepton is thrown at this statement
QueueSession session=connection.createQueueSession(false,Session.AUTO_ACKNOWLEDGE);


weblogic.jms.common.JMSException: Connection not found
<Nov 2, 2006 7:33:25 PM IST> <Warning> <EJB> <BEA-010096> <The Message-Driven EJ
B: jms_mdb is unable to connect to the JMS destination: Queue-1. Connection fail
ed after 2 attempts. The MDB will attempt to reconnect every 10 seconds. This lo
g message will repeat every 600 seconds until the condition clears.>
<Nov 2, 2006 7:33:25 PM IST> <Warning> <EJB> <BEA-010061> <The Message-Driven EJ
B: jms_mdb is unable to connect to the JMS destination: Queue-1. The Error was:
[EJB:011010]The JMS destination with the JNDI name: Queue-1 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.>

(it says that jndi name Queue-1 is not found, but I created it in the same way,as I did one in my local system)
Thanks
[ November 02, 2006: Message edited by: Anil B ]
Joe Ess
Bartender

Joined: Oct 29, 2001
Posts: 8971
    
    9

Welcome to the Javaranch, Amil. Can you show us the exception stack trace and point out exactly which line the exception occurs on?


[How To Ask Questions On JavaRanch]
gopinathang nathan
Ranch Hand

Joined: Oct 28, 2006
Posts: 41
- Check, you are able to see the "Queue-1" object in the JNDI tree of the source server.
- You can directly refer 'Queue-1' instead of 't3://.../Queue-1'.
- What type of client is this? stand alone java/ webapp?
- what is the weblogic version?
Anil B
Greenhorn

Joined: Nov 02, 2006
Posts: 5
Originally posted by gopinathang nathan:
- Check, you are able to see the "Queue-1" object in the JNDI tree of the source server.
- You can directly refer 'Queue-1' instead of 't3://.../Queue-1'.
- What type of client is this? stand alone java/ webapp?
- what is the weblogic version?


Hi,

I'm running the application in action of .jpf in WEBLOGIC 8.1.
I'm able to see that Queue-1 in the JNDI tree of that remote system.

Do I need to make any changes in settings of remote server so that it accepts remote connections.I have even tried by unchecking 'Guest Disabled'
in compatibility tab of application wide settings.

thanks.
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61658
    
  67

"Anil B",

There aren't many rules that you need to worry about here on the Ranch, but one that we take very seriously regards the use of proper names. Please take a look at the JavaRanch Naming Policy and adjust your display name to match it.

In particular, your display name must be a first and a last name separated by a space character, and must not be obviously fictitious.

Thanks!
bear
JavaRanch Sheriff


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Anil B
Greenhorn

Joined: Nov 02, 2006
Posts: 5
Hi
I got solution to my problem.
I used bridge.
These are the things U need to make sure of in configuration of bridge.

1. See that the Server names of source and Destination machines of Messaging Bridge are different.

2.See that domain names are also different.

3.See that in both the machines the Guest Disabled is Unchecked in Domain Wide Security settings of both machines, also see that credential checking tab is unchecked and the contents of credential principals in both the machines are the SAME.

4.If the connection factories on both machines are XA enabled,deploy adapters jms-xa-adp on both machines using console (Deployments-connectorModules-upload your files).jms-xa-adp is in weblogic81-server-lib.

Thanks.
bye.
 
wood burning stoves
 
subject: sending message to remote jms Queue