org.jboss.ejb
Interface InstancePool

All Superinterfaces:
ContainerPlugin, org.jboss.system.Service
All Known Implementing Classes:
AbstractInstancePool, SingletonStatelessSessionInstancePool

public interface InstancePool
extends ContainerPlugin

Defines the model for a EnterpriseContext instance pool.

Version:
$Revision: 1.12.4.3 $
Author:
Rickard Öberg

Method Summary
 void discard(EnterpriseContext ctx)
          Discard an anonymous instance after invocation.
 void free(EnterpriseContext ctx)
          Return an anonymous instance after invocation.
 EnterpriseContext get()
          Get an instance without identity.
 int getCurrentSize()
          Return the size of the pool.
 int getMaxSize()
          Get the maximum size of the pool.
 
Methods inherited from interface org.jboss.ejb.ContainerPlugin
setContainer
 
Methods inherited from interface org.jboss.system.Service
create, destroy, start, stop
 

Method Detail

get

public EnterpriseContext get()
                      throws Exception
Get an instance without identity.

Can be used by finders and create-methods, or stateless beans

Returns:
Context/w instance
Throws:
Exception - RemoteException

free

public void free(EnterpriseContext ctx)
Return an anonymous instance after invocation.

Parameters:
ctx - The context to free.

discard

public void discard(EnterpriseContext ctx)
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.

Parameters:
ctx - The context to discard.

getCurrentSize

public int getCurrentSize()
Return the size of the pool.

Returns:
the size of the pool.

getMaxSize

public int getMaxSize()
Get the maximum size of the pool.

Returns:
the size of the pool.


Copyright © 2002 JBoss Group, LLC. All Rights Reserved.