站内搜索: 请输入搜索关键词
当前页面: 在线文档首页 > JBoss 4.0.1 sp1 server API Documentation 英文版文档

InstancePool (JBoss Server API) - JBoss 4.0.1 sp1 server API Documentation 英文版文档


org.jboss.ejb
Interface InstancePool

All Superinterfaces:
AllowedOperationsFlags, 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.13 $
Author:
Rickard 锟絙erg

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

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.