public class EjbBean<X> extends DescriptionGroupConfig implements EnvironmentBean, DependencyBean
DescriptionGroupConfig.Icon
Modifier and Type | Field and Description |
---|---|
protected boolean |
_isContainerTransaction |
protected java.lang.ClassLoader |
_jClassLoader |
protected java.util.ArrayList<AnnotatedType<? super X>> |
_localList |
protected java.util.ArrayList<AnnotatedType<? super X>> |
_remoteList |
Constructor and Description |
---|
EjbBean(EjbConfig ejbConfig,
AnnotatedType<X> rawAnnType,
AnnotatedType<X> annType,
java.lang.String ejbModuleName)
Creates a new entity bean configuration.
|
EjbBean(EjbConfig ejbConfig,
java.lang.String ejbModuleName)
Creates a new entity bean configuration.
|
Modifier and Type | Method and Description |
---|---|
void |
addAfterBeginMethod(AfterBeginMethod<X> method) |
void |
addAsyncMethod(AsyncConfig async) |
void |
addBeanDependency(java.lang.String ejbName)
Add a bean dependency.
|
void |
addBeforeCompletionMethod(BeforeCompletionMethod<X> method) |
void |
addBuilderProgram(ConfigProgram init)
Adds an undefined value, e.g.
|
void |
addBusinessLocal(java.lang.Class<?> localApi) |
void |
addBusinessRemote(java.lang.Class<?> remoteApi) |
void |
addConcurrentMethod(ConcurrentMethod<X> concurrentMethod)
Adds a new concurrent-method
|
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,
boolean isDefault)
Adds a new interceptor.
|
void |
addLocal(java.lang.Class<?> local)
Sets the ejb local interface
|
protected void |
addLocalType(BaseType local) |
void |
addLocalWrapper(AnnotatedType<? super X> local)
Sets the local interface class.
|
void |
addMethod(EjbMethodPattern<X> method)
Adds a method.
|
void |
addPostConstruct(PostConstructType<X> postConstruct) |
<T> void |
addRemote(java.lang.Class<T> remote) |
<T> void |
addRemoteType(BaseType remote)
Sets the ejb remote interface
|
void |
addRemoteWrapper(AnnotatedType<? super X> remote)
Sets the remote interface class.
|
void |
addRemoveMethod(RemoveMethod<X> removeMethod)
Adds a new remove-method
|
boolean |
classHasMethod(AnnotatedType<?> cl,
AnnotatedMethod<?> method)
Tests is a method is declared in a class.
|
protected BeanGenerator<X> |
createBeanGenerator()
Creates the BeanGenerator generator instance
|
DataSourceRef |
createDataSource() |
EjbLocalRef |
createEjbLocalRef() |
EjbRef |
createEjbRef() |
EnvEntry |
createEnvEntry() |
MessageDestinationRef |
createMessageDestinationRef() |
EjbMethodPattern<X> |
createMethod(MethodSignature sig)
Adds a method.
|
ResourceEnvRef |
createResourceEnvRef() |
ResourceRef |
createResourceRef() |
AbstractEjbBeanManager<X> |
deployServer(EjbManager ejbContainer,
EjbLazyGenerator<X> lazyGenerator)
Deploys the bean.
|
java.lang.RuntimeException |
error(java.lang.Exception e)
Returns an error.
|
ConfigException |
error(java.lang.String msg)
Returns an error.
|
protected <T> AnnotatedMethod<? super T> |
findFirstCreateMethod(AnnotatedType<T> cl) |
static <Y> AnnotatedMethod<? super Y> |
findMethod(MethodSignature sig,
AnnotatedType<Y> cl,
java.lang.String intf)
Finds the method in the class.
|
AnnotatedTypeImpl<X> |
getAnnotatedType() |
java.util.ArrayList<java.lang.String> |
getBeanDependList()
Gets the bean depend list.
|
protected java.lang.String |
getBeanType() |
InjectManager |
getCdiManager() |
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<X> |
getEJBClass()
Gets the ejb implementation class.
|
java.lang.String |
getEJBClassName()
Gets the ejb implementation class.
|
EjbManager |
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(AnnotatedMethod<?> 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.
|
InjectionTarget<X> |
getInjectionTarget() |
EjbJar |
getJar() |
int |
getLine()
Gets the line
|
AnnotatedType<X> |
getLocalBean() |
java.util.ArrayList<AnnotatedType<? super X>> |
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 <X,T> AnnotatedMethod<? super X> |
getMethod(AnnotatedType<X> cl,
AnnotatedMethod<? extends T> sourceMethod)
Finds the method in the class.
|
static <X> AnnotatedMethod<? super X> |
getMethod(AnnotatedType<X> cl,
java.lang.String name,
java.lang.Class<?>[] param)
Finds the method in the class.
|
protected AnnotatedMethod<? super X> |
getMethod(java.lang.String methodName,
java.lang.Class<?>[] paramTypes)
Finds the method in the class.
|
java.util.ArrayList<EjbMethodPattern<X>> |
getMethodList()
returns the method list.
|
EjbMethodPattern<X> |
getMethodPattern(AnnotatedMethod<?> method,
java.lang.String intf)
Gets the best method.
|
java.lang.String |
getModuleName() |
AnnotatedType<X> |
getRawAnnotatedType() |
java.util.ArrayList<AnnotatedType<? super X>> |
getRemoteList()
Gets the remote interface class.
|
java.util.ArrayList<ResourceGroupConfig> |
getResourceList() |
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.
|
long |
getTransactionTimeout()
Gets the transaction timeout.
|
void |
init()
Configure initialization.
|
void |
initIntrospect()
Configure initialization.
|
protected void |
introspect() |
protected void |
introspectBean(AnnotatedType<X> type,
java.lang.String defaultName) |
boolean |
isAllowPOJO()
Return true if POJO are allowed.
|
boolean |
isCMP() |
boolean |
isCMP1() |
boolean |
isContainerTransaction()
Returns true if the transaction type is container.
|
boolean |
isMatch(AnnotatedMethod<?> method) |
protected java.lang.Class<?> |
loadClass(java.lang.String className) |
void |
setAllowPOJO(boolean allowPOJO)
Sets true if POJO are allowed.
|
void |
setAroundInvoke(AroundInvokeConfig aroundInvoke) |
void |
setConcurrencyManagementType(java.lang.String type) |
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<X> ejbClass)
Sets the ejb implementation class.
|
void |
setEJBClassWrapper(AnnotatedType<X> ejbClass)
Sets the ejb implementation class.
|
void |
setEJBName(java.lang.String ejbName)
Sets the ejbName
|
void |
setInit(ContainerProgram init) |
void |
setInjectionTarget(InjectionTarget<X> injectTarget) |
void |
setJar(EjbJar jar) |
void |
setLocalBean(boolean isLocal) |
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 |
setSecurityIdentity(EjbSecurityIdentity securityIdentity)
Sets the security identity
|
void |
setStatefulTimeout(EjbTimeout timeout) |
void |
setTransactionTimeout(Period timeout)
Sets the transaction timeout.
|
java.lang.String |
toString() |
void |
validateException(AnnotatedMethod<?> method,
java.lang.Class<?> e) |
void |
validateExceptions(AnnotatedMethod<?> caller,
AnnotatedMethod<? super X> callee) |
void |
validateExceptions(AnnotatedMethod<?> method,
java.lang.Class<?>[] exn)
Check that the method throws the expected exceptions.
|
protected <T> void |
validateLocal(AnnotatedType<T> objectType)
Validates the local interface.
|
protected <T> void |
validateRemote(AnnotatedType<T> objectType)
Validates the remote interface.
|
createIcon, getDisplayName, setDescription, setDisplayName, setId
protected java.lang.ClassLoader _jClassLoader
protected java.util.ArrayList<AnnotatedType<? super X>> _remoteList
protected java.util.ArrayList<AnnotatedType<? super X>> _localList
protected boolean _isContainerTransaction
public EjbBean(EjbConfig ejbConfig, java.lang.String ejbModuleName)
public EjbBean(EjbConfig ejbConfig, AnnotatedType<X> rawAnnType, AnnotatedType<X> annType, java.lang.String ejbModuleName)
public EjbConfig getConfig()
public EjbManager getEjbContainer()
public InjectManager getCdiManager()
public java.lang.String getModuleName()
public EjbJar getJar()
public void setJar(EjbJar jar)
public void setAroundInvoke(AroundInvokeConfig aroundInvoke)
public void addAsyncMethod(AsyncConfig async)
public void setInjectionTarget(InjectionTarget<X> injectTarget)
public InjectionTarget<X> getInjectionTarget()
public java.lang.String getTimeoutMethodName()
@Configurable public void addRemoveMethod(RemoveMethod<X> removeMethod)
@Configurable public void addConcurrentMethod(ConcurrentMethod<X> concurrentMethod)
public void addAfterBeginMethod(AfterBeginMethod<X> method)
public void addBeforeCompletionMethod(BeforeCompletionMethod<X> method)
public void addInterceptor(Interceptor interceptor, boolean isDefault)
public java.lang.String getEJBModuleName()
public java.lang.ClassLoader getClassLoader()
getClassLoader
in interface EnvironmentBean
protected 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<X> ejbClass) throws ConfigException
ConfigException
public void setEJBClassWrapper(AnnotatedType<X> ejbClass) throws ConfigException
ConfigException
public java.lang.Class<X> getEJBClass()
public AnnotatedType<X> getRawAnnotatedType()
public AnnotatedTypeImpl<X> getAnnotatedType()
public java.lang.String getEJBFullClassName()
public java.lang.String getEJBClassName()
public java.lang.String getFullImplName()
public <T> void addRemote(java.lang.Class<T> remote) throws ConfigException
ConfigException
public <T> void addRemoteType(BaseType remote) throws ConfigException
ConfigException
public void addRemoteWrapper(AnnotatedType<? super X> remote) throws ConfigException
ConfigException
public java.util.ArrayList<AnnotatedType<? super X>> getRemoteList()
public void addLocal(java.lang.Class<?> local) throws ConfigException
ConfigException
protected void addLocalType(BaseType local)
public void addLocalWrapper(AnnotatedType<? super X> local) throws ConfigException
ConfigException
public java.util.ArrayList<AnnotatedType<? super X>> getLocalList()
public AnnotatedType<X> getLocalBean()
public boolean isContainerTransaction()
public void setContainerTransaction(boolean isContainerTransaction)
public void setConcurrencyManagementType(java.lang.String type)
public void setStatefulTimeout(EjbTimeout timeout)
public EjbMethodPattern<X> createMethod(MethodSignature sig)
public void addMethod(EjbMethodPattern<X> method)
public boolean isMatch(AnnotatedMethod<?> method)
public EjbMethodPattern<X> getMethodPattern(AnnotatedMethod<?> method, java.lang.String intf)
public java.util.ArrayList<EjbMethodPattern<X>> getMethodList()
public void setTransactionTimeout(Period timeout)
public void addBusinessLocal(java.lang.Class<?> localApi)
public void addBusinessRemote(java.lang.Class<?> remoteApi)
public void setLocalBean(boolean isLocal)
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 DependencyBean
public 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 DataSourceRef createDataSource()
public EnvEntry createEnvEntry()
public EjbRef createEjbRef()
public EjbLocalRef createEjbLocalRef()
public ResourceRef createResourceRef()
public ResourceEnvRef createResourceEnvRef()
public java.util.ArrayList<ResourceGroupConfig> getResourceList()
public void setInit(ContainerProgram init)
public void addPostConstruct(PostConstructType<X> postConstruct)
public ContainerProgram getInitProgram()
public ContainerProgram getServerProgram()
@PostConstruct public void init() throws ConfigException
ConfigException
protected void introspect()
protected BeanGenerator<X> createBeanGenerator()
public void initIntrospect() throws ConfigException
ConfigException
public AbstractEjbBeanManager<X> deployServer(EjbManager ejbContainer, EjbLazyGenerator<X> lazyGenerator) throws java.lang.ClassNotFoundException, ConfigException
java.lang.ClassNotFoundException
ConfigException
protected <T> void validateLocal(AnnotatedType<T> objectType) throws ConfigException
ConfigException
protected <T> void validateRemote(AnnotatedType<T> objectType) throws ConfigException
ConfigException
public java.lang.String getSkeletonName()
protected java.lang.String getBeanType()
protected AnnotatedMethod<? super X> getMethod(java.lang.String methodName, java.lang.Class<?>[] paramTypes)
cl
- owning classmethod
- source methodpublic static <X,T> AnnotatedMethod<? super X> getMethod(AnnotatedType<X> cl, AnnotatedMethod<? extends T> sourceMethod)
cl
- owning classmethod
- source methodpublic static <X> AnnotatedMethod<? super X> getMethod(AnnotatedType<X> cl, java.lang.String name, java.lang.Class<?>[] param)
cl
- owning classname
- method name to matchparams
- method parameters to matchpublic boolean isCMP()
public boolean isCMP1()
public static <Y> AnnotatedMethod<? super Y> findMethod(MethodSignature sig, AnnotatedType<Y> cl, java.lang.String intf)
cl
- owning classname
- method name to matchparams
- method parameters to matchpublic static java.lang.String getClassName(java.lang.Class<?> cl)
public static java.lang.String getShortClassName(java.lang.Class<?> cl)
public boolean classHasMethod(AnnotatedType<?> cl, AnnotatedMethod<?> method)
public void validateException(AnnotatedMethod<?> method, java.lang.Class<?> e) throws ConfigException
ConfigException
public void validateExceptions(AnnotatedMethod<?> method, java.lang.Class<?>[] exn) throws ConfigException
method
- the method to testexn
- the expected exceptionsConfigException
public void validateExceptions(AnnotatedMethod<?> caller, AnnotatedMethod<? super X> callee) throws ConfigException
ConfigException
protected <T> AnnotatedMethod<? super T> findFirstCreateMethod(AnnotatedType<T> cl)
protected void introspectBean(AnnotatedType<X> type, java.lang.String defaultName) throws ConfigException
ConfigException
public static java.lang.String getFullMethodName(AnnotatedMethod<?> method)
public static java.lang.String getFullMethodName(java.lang.String methodName, java.lang.Class<?>[] params)
public ConfigException error(java.lang.String msg)
public java.lang.RuntimeException error(java.lang.Exception e)
public java.lang.String toString()
toString
in class java.lang.Object