public class EjbManager extends java.lang.Object implements ScanListener, EnvironmentListener
Modifier and Type | Method and Description |
---|---|
void |
addServer(AbstractEjbBeanManager<?> server)
Adds a server.
|
void |
classMatchEvent(EnvironmentClassLoader loader,
Path root,
java.lang.String className)
Callback to note the class matches
|
void |
configureRootPath(Path root)
Adds a root URL
|
static EjbManager |
create()
Returns the local container.
|
static EjbManager |
create(java.lang.ClassLoader loader)
Returns the local container.
|
<T> void |
createBean(AnnotatedType<T> type,
InjectionTarget<T> injectionTarget) |
void |
destroy()
Closes the container.
|
void |
environmentBind(EnvironmentClassLoader loader)
Handles the case where the environment is configuring
|
void |
environmentConfigure(EnvironmentClassLoader loader)
Handles the case where the environment is configuring
|
void |
environmentStart(EnvironmentClassLoader loader)
Handles the case where the environment is starting (after init).
|
void |
environmentStop(EnvironmentClassLoader loader)
Handles the case where the environment is stopping
|
AppExceptionItem |
getApplicationException(java.lang.Class<?> exceptionClass)
Returns the configuration for an application exception.
|
EnvironmentClassLoader |
getClassLoader()
Returns the parent loader
|
EjbConfigManager |
getConfigManager()
Returns the configuration manager.
|
static EjbManager |
getCurrent()
Returns the local container.
|
static EjbManager |
getCurrent(java.lang.ClassLoader loader)
Returns the current environment container.
|
java.lang.ClassLoader |
getGlobalClassLoader() |
InjectManager |
getInjectManager() |
java.lang.ClassLoader |
getIntrospectionClassLoader()
Returns the introspection class loader
|
int |
getMessageConsumerMax()
The consumer maximum for the container.
|
EjbManager |
getParent() |
EjbProtocolManager |
getProtocolManager()
Returns the protocol manager.
|
int |
getScanPriority()
Since EJB doesn't bytecode enhance, it's priority 1
|
AbstractEjbBeanManager<?> |
getServerByEjbName(java.lang.String name) |
AppExceptionItem |
getSystemException(java.lang.Class<?> exceptionClass)
Returns the configuration for a system exception.
|
Path |
getWorkDir()
The work directory for EJB-generated files
|
void |
init() |
boolean |
isAutoCompile()
true if beans should be auto-compiled
|
boolean |
isConfiguredBean(java.lang.Class<?> beanType) |
boolean |
isRootScannable(Path root,
java.lang.String packageRoot)
Returns true if the root is a valid scannable root.
|
boolean |
isScanMatchAnnotation(CharBuffer annotationName)
Returns true if the string matches an annotation class.
|
ScanClass |
scanClass(Path root,
java.lang.String packageRoot,
java.lang.String className,
int modifiers)
Returns the state when scanning the class
|
void |
setAutoCompile(boolean isAutoCompile)
true if beans should be auto-compiled
|
void |
setGlobalClassLoader(java.lang.ClassLoader globalClassLoader) |
void |
setJmsConnectionFactory(ConnectionFactory factory)
The JMS connection factory for the container.
|
void |
setMessageConsumerMax(int consumerMax)
Sets the consumer maximum for the container.
|
static void |
setScanAll() |
void |
setScannableRoots(java.util.ArrayList<Path> roots) |
void |
setWorkDir(Path workDir)
The work directory for EJB-generated files
|
void |
start() |
java.lang.String |
toString() |
public static EjbManager create()
public static EjbManager create(java.lang.ClassLoader loader)
public static EjbManager getCurrent()
public static EjbManager getCurrent(java.lang.ClassLoader loader)
public static void setScanAll()
public void setGlobalClassLoader(java.lang.ClassLoader globalClassLoader)
public EnvironmentClassLoader getClassLoader()
public java.lang.ClassLoader getGlobalClassLoader()
public java.lang.ClassLoader getIntrospectionClassLoader()
public EjbConfigManager getConfigManager()
public EjbManager getParent()
public EjbProtocolManager getProtocolManager()
public InjectManager getInjectManager()
public void setAutoCompile(boolean isAutoCompile)
public boolean isAutoCompile()
public void setWorkDir(Path workDir)
public Path getWorkDir()
public void setJmsConnectionFactory(ConnectionFactory factory)
public void setMessageConsumerMax(int consumerMax)
public int getMessageConsumerMax()
public boolean isConfiguredBean(java.lang.Class<?> beanType)
public <T> void createBean(AnnotatedType<T> type, InjectionTarget<T> injectionTarget)
public void addServer(AbstractEjbBeanManager<?> server)
public AbstractEjbBeanManager<?> getServerByEjbName(java.lang.String name)
public int getScanPriority()
getScanPriority
in interface ScanListener
public void configureRootPath(Path root)
public void setScannableRoots(java.util.ArrayList<Path> roots)
public boolean isRootScannable(Path root, java.lang.String packageRoot)
isRootScannable
in interface ScanListener
public ScanClass scanClass(Path root, java.lang.String packageRoot, java.lang.String className, int modifiers)
ScanListener
scanClass
in interface ScanListener
root
- the module/jar's root pathpackageRoot
- the virtual package root (usually for Testing)className
- the class namemodifiers
- the class modifierspublic boolean isScanMatchAnnotation(CharBuffer annotationName)
ScanListener
isScanMatchAnnotation
in interface ScanListener
public void classMatchEvent(EnvironmentClassLoader loader, Path root, java.lang.String className)
classMatchEvent
in interface ScanListener
public AppExceptionItem getSystemException(java.lang.Class<?> exceptionClass)
public AppExceptionItem getApplicationException(java.lang.Class<?> exceptionClass)
public void init()
public void start() throws ConfigException
ConfigException
public void destroy()
public void environmentConfigure(EnvironmentClassLoader loader)
environmentConfigure
in interface EnvironmentListener
public void environmentBind(EnvironmentClassLoader loader)
environmentBind
in interface EnvironmentListener
public void environmentStart(EnvironmentClassLoader loader)
environmentStart
in interface EnvironmentListener
public void environmentStop(EnvironmentClassLoader loader)
environmentStop
in interface EnvironmentListener
public java.lang.String toString()
toString
in class java.lang.Object