|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.groiss.component.BeanManager
public class BeanManager
Manages transaction aware components (="beans").
The beans should implement javax.ejb.SessionSynchronization.
| Constructor Summary | |
|---|---|
BeanManager()
|
|
| Method Summary | |
|---|---|
static void |
addBean(String key,
Class<?> service)
Add a bean to the list of known user bean classes. |
static void |
addBean(String key,
Class<?> service,
boolean isSystemBean)
Add a bean to the list of known bean classes. |
static void |
bindThreadToTransaction(UserTransaction ut)
|
static void |
commit()
Commits the transaction and releases all beans. |
static Object |
getBean(String key)
Gets a bean instance for a bean class registered with a key. |
static UserTransaction |
getUserTransaction()
The client or the bean manager itself gets a UserTransaction. |
static UserTransaction |
getUserTransaction(String name)
The client or the bean manager itself gets a UserTransaction. |
static void |
rollback()
Rolls back the transaction and releases all beans. |
static void |
setExplicitTransactionMode(boolean value)
If set to true, a thread will not get a usertransaction when calling method getUserTransaction() or
method getUserTransaction(String) with null as parameter. |
static void |
unbindThreadFromTransaction()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public BeanManager()
| Method Detail |
|---|
public static Object getBean(String key)
key - the key which was used to register a bean class
public static void addBean(String key,
Class<?> service,
boolean isSystemBean)
key - a unique key for the beanservice - the beans classisSystemBean - true, if the bean is an internal @enterprise bean. Do not use this call in application code.
public static void addBean(String key,
Class<?> service)
key - a unique key for the beanservice - the beans classpublic static void commit()
public static void rollback()
public static UserTransaction getUserTransaction()
public static UserTransaction getUserTransaction(String name)
public static void bindThreadToTransaction(UserTransaction ut)
public static void unbindThreadFromTransaction()
public static void setExplicitTransactionMode(boolean value)
getUserTransaction() or
method getUserTransaction(String) with null as parameter. Instead an exception will be thrown.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||