Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Problem with load balancer with non-clustered servers

Status
Not open for further replies.

ajaypt

Programmer
Apr 2, 2002
1
SG
The problem is as follows:

When my test program called an ejb method from Weblogic Instance SP1(cluster) via the content switch, it keeps calling the same Weblogic Instance IL1(non-cluster). It never call the other weblogic instance IL2 (non-cluster). The content switch(10.54.4.41:8001) is linking(load balancing) to 2 weblogic servers. By right, it should load balance calls to the 2 weblogic servers(non-cluster). If i do a telnet to the content switch server, it will route the call to either of the 2 Weblogic Instance servers IL1 and IL2(non-cluster). But when i do a ejb call t3 connection, it always go to the same Weblogic Instance IL1(non-cluster).

Below is the program which i activated. It loop the method 100 times, and each loop, i do a new lookup but it still goes to the same Weblogic Instance IL1(non-cluster):

For (int j = 0; j<100; j++){
Integer i = generateICCPin()
}

public Integer generateICCPin(){
Properties h = new Properties();
h.put(Context.INITIAL_CONTEXT_FACTORY, &quot;weblogic.jndi.WLInitialContextFactory&quot;);
h.put(Context.PROVIDER_URL, &quot;t3://10.54.4.41:8001&quot;);
ictx = new InitialContext(h);
midRetrievalRemoteHome = (MidRetrievalRemoteHome)ictx.lookup(&quot;MidRetrievalRemoteBean&quot;);
midRetrievalRemote = midRetrievalRemoteHome.create();
return midRetrievalRemote.generateICCPin();
}

If you know the solution, either reply to this topic or mail me at ajjup@yahoo.com

Thanks in advance.

Regards,

Ajay
 

T3 maintains a cache of the connection and multiplexes all the sessions on this connection. The way to get around this is to use the configuration below...

h.put(Context.PROVIDER_URL, "t3://serverA,serverB:8001");

This is actually used for clustered servers but it does work for non-clustered servers too..

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top