JBoss API: Class SingletonStatelessSessionInstancePool
org.jboss.ejb.plugins
Class SingletonStatelessSessionInstancePool
java.lang.Object
|
+--org.jboss.ejb.plugins.SingletonStatelessSessionInstancePool
All Implemented Interfaces: ContainerPlugin , InstancePool , Service , XmlLoadable
public class SingletonStatelessSessionInstancePool extends java.lang.Objectimplements InstancePool , XmlLoadable
Singleton pool for session beans. This lets you have
singletons in EJB!
Version: $Revision: 1.6.6.5 $
Author: Rickard Öberg (rickard.oberg@telkel.com)
See Also:
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
SingletonStatelessSessionInstancePool
public SingletonStatelessSessionInstancePool ()
setContainer
public void setContainer (Container c)
Set the callback to the container. This is for initialization.
The pool may extract the configuration from the container.
Specified by: setContainer
in interface ContainerPlugin
Parameters: c
-
init
public void init ()
throws java.lang.Exception
Specified by: init
in interface Service
start
public void start ()
throws java.lang.Exception
Specified by: start
in interface Service
stop
public void stop ()
Specified by: stop
in interface Service
destroy
public void destroy ()
Specified by: destroy
in interface Service
get
public EnterpriseContext get ()
throws java.lang.Exception
Get the singleton instance
Specified by: get
in interface InstancePool
Returns: Context /w instance Throws: java.rmi.RemoteException
-
free
public void free (EnterpriseContext ctx)
Return an instance after invocation.
Called in 2 cases:
a) Done with finder method
b) Just removed
Specified by: free
in interface InstancePool
Parameters: ctx
-
discard
public void discard (EnterpriseContext ctx)
Description copied from interface: InstancePool
Discard an anonymous instance after invocation.
This is called if the instance should not be reused, perhaps due to some
exception being thrown from it.
Specified by: discard
in interface InstancePool
Following copied from interface: org.jboss.ejb.InstancePool
Parameters: ctx
-
add
public void add ()
throws java.lang.Exception
Add a instance in the pool
Specified by: add
in interface InstancePool
Following copied from interface: org.jboss.ejb.InstancePool
Throws: java.lang.Exception
- when an Instance can not be instantiated
getCurrentSize
public int getCurrentSize ()
Description copied from interface: InstancePool
Return the size of the pool.
Specified by: getCurrentSize
in interface InstancePool
Following copied from interface: org.jboss.ejb.InstancePool
Returns: the size of the pool.
getMaxSize
public int getMaxSize ()
Description copied from interface: InstancePool
Get the maximum size of the pool.
Specified by: getMaxSize
in interface InstancePool
Following copied from interface: org.jboss.ejb.InstancePool
Returns: the size of the pool.
importXml
public void importXml (org.w3c.dom.Element element)
throws java.lang.Exception
Specified by: importXml
in interface XmlLoadable
create
protected EnterpriseContext create (java.lang.Object instance,
Container con)
throws java.lang.Exception
Copyright © 2000 The JBoss Organization. All Rights Reserved.