Hi Vikas,

Definitely check out this section of the documentation:

 - http://tomee.apache.org/ejb-failover.html

The "failover:" URL prefix Romain mentions is one of a handful of features you 
can use.  The "failover:" strategy is great if you don't need dynamic 
loadbalancing and you are ok to fix the list statically on the client side.

There are also two options for having just one or two fixed and the rest 
discovered dynamically allowing for you to add/remove servers at runtime.  It's 
effectively the same as the "failover:" approach, but now the client will get 
an always up-to-date list dynamically.

If you happen to be in AWS this would be the one you need:

 - http://tomee.apache.org/multipoint-discovery.html
 - http://tomee.apache.org/multipoint-recommendations.html


-- 
David Blevins
http://twitter.com/dblevins
http://www.tomitribe.com

> On Sep 15, 2017, at 5:05 AM, VikasRathee <[email protected]> wrote:
> 
> Hi
> 
> In my application , from  web module, I want to access EJBModule deployed on
> multiple instances.
> So I want to add something like load balancer while doing lookup. What i
> need to do. 
> 
>            /  Properties properties = new Properties();
>            properties.put(Context.INITIAL_CONTEXT_FACTORY, 
>          "org.apache.openejb.client.RemoteInitialContextFactory");
>            properties.put(Context.PROVIDER_URL,
> "http://127.0.0.1:8081/tomee/ejb";);
>            InitialContext ic=new InitialContext(properties);/
> 
> This code is working fine with one PROVIDER_URL, but if i'm giving other URL
> also with comma separated, i'm getting naming exception.
> Is there anything like i can implement a EJB broker kind of thing which can
> manage requests to multiple app servers.
> 
> 
> 
> 
> 
> --
> Sent from: http://tomee-openejb.979440.n4.nabble.com/TomEE-Dev-f982480.html

Reply via email to