org.jboss.ejb
Interface InstancePool

All Superinterfaces:
AllowedOperationsFlags, ContainerPlugin, org.jboss.system.Service
All Known Implementing Classes:
AbstractInstancePool, EntityInstancePool, MessageDrivenInstancePool, SingletonStatelessSessionInstancePool, StatefulSessionInstancePool, StatelessSessionInstancePool

public interface InstancePool
extends ContainerPlugin

Defines the model for a EnterpriseContext instance pool.

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

Field Summary
 
Fields inherited from interface org.jboss.ejb.AllowedOperationsFlags
IN_AFTER_BEGIN, IN_AFTER_COMPLETION, IN_BEFORE_COMPLETION, IN_BUSINESS_METHOD, IN_EJB_ACTIVATE, IN_EJB_CREATE, IN_EJB_FIND, IN_EJB_HOME, IN_EJB_LOAD, IN_EJB_PASSIVATE, IN_EJB_POST_CREATE, IN_EJB_REMOVE, IN_EJB_STORE, IN_EJB_TIMEOUT, IN_INTERCEPTOR_METHOD, IN_SERVICE_ENDPOINT_METHOD, IN_SET_ENTITY_CONTEXT, IN_SET_MESSAGE_DRIVEN_CONTEXT, IN_SET_SESSION_CONTEXT, IN_UNSET_ENTITY_CONTEXT, NOT_ALLOWED
 
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

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

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

Parameters:
ctx - The context to free.

discard

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

int getCurrentSize()
Return the size of the pool.

Returns:
the size of the pool.

getMaxSize

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

Returns:
the size of the pool.


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