-
1. Re: How to find if the EJB Proxy object is stale and no longer bound to actual bean in the server
wdfink Mar 21, 2013 2:15 PM (in response to mannu_cse)How the properties which are given to create the initialContext look like?
How the lookup jndiName look like?
It is not an guarantee that the proxy target is available if the lookup succeeds.
-
2. Re: How to find if the EJB Proxy object is stale and no longer bound to actual bean in the server
mannu_cse Mar 21, 2013 3:07 PM (in response to wdfink)Since it's a Server to Server EJB call, we are following all the steps to create remote outbound connections in standalone-full-ha.xml
and packaging jboss-ejb-client.xml in client EAR.
As I explain in the sample code, first EJB method call succeeds so the proxy target is available initially.
however during the execution the target could be undeployed, but there are same EJB deployed in other nodes in the cluster
so we want to recover this and make a new JNDI lookup to other available proxy target
Although we thought it should have happened automatically without need of explicitly doing a lookup again.
Also since it's a stateless EJB, if I invoke multiple methods (hundred of times) will all be invoked on same target proxy or
it will be load balanced in the cluster?
And if it's not load balanced, will the server use the SLSB pool to allocate actual ejb object eventually
resulting in different beans used for different method invocation though from the same server's SLSB pool?
-
3. Re: How to find if the EJB Proxy object is stale and no longer bound to actual bean in the server
wdfink Mar 21, 2013 4:20 PM (in response to mannu_cse)First, if you want to have cluster features yoou need to do a bit.
See my ejb-multi-server quickstart jboss-ejb-client.xml.
If you need initial two server for failover you need to have 2 remote outbound configurations!
If you add such config you will have cluster loadbalancing and failover
As it is a SLSB the target might not the same, there is a pool (server local) which hold beans if you invoke in parallel and need more instances.
Also I've raised a JIRA to simplify the administration in case of a cluster.
-
4. Re: How to find if the EJB Proxy object is stale and no longer bound to actual bean in the server
mannu_cse Mar 25, 2013 9:49 AM (in response to wdfink)Thanks for the help, yes, I see the fail-over, load balacing happening correctly after adding jboss-ejb-client.xml in WEB-INF folder, this got missed out as we were trying to lookup EJB from Web module for the first time.