-
1. Re: Stateless Session Bean Instances - How to limit them ?
dimitris Jan 19, 2006 7:59 AM (in response to vinay076)Can you provide a minimal testcase that replicates this behaviour? Thanks.
-
2. Re: Stateless Session Bean Instances - How to limit them ?
vinay076 Jan 19, 2006 9:02 AM (in response to vinay076)I actually don't have a test case but we have deployed the application on Production and then found the problem.
Currently I am running this scenario in test system
1. I am clicking on a hypelrink to view some details
2. These details are fetched through a method in EJB (Local)
3. User changes and presses save
4. Update functionality in same EJB is called(local)
When I view from Jmx-console of Jboss , i find CreateCount of this ejb has increased by 2. Is this the no of instances in container or its just the call stats? I am assuming it to be no of instance.
Now this EJB's local home is also cached
Map cache = Collections.synchronizedMap(new HashMap());
public EJBLocalHome getLocalHome(String jndiHomeName)
if (cache.containsKey(jndiHomeName)) {
home = (EJBLocalHome) cache.get(jndiHomeName);
} else {
home = (EJBLocalHome) ic.lookup(jndiHomeName);
cache.put(jndiHomeName, home);
But surprisingly everytime it creates new instance