Skip to Main Content

Java Programming

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

LoadBalance in InitialContext Lookup

J4JavaNov 28 2012
Hi,
I'm having following requirement.An Ejb has been deplyed in a weblogic cluster which has two Servers Server A & B.
In Server A the Ejb is in started mode,& in Server B it is in Stopped state.Now from the server B i'm using a standalone client to lookup the ejb using JNDI name & initial context.

+ Hashtable env = new Hashtable();+
+ env.put( javax.naming.Context.INITIAL_CONTEXT_FACTORY , "weblogic.jndi.WLInitialContextFactory" );+
+ env.put( javax.naming.Context.PROVIDER_URL , "t3://SERVERB:9001,SERVERA:9001" );+
+ ctx = new InitialContext( env );+
I had given two URL's [ both Server A & Server B] in the initialcontext. What I'm expecting is the initialcontext will lookup serverB where the EJB is in stopped state, then it will lookup in Server A where the EJB is in started stated & communicate with it.

But now i'm getting the exception, it is throw from ServerB where the EJB is in Stopped state.

+Exception in thread "main" javax.naming.NameNotFoundException: Unable to resolve 'XXXEngineBean'. Resolved '' [Root exception is javax.naming.NameNotFoundException: Unable to resolve 'XXXEngineBean'. Resolved '']; remaining name 'XXXEngineBean'+
+ at weblogic.rjvm.ResponseImpl.unmarshalReturn(ResponseImpl.java:234)+


Thanks in Advance
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Dec 26 2012
Added on Nov 28 2012
0 comments
143 views