• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

sending message to remote jms Queue

 
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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 ]
 
Bartender
Posts: 9626
16
Mac OS X Linux Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Welcome to the Javaranch, Amil. Can you show us the exception stack trace and point out exactly which line the exception occurs on?
 
Ranch Hand
Posts: 41
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
- 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
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

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.
 
Sheriff
Posts: 67746
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
"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
 
Anil B
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
reply
    Bookmark Topic Watch Topic
  • New Topic