Problem: Product Name: BES App Server Product Version: 6.x and above Product Component: Smart Agent (OSAgent) Platform/OS Version: All Is there a way to enable load balancing and round robin using osagent on multiple threads within the same client application process? Each thread will get an initial context then go on to get the home interface and server method. The client application is doing something like this: private Context context = new InitialContext(); Object ref = context.lookup(service); FacadeHome home = (FacadeHome) PortableRemoteObject.narrow(ref, FacadeHome.class); facade = home.create(); and then will call facade.getEnv() . What we want is to get a round robin between each thread. Resolution: Currently, it is not possible to disable the caching feature of BES. A CR (9181) has been filed. We need to intercept the messages passing through the "javax.naming.InitialContext" class. As per the BES Clustering documentation: "The Naming Service will provide the client with references of home interfaces in the EJB container within the same partition. Thus, once the Smart Agent directs the client to a Naming Service instance, the client will continue using that partition for all subsequent interactions or for the duration of the session." In order to achieve load balancing, caching must be disabled. However, using agent or orb properties will not work because we need to override the Sun JDK's behavior to intercept the messages to "javax.naming.InitialContext" and disable caching.
↧