org.apache.openejb.core.stateless
Class StatelessInstanceManager
java.lang.Object
org.apache.openejb.core.stateless.StatelessInstanceManager
public class StatelessInstanceManager
- extends Object
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
accessTimeout
protected Duration accessTimeout
closeTimeout
protected Duration closeTimeout
beanCount
protected int beanCount
toolkit
protected final SafeToolkit toolkit
StatelessInstanceManager
public StatelessInstanceManager(SecurityService securityService,
Duration accessTimeout,
Duration closeTimeout,
Pool.Builder poolBuilder,
int callbackThreads)
getInstance
public Object getInstance(ThreadContext callContext)
throws OpenEJBException
- Removes an instance from the pool and returns it for use
by the container in business methods.
If the pool is at it's limit the StrictPooling flag will
cause this thread to wait.
If StrictPooling is not enabled this method will create a
new stateless bean instance performing all required injection
and callbacks before returning it in a method ready state.
- Parameters:
callContext
-
- Returns:
-
- Throws:
OpenEJBException
poolInstance
public void poolInstance(ThreadContext callContext,
Object bean)
throws OpenEJBException
- All instances are removed from the pool in getInstance(...). They are only
returned by the StatelessContainer via this method under two circumstances.
1. The business method returns normally
2. The business method throws an application exception
Instances are not returned to the pool if the business method threw a system
exception.
- Parameters:
callContext
- bean
-
- Throws:
OpenEJBException
discardInstance
public void discardInstance(ThreadContext callContext,
Object bean)
throws SystemException
- This method is called to release the semaphore in case of the business method
throwing a system exception
- Parameters:
callContext
- bean
-
- Throws:
SystemException
deploy
public void deploy(CoreDeploymentInfo deploymentInfo)
throws OpenEJBException
- Throws:
OpenEJBException
undeploy
public void undeploy(CoreDeploymentInfo deploymentInfo)
Copyright © 1999-2013 The Apache OpenEJB development community. All Rights Reserved.