org.jfox.ejb
Class ContainerImpl

java.lang.Object
  extended byorg.huihoo.jfox.system.ComponentSupport
      extended byorg.jfox.ejb.ContainerImpl
All Implemented Interfaces:
Component, Container, Interceptable, Loggable, Persistentable, java.io.Serializable

public class ContainerImpl
extends ComponentSupport
implements Container

EJB Container 实现,Container 是一个 singleton 类,一个 Container 可以布署多种 ejb ,

See Also:
Serialized Form

Field Summary
 
Fields inherited from class org.huihoo.jfox.system.ComponentSupport
logger, name, proxyInstance, sequence, state
 
Method Summary
 void addInterceptor(Interceptor interceptor)
          加入一个拦截器
 void createBucket(BucketMetaData meta)
          create a bean bucket and bind it's home to jndi
protected  void doDestroy()
          do actually destory action
protected  void doInit()
          do actually create action
 void dropBucket(java.lang.String beanClassName)
          remove the bucket from container , 发生在 undeploy 一个 bean 的时候
static Container getInstance()
           
 java.util.Iterator interceptors()
          列出所有的拦截器
 java.lang.Object invoke(Invocation invocation)
          container 可能对该方法调用进行一些统一的调控,如:安全验证等,然后 forward 给 bucket 执行
static boolean isLocal()
          用来测试一个 Bean 是不是和 Container 在一个 JVM 内
 java.util.Iterator listBuckets()
           
static void main(java.lang.String[] args)
           
 
Methods inherited from class org.huihoo.jfox.system.ComponentSupport
destroy, getLogger, getName, getState, init, parseName, setLogger, setName
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.huihoo.jfox.system.Component
destroy, getName, getState, init
 
Methods inherited from interface org.huihoo.jfox.system.Loggable
getLogger
 

Method Detail

getInstance

public static Container getInstance()

isLocal

public static boolean isLocal()
用来测试一个 Bean 是不是和 Container 在一个 JVM 内

Returns:

doInit

protected void doInit()
               throws java.lang.Exception
Description copied from class: ComponentSupport
do actually create action

Specified by:
doInit in class ComponentSupport
Throws:
java.lang.Exception

doDestroy

protected void doDestroy()
                  throws java.lang.Exception
Description copied from class: ComponentSupport
do actually destory action

Specified by:
doDestroy in class ComponentSupport
Throws:
java.lang.Exception

listBuckets

public java.util.Iterator listBuckets()
Specified by:
listBuckets in interface Container
Returns:
所有 bean bucket 的 key 的 iterator

createBucket

public void createBucket(BucketMetaData meta)
                  throws java.lang.Exception
create a bean bucket and bind it's home to jndi

Specified by:
createBucket in interface Container
Parameters:
meta -
Throws:
java.lang.Exception

dropBucket

public void dropBucket(java.lang.String beanClassName)
remove the bucket from container , 发生在 undeploy 一个 bean 的时候

Specified by:
dropBucket in interface Container

invoke

public java.lang.Object invoke(Invocation invocation)
                        throws java.lang.Exception
container 可能对该方法调用进行一些统一的调控,如:安全验证等,然后 forward 给 bucket 执行

Specified by:
invoke in interface Container
Returns:
Throws:
java.lang.Exception

addInterceptor

public void addInterceptor(Interceptor interceptor)
                    throws java.lang.Exception
Description copied from interface: Interceptable
加入一个拦截器

Specified by:
addInterceptor in interface Interceptable
Parameters:
interceptor -
Throws:
java.lang.Exception

interceptors

public java.util.Iterator interceptors()
Description copied from interface: Interceptable
列出所有的拦截器

Specified by:
interceptors in interface Interceptable
Returns:

main

public static void main(java.lang.String[] args)