|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.caucho.config.types.DescriptionGroupConfig
com.caucho.ejb.cfg.EjbBean
public class EjbBean
Configuration for an ejb bean.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class com.caucho.config.types.DescriptionGroupConfig |
|---|
DescriptionGroupConfig.Icon |
| Field Summary | |
|---|---|
protected BeanGenerator |
_bean
|
protected boolean |
_isContainerTransaction
|
protected java.lang.ClassLoader |
_jClassLoader
|
protected ApiClass |
_localHome
|
protected java.util.ArrayList<ApiClass> |
_localList
|
protected java.util.ArrayList<EjbMethodPattern> |
_methodList
|
protected ApiClass |
_remoteHome
|
protected java.util.ArrayList<ApiClass> |
_remoteList
|
| Constructor Summary | |
|---|---|
EjbBean(EjbConfig ejbConfig,
java.lang.String ejbModuleName)
Creates a new entity bean configuration. |
|
| Method Summary | |
|---|---|
void |
addBeanDependency(java.lang.String ejbName)
Add a bean dependency. |
void |
addBuilderProgram(ConfigProgram init)
Adds an undefined value, e.g. |
void |
addBusinessLocal(java.lang.Class localClass)
Adds a local interface class |
void |
addBusinessRemote(java.lang.Class remoteClass)
Adds a remote interface class |
void |
addDepend(Path path)
Add a dependency. |
void |
addDependency(java.lang.Class cl)
Add a dependency. |
void |
addDependency(PersistentDependency depend)
Add a dependency. |
void |
addDependencyList(java.util.ArrayList<PersistentDependency> dependList)
Adds a list of dependencies. |
void |
addInitProgram(ConfigProgram init)
Adds an init program. |
void |
addInterceptor(Interceptor interceptor)
Adds a new interceptor. |
void |
addMethod(EjbMethodPattern method)
Adds a method. |
void |
addPostConstruct(PostConstructType postConstruct)
|
void |
addRemoveMethod(RemoveMethod removeMethod)
Adds a new remove-method |
void |
assembleBeanMethods()
Introspects the bean's methods. |
GenClass |
assembleGenerator(java.lang.String fullClassName)
Assembles the generator. |
boolean |
classHasMethod(ApiMethod method,
ApiClass cl)
Tests is a method is declared in a class. |
boolean |
containsInterceptor(java.lang.String interceptorClassName)
Returns true if the interceptor is already configured. |
protected BeanGenerator |
createBeanGenerator()
Creates the BeanGenerator generator instance |
MessageDestinationRef |
createMessageDestinationRef()
|
EjbMethodPattern |
createMethod(MethodSignature sig)
Adds a method. |
protected void |
createViews21()
Creates the views. |
AbstractServer |
deployServer(EjbContainer ejbContainer,
JavaClassGenerator javaGen)
Deploys the bean. |
java.lang.RuntimeException |
error(java.lang.Exception e)
Returns an error. |
ConfigException |
error(java.lang.String msg)
Returns an error. |
protected ApiMethod |
findFirstCreateMethod(ApiClass cl)
|
static ApiMethod |
findMethod(java.util.ArrayList<ApiMethod> methods,
ApiMethod method)
Finds the method in the class. |
static ApiMethod |
findMethod(MethodSignature sig,
ApiClass cl,
java.lang.String intf)
Finds the method in the class. |
void |
generate(JavaClassGenerator javaGen,
boolean isAutoCompile)
Generates the class. |
java.lang.String |
getAroundInvokeMethodName()
|
java.util.ArrayList<java.lang.String> |
getBeanDependList()
Gets the bean depend list. |
java.lang.ClassLoader |
getClassLoader()
Returns the class loader. |
static java.lang.String |
getClassName(java.lang.Class cl)
Returns a printable version of a class. |
EjbConfig |
getConfig()
|
java.util.ArrayList<PersistentDependency> |
getDependList()
Gets the depend list. |
java.lang.Class |
getEJBClass()
Gets the ejb implementation class. |
java.lang.String |
getEJBClassName()
Gets the ejb implementation class. |
ApiClass |
getEJBClassWrapper()
Gets the ejb implementation class. |
EjbContainer |
getEjbContainer()
|
java.lang.String |
getEJBFullClassName()
Gets the ejb implementation class. |
java.lang.String |
getEJBKind()
Returns the kind of bean. |
java.lang.String |
getEJBModuleName()
|
java.lang.String |
getEJBName()
Gets the ejbName |
java.lang.String |
getFilename()
Gets the file name |
java.lang.String |
getFullImplName()
Gets the implementation class name. |
static java.lang.String |
getFullMethodName(ApiMethod method)
Returns a full method name with arguments. |
static java.lang.String |
getFullMethodName(java.lang.String methodName,
java.lang.Class[] params)
Returns a full method name with arguments. |
ContainerProgram |
getInitProgram()
Gets the init program. |
Interceptor |
getInterceptor(java.lang.String interceptorClassName)
Returns the interceptor for a given class name. |
java.util.ArrayList<Interceptor> |
getInterceptors()
Returns the interceptors. |
java.util.ArrayList<Interceptor> |
getInvokeInterceptors(java.lang.String methodName)
Returns the interceptors. |
int |
getLine()
Gets the line |
ApiClass |
getLocalHome()
Gets the local home interface class. |
java.util.ArrayList<ApiClass> |
getLocalList()
Gets the local interface class. |
java.lang.String |
getLocation()
Gets the location |
java.lang.String |
getMappedName()
The mapped-name is the published name used by IIOP, Hessian, and jndi-remote-prefix, jndi-local-prefix. |
static ApiMethod |
getMethod(ApiClass cl,
ApiMethod sourceMethod)
Finds the method in the class. |
static ApiMethod |
getMethod(ApiClass cl,
java.lang.String name,
java.lang.Class[] param)
Finds the method in the class. |
static ApiMethod |
getMethod(java.util.ArrayList<ApiClass> apiList,
java.lang.String name,
java.lang.Class[] param)
Finds the method in the class. |
ApiMethod |
getMethod(java.lang.String methodName,
java.lang.Class[] paramTypes)
Finds the method in the class. |
java.util.ArrayList<EjbMethodPattern> |
getMethodList()
returns the method list. |
EjbMethodPattern |
getMethodPattern(ApiMethod method,
java.lang.String intf)
Gets the best method. |
static java.util.ArrayList<ApiMethod> |
getMethods(java.util.ArrayList<ApiClass> apiList)
Returns all the method in the class. |
java.lang.Class |
getRemoteClass()
Gets the remote class. |
ApiClass |
getRemoteHome()
Gets the ejb implementation class. |
java.lang.Class |
getRemoteHomeClass()
Gets the remote home class. |
java.util.ArrayList<ApiClass> |
getRemoteList()
Gets the remote interface class. |
RemoveMethod |
getRemoveMethod(java.lang.reflect.Method method)
Returns the remove-method for the given method. |
java.util.ArrayList<RemoveMethod> |
getRemoveMethods()
Returns the remove-method list. |
CallChain |
getSecurityChain(CallChain next,
ApiMethod method,
java.lang.String prefix)
|
ContainerProgram |
getServerProgram()
Gets the server program. |
static java.lang.String |
getShortClassName(java.lang.Class cl)
Returns a printable version of a class. |
java.lang.String |
getSkeletonName()
|
java.lang.String |
getTimeoutMethodName()
Returns the timeout method name. |
TransactionAttributeType |
getTransactionAttribute(ApiMethod method,
java.lang.String intf)
Returns the matching transaction attribute. |
CallChain |
getTransactionChain(CallChain next,
ApiMethod apiMethod,
ApiMethod implMethod,
java.lang.String prefix)
|
long |
getTransactionTimeout()
Gets the transaction timeout. |
boolean |
hasException(ApiMethod method,
java.lang.Class exn)
|
void |
init()
Configure initialization. |
void |
initIntrospect()
Configure initialization. |
protected void |
introspect()
|
protected void |
introspectBean(ApiClass type,
java.lang.String defaultName)
|
protected EjbBaseMethod |
introspectEJBMethod(ApiMethod method)
Introspects an ejb method. |
boolean |
isAllowPOJO()
Return true if POJO are allowed. |
boolean |
isCMP()
|
boolean |
isCMP1()
|
boolean |
isContainerTransaction()
Returns true if the transaction type is container. |
boolean |
isEJB3()
|
static boolean |
isEquiv(ApiMethod oldMethod,
ApiMethod method)
True if we've already handled the method. |
static boolean |
isMatch(ApiMethod methodA,
ApiMethod methodB)
|
static boolean |
isMatch(ApiMethod method,
java.lang.String name,
java.lang.Class[] param)
|
protected java.lang.Class |
loadClass(java.lang.String className)
|
void |
setAllowPOJO(boolean allowPOJO)
Sets true if POJO are allowed. |
void |
setAroundInvoke(AroundInvokeConfig aroundInvoke)
|
void |
setAroundInvokeMethodName(java.lang.String aroundInvokeMethodName)
|
void |
setConfigLocation(java.lang.String filename,
int line)
Sets the location |
void |
setContainerTransaction(boolean isContainerTransaction)
Returns true if the transaction type is container. |
void |
setEJBClass(java.lang.Class ejbClass)
Sets the ejb implementation class. |
void |
setEJBClassWrapper(ApiClass ejbClass)
Sets the ejb implementation class. |
void |
setEJBName(java.lang.String ejbName)
Sets the ejbName |
void |
setHome(java.lang.Class homeClass)
Sets the remote home interface class. |
void |
setInit(ContainerProgram init)
|
void |
setLocal(java.lang.Class local)
Sets the ejb local interface |
void |
setLocalHome(java.lang.Class localHomeClass)
Sets the ejb local home interface |
void |
setLocalHomeWrapper(ApiClass localHome)
Sets the local home interface class. |
void |
setLocalWrapper(ApiClass local)
Sets the local interface class. |
void |
setLocation(java.lang.String location)
Sets the location |
void |
setMappedName(java.lang.String mappedName)
The mapped-name is the remote published name used by IIOP, Hessian, and jndi-remote-prefix, jndi-local-prefix. |
void |
setRemote(java.lang.Class remote)
Sets the ejb remote interface |
void |
setRemoteHomeWrapper(ApiClass remoteHome)
Sets the remote home interface class. |
void |
setRemoteWrapper(ApiClass remote)
Sets the remote interface class. |
void |
setSecurityIdentity(EjbSecurityIdentity securityIdentity)
Sets the security identity |
void |
setTransactionTimeout(Period timeout)
Sets the transaction timeout. |
java.lang.String |
toString()
|
void |
validateException(ApiMethod method,
java.lang.Class e)
|
void |
validateExceptions(ApiMethod caller,
ApiMethod callee)
|
void |
validateExceptions(ApiMethod method,
java.lang.Class[] exn)
Check that the method throws the expected exceptions. |
protected void |
validateImplMethod(ApiMethod method)
Validates an implementation method. |
protected ApiMethod |
validateMethod(java.lang.String methodName,
java.lang.Class[] param)
|
protected ApiMethod |
validateMethod(java.lang.String methodName,
java.lang.Class[] param,
ApiMethod sourceMethod,
ApiClass sourceClass)
Check that a method exists, is public and is not abstract. |
protected ApiMethod |
validateMethod(java.lang.String methodName,
java.lang.Class[] param,
ApiMethod sourceMethod,
ApiClass sourceClass,
boolean isOptional)
Check that a method exists, is public and is not abstract. |
protected ApiMethod |
validateNonFinalMethod(java.lang.String methodName,
java.lang.Class[] param)
|
protected ApiMethod |
validateNonFinalMethod(java.lang.String methodName,
java.lang.Class[] param,
ApiMethod sourceMethod,
ApiClass sourceClass)
|
protected ApiMethod |
validateNonFinalMethod(java.lang.String methodName,
java.lang.Class[] param,
ApiMethod sourceMethod,
ApiClass sourceClass,
boolean isOptional)
Check that a method exists, is public, not abstract, and not final. |
protected ApiMethod |
validateNonFinalMethod(java.lang.String methodName,
java.lang.Class[] param,
boolean isOptional)
|
protected void |
validatePublicMethod(ApiMethod method)
Check that a method is public. |
protected void |
validateRemote(ApiClass objectClass)
Validates the remote interface. |
| Methods inherited from class com.caucho.config.types.DescriptionGroupConfig |
|---|
createIcon, getDisplayName, setDescription, setDisplayName, setId |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected java.lang.ClassLoader _jClassLoader
protected ApiClass _remoteHome
protected java.util.ArrayList<ApiClass> _remoteList
protected ApiClass _localHome
protected java.util.ArrayList<ApiClass> _localList
protected BeanGenerator _bean
protected boolean _isContainerTransaction
protected java.util.ArrayList<EjbMethodPattern> _methodList
| Constructor Detail |
|---|
public EjbBean(EjbConfig ejbConfig,
java.lang.String ejbModuleName)
| Method Detail |
|---|
public EjbConfig getConfig()
public EjbContainer getEjbContainer()
public java.lang.String getAroundInvokeMethodName()
public void setAroundInvokeMethodName(java.lang.String aroundInvokeMethodName)
public void setAroundInvoke(AroundInvokeConfig aroundInvoke)
public RemoveMethod getRemoveMethod(java.lang.reflect.Method method)
public java.util.ArrayList<RemoveMethod> getRemoveMethods()
public java.lang.String getTimeoutMethodName()
public void addRemoveMethod(RemoveMethod removeMethod)
public java.util.ArrayList<Interceptor> getInterceptors()
public java.util.ArrayList<Interceptor> getInvokeInterceptors(java.lang.String methodName)
public void addInterceptor(Interceptor interceptor)
public boolean containsInterceptor(java.lang.String interceptorClassName)
public Interceptor getInterceptor(java.lang.String interceptorClassName)
public java.lang.String getEJBModuleName()
public java.lang.ClassLoader getClassLoader()
getClassLoader in interface EnvironmentBeanprotected java.lang.Class loadClass(java.lang.String className)
public void setConfigLocation(java.lang.String filename,
int line)
public void setLocation(java.lang.String location)
public java.lang.String getLocation()
public java.lang.String getFilename()
public int getLine()
public void setAllowPOJO(boolean allowPOJO)
public boolean isAllowPOJO()
public void setEJBName(java.lang.String ejbName)
public java.lang.String getEJBName()
public void setMappedName(java.lang.String mappedName)
public java.lang.String getMappedName()
public java.lang.String getEJBKind()
public void setEJBClass(java.lang.Class ejbClass)
throws ConfigException
ConfigException
public void setEJBClassWrapper(ApiClass ejbClass)
throws ConfigException
ConfigExceptionpublic java.lang.Class getEJBClass()
public ApiClass getEJBClassWrapper()
public java.lang.String getEJBFullClassName()
public java.lang.String getEJBClassName()
public java.lang.String getFullImplName()
public void setHome(java.lang.Class homeClass)
throws ConfigException
ConfigException
public void setRemoteHomeWrapper(ApiClass remoteHome)
throws ConfigException
ConfigExceptionpublic ApiClass getRemoteHome()
public java.lang.Class getRemoteHomeClass()
public void setRemote(java.lang.Class remote)
throws ConfigException
ConfigException
public void setRemoteWrapper(ApiClass remote)
throws ConfigException
ConfigExceptionpublic void addBusinessRemote(java.lang.Class remoteClass)
public java.util.ArrayList<ApiClass> getRemoteList()
public java.lang.Class getRemoteClass()
public void setLocalHome(java.lang.Class localHomeClass)
throws ConfigException
ConfigException
public void setLocalHomeWrapper(ApiClass localHome)
throws ConfigException
ConfigExceptionpublic ApiClass getLocalHome()
public void setLocal(java.lang.Class local)
throws ConfigException
ConfigException
public void setLocalWrapper(ApiClass local)
throws ConfigException
ConfigExceptionpublic void addBusinessLocal(java.lang.Class localClass)
public java.util.ArrayList<ApiClass> getLocalList()
public boolean isContainerTransaction()
public void setContainerTransaction(boolean isContainerTransaction)
public EjbMethodPattern createMethod(MethodSignature sig)
public void addMethod(EjbMethodPattern method)
public EjbMethodPattern getMethodPattern(ApiMethod method,
java.lang.String intf)
public java.util.ArrayList<EjbMethodPattern> getMethodList()
public void setTransactionTimeout(Period timeout)
public long getTransactionTimeout()
public MessageDestinationRef createMessageDestinationRef()
public void setSecurityIdentity(EjbSecurityIdentity securityIdentity)
public void addDependencyList(java.util.ArrayList<PersistentDependency> dependList)
public void addDepend(Path path)
public void addDependency(PersistentDependency depend)
addDependency in interface DependencyBeanpublic void addDependency(java.lang.Class cl)
public java.util.ArrayList<PersistentDependency> getDependList()
public void addBeanDependency(java.lang.String ejbName)
public java.util.ArrayList<java.lang.String> getBeanDependList()
public void addInitProgram(ConfigProgram init)
public void addBuilderProgram(ConfigProgram init)
public void setInit(ContainerProgram init)
public void addPostConstruct(PostConstructType postConstruct)
public ContainerProgram getInitProgram()
public ContainerProgram getServerProgram()
public void init()
throws ConfigException
ConfigExceptionprotected void introspect()
protected BeanGenerator createBeanGenerator()
public void initIntrospect()
throws ConfigException
ConfigException
protected void createViews21()
throws ConfigException
ConfigException
public void generate(JavaClassGenerator javaGen,
boolean isAutoCompile)
throws java.lang.Exception
java.lang.Exception
public AbstractServer deployServer(EjbContainer ejbContainer,
JavaClassGenerator javaGen)
throws java.lang.ClassNotFoundException,
ConfigException
java.lang.ClassNotFoundException
ConfigException
protected void validateRemote(ApiClass objectClass)
throws ConfigException
ConfigException
protected ApiMethod validateNonFinalMethod(java.lang.String methodName,
java.lang.Class[] param,
boolean isOptional)
throws ConfigException
ConfigException
protected ApiMethod validateNonFinalMethod(java.lang.String methodName,
java.lang.Class[] param)
throws ConfigException
ConfigException
protected ApiMethod validateNonFinalMethod(java.lang.String methodName,
java.lang.Class[] param,
ApiMethod sourceMethod,
ApiClass sourceClass)
throws ConfigException
ConfigException
protected ApiMethod validateNonFinalMethod(java.lang.String methodName,
java.lang.Class[] param,
ApiMethod sourceMethod,
ApiClass sourceClass,
boolean isOptional)
throws ConfigException
methodName - the name of the method to check forargs - the expected method parameters
ConfigException
protected ApiMethod validateMethod(java.lang.String methodName,
java.lang.Class[] param)
throws ConfigException
ConfigException
protected ApiMethod validateMethod(java.lang.String methodName,
java.lang.Class[] param,
ApiMethod sourceMethod,
ApiClass sourceClass)
throws ConfigException
methodName - the name of the method to check forargs - the expected method parameters
ConfigException
protected ApiMethod validateMethod(java.lang.String methodName,
java.lang.Class[] param,
ApiMethod sourceMethod,
ApiClass sourceClass,
boolean isOptional)
throws ConfigException
methodName - the name of the method to check forargs - the expected method parameters
ConfigExceptionpublic java.lang.String getSkeletonName()
public GenClass assembleGenerator(java.lang.String fullClassName)
throws java.lang.NoSuchMethodException,
ConfigException
java.lang.NoSuchMethodException
ConfigException
public void assembleBeanMethods()
throws ConfigException
ConfigException
protected EjbBaseMethod introspectEJBMethod(ApiMethod method)
throws ConfigException
ConfigException
protected void validateImplMethod(ApiMethod method)
throws ConfigException
ConfigException
public CallChain getTransactionChain(CallChain next,
ApiMethod apiMethod,
ApiMethod implMethod,
java.lang.String prefix)
public CallChain getSecurityChain(CallChain next,
ApiMethod method,
java.lang.String prefix)
protected void validatePublicMethod(ApiMethod method)
throws ConfigException
ConfigException
public static boolean isEquiv(ApiMethod oldMethod,
ApiMethod method)
public TransactionAttributeType getTransactionAttribute(ApiMethod method,
java.lang.String intf)
public ApiMethod getMethod(java.lang.String methodName,
java.lang.Class[] paramTypes)
cl - owning classmethod - source method
public static ApiMethod getMethod(ApiClass cl,
ApiMethod sourceMethod)
cl - owning classmethod - source method
public static ApiMethod getMethod(java.util.ArrayList<ApiClass> apiList,
java.lang.String name,
java.lang.Class[] param)
apiList - owning classname - method name to matchparams - method parameters to match
public static ApiMethod getMethod(ApiClass cl,
java.lang.String name,
java.lang.Class[] param)
cl - owning classname - method name to matchparams - method parameters to match
public boolean isCMP()
public boolean isCMP1()
public boolean isEJB3()
public static boolean isMatch(ApiMethod methodA,
ApiMethod methodB)
public static boolean isMatch(ApiMethod method,
java.lang.String name,
java.lang.Class[] param)
public static ApiMethod findMethod(MethodSignature sig,
ApiClass cl,
java.lang.String intf)
cl - owning classname - method name to matchparams - method parameters to match
public static java.util.ArrayList<ApiMethod> getMethods(java.util.ArrayList<ApiClass> apiList)
public static ApiMethod findMethod(java.util.ArrayList<ApiMethod> methods,
ApiMethod method)