File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes BEA/Weblogic and the fly likes JMS Clustering in Weblogic Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Products » BEA/Weblogic
Bookmark "JMS Clustering in Weblogic" Watch "JMS Clustering in Weblogic" New topic
Author

JMS Clustering in Weblogic

Mohammed Yousuff
Ranch Hand

Joined: Oct 17, 2007
Posts: 198
i have a sample application which i deployed in a admin server (of webloggic) with JMS configured, it works fine.

Then i created 2 managed Servers M1 & M2 , and configured JMS connection factories on both M1 & M2. Then i deployed my client and EJB both on admin server and trying to connect JMS server which is configured in the cluster (M1 & M2)..but is not connection and giving the following error.


.0-com.weblogic.sample.ejbapp.FubarBMTEJB.connectToQueue() exception occured: javax.naming.NameNotFoundException: While trying to lookup 'com.weblogic.sample.mdbapp.FubarQueueFactory' didn't find subcontext 'mdbapp'. Resolved 'com.weblogic.sample'; remaining name 'mdbapp/FubarQueueFactory'
1.0-com.weblogic.sample.ejbapp.FubarBMTEJB.sampleMethod() queuing request: [1.0-client123-true-false-0-1234]
1.0-com.weblogic.sample.ejbapp.FubarBMTEJB.putQueueMessage() exception occured java.lang.NullPointerException:



i am very new to this, can you please provide me any thoughts, on this issue. it will be a great help.


My Thoughts : http://passion4java.blogspot.com
Try not to become a man of success but rather to become a man of value.
Trimoorthy Kotte
Greenhorn

Joined: Mar 31, 2006
Posts: 9
Hope you have created JMS queues in managed servers also. if you have created jms queues on managed servers. Then create a distributed queue with a jndi name say "test.distributed.queue". Then add jms queues (already created) of each managed servers. Then try accessing the distributed queue with the jndi name. Also see that you are using the provider ur� of one of the managed srevers. Then you can see the expected behavior cluster. you can see jms messages distibuted to two jms queue , on each managed servers. Also remeber to configure the connection factory to loadbalance in round robin

...
Happy New Year...
Trimoorthy
Mohammed Yousuff
Ranch Hand

Joined: Oct 17, 2007
Posts: 198
Trimoorthy Kotte thanks a lot for your comments. i created a distributed queues and when i try to add another queues i can't find the option for it... i tried my level best to configure weblogic JMS faii over.. however i can reach to a point where i can get the reference to the queue (where i am pointing reference URL of that server when i am doing JNDI lookup for the JMS connection factory and Queue) which is in the managered Server and messge is also posted. However when i turn off one server then it is not routing to another server....

I tried in net to find any sample application which does JMS failover, however i can't find one.Weblogic 9.2 documents is not userfriendly i can't follow the doc its HUGE and boaring ...

can you suggest me any article where i can have step by step process to create JMS failover ??? or please let me know how can add more queues to the managed servers...

it will great help for me ... thank you
Renjan Thomas
Ranch Hand

Joined: Jan 09, 2009
Posts: 49


Hi,

For the Exception below:-

javax.naming.NameNotFoundException: While trying to lookup 'com.weblogic.sample.mdbapp.FubarQueueFactory' didn't find subcontext 'mdbapp'. Resolved 'com.weblogic.sample'; remaining name 'mdbapp/FubarQueueFactory'
1.0-com.weblogic.sample.ejbapp.FubarBMTEJB.sampleMethod() queuing request: [1.0-client123-true-false-0-1234]
1.0-com.weblogic.sample.ejbapp.FubarBMTEJB.putQueueMessage() exception occured java.lang.NullPointerException:

Try to deploy your EJB on managed servers MS1 & MS2..because you have created the JMS servers on these managed servers.

Rite now you have the EJB only on admin server and when it comes to the part of look up it will look only in the JNDI tree of admin server where there is no JMS server and queue created thereby throwing javax.naming.NameNotFoundException.......but actually the queue 's are targetted to managed servers.

Hope you understood....
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: JMS Clustering in Weblogic
 
Similar Threads
Websphere 6.1.0.3 trail version --> Default JMS server problemm
assignment
multiple synchronized block in class..
How to read JMS messages from all the managed servers.
JMS in WAS 4.0