com.caucho.ejb.cfg
Class EjbConfig

java.lang.Object
  extended by com.caucho.ejb.cfg.EjbConfig
Direct Known Subclasses:
EjbConfigManager

public class EjbConfig
extends java.lang.Object

Manages the EJB configuration files.


Field Summary
protected  EjbManager _ejbManager
           
 
Constructor Summary
EjbConfig(EjbManager ejbContainer)
           
 
Method Summary
<X> void
addAnnotatedType(AnnotatedType<X> rawAnnType, AnnotatedType<X> annType, InjectionTarget<X> injectTarget, java.lang.String moduleName)
           
 void addApplicationException(ApplicationExceptionConfig applicationException)
          Adds an application exception.
 void addConfigProxy(EjbBeanConfigProxy proxy)
           
 void addEjbPath(Path path)
          Adds a path for an EJB config file to the config list.
 void addFunction(FunctionSignature sig, java.lang.String sql)
          Adds a function.
 void addInterceptor(Interceptor interceptor)
          Adds an interceptor.
 void addInterceptorBinding(InterceptorBinding interceptorBinding)
          Binds an interceptor to an ejb.
 void addMessageDestination(MessageDestination messageDestination)
          Adds the message destination mapping
 void configure()
          Configures the pending beans.
 void deploy()
          Configures the pending beans.
 void deployBeans(java.util.ArrayList<EjbBean<?>> beanConfig, JavaClassGenerator javaGen)
          Configures the pending beans.
<X> EjbBean<X>
findBeanByType(java.lang.Class<X> type)
          Finds an entity bean by its abstract schema.
 AppExceptionItem getApplicationException(java.lang.Class<?> exn, boolean isSystem)
          Returns the application exceptions.
 EjbBean<?> getBeanConfig(java.lang.String name)
          Returns the cfg bean with the given name.
 EjbManager getEjbContainer()
          Returns the EJB manager.
 java.util.ArrayList<FunctionSignature> getFunctions()
          Gets the function list.
 Interceptor getInterceptor(java.lang.String className)
          Returns the interceptor with the given class name.
 java.util.ArrayList<InterceptorBinding> getInterceptorBinding(java.lang.String ejbName, boolean isExcludeDefault)
          Returns the interceptor bindings for a given ejb name.
 MessageDestination getMessageDestination(java.lang.String name)
           
 java.lang.String getSchema()
          Returns the schema name.
 boolean isConfiguredBean(java.lang.Class<?> beanType)
           
 void setBeanConfig(java.lang.String name, EjbBean<?> bean)
          Sets the cfg bean with the given name.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

_ejbManager

protected final EjbManager _ejbManager
Constructor Detail

EjbConfig

public EjbConfig(EjbManager ejbContainer)
Method Detail

addEjbPath

public void addEjbPath(Path path)
                throws ConfigException
Adds a path for an EJB config file to the config list.

Throws:
ConfigException

addConfigProxy

public void addConfigProxy(EjbBeanConfigProxy proxy)

getSchema

public java.lang.String getSchema()
Returns the schema name.


getEjbContainer

public EjbManager getEjbContainer()
Returns the EJB manager.


getBeanConfig

public EjbBean<?> getBeanConfig(java.lang.String name)
Returns the cfg bean with the given name.


setBeanConfig

public void setBeanConfig(java.lang.String name,
                          EjbBean<?> bean)
Sets the cfg bean with the given name.


getInterceptor

public Interceptor getInterceptor(java.lang.String className)
Returns the interceptor with the given class name.


addInterceptor

public void addInterceptor(Interceptor interceptor)
Adds an interceptor.


getInterceptorBinding

public java.util.ArrayList<InterceptorBinding> getInterceptorBinding(java.lang.String ejbName,
                                                                     boolean isExcludeDefault)
Returns the interceptor bindings for a given ejb name.


addApplicationException

public void addApplicationException(ApplicationExceptionConfig applicationException)
Adds an application exception.


getApplicationException

public AppExceptionItem getApplicationException(java.lang.Class<?> exn,
                                                boolean isSystem)
Returns the application exceptions.


addInterceptorBinding

public void addInterceptorBinding(InterceptorBinding interceptorBinding)
Binds an interceptor to an ejb.


addMessageDestination

public void addMessageDestination(MessageDestination messageDestination)
Adds the message destination mapping


getMessageDestination

public MessageDestination getMessageDestination(java.lang.String name)

isConfiguredBean

public boolean isConfiguredBean(java.lang.Class<?> beanType)

addAnnotatedType

public <X> void addAnnotatedType(AnnotatedType<X> rawAnnType,
                                 AnnotatedType<X> annType,
                                 InjectionTarget<X> injectTarget,
                                 java.lang.String moduleName)

findBeanByType

public <X> EjbBean<X> findBeanByType(java.lang.Class<X> type)
Finds an entity bean by its abstract schema.


addFunction

public void addFunction(FunctionSignature sig,
                        java.lang.String sql)
Adds a function.


getFunctions

public java.util.ArrayList<FunctionSignature> getFunctions()
Gets the function list.


configure

public void configure()
               throws ConfigException
Configures the pending beans.

Throws:
ConfigException

deploy

public void deploy()
            throws ConfigException
Configures the pending beans.

Throws:
ConfigException

deployBeans

public void deployBeans(java.util.ArrayList<EjbBean<?>> beanConfig,
                        JavaClassGenerator javaGen)
                 throws java.lang.Exception
Configures the pending beans.

Throws:
java.lang.Exception

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object