|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.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(java.lang.String key,
java.lang.Class<?> service)
Add a bean to the list of known user bean classes. |
static void |
addBean(java.lang.String key,
java.lang.Class<?> service,
boolean isSystemBean)
Add a bean to the list of known bean classes. |
static void |
bindThreadToTransaction(javax.transaction.UserTransaction ut)
|
static void |
commit()
Commits the transaction and releases all beans. |
static java.lang.Object |
getBean(java.lang.String key)
Gets a bean instance for a bean class registered with a key. |
static javax.transaction.UserTransaction |
getUserTransaction()
The client or the bean manager itself gets a UserTransaction. |
static javax.transaction.UserTransaction |
getUserTransaction(java.lang.String name)
The client or the bean manager itself gets a UserTransaction. |
static boolean |
hasActiveUserTransaction()
|
static void |
rollback()
Rolls back the transaction and releases all beans. |
static void |
rollbackTransaction(javax.transaction.UserTransaction ut)
|
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 java.lang.Object getBean(java.lang.String key)
key
- the key which was used to register a bean class
public static void addBean(java.lang.String key, java.lang.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(java.lang.String key, java.lang.Class<?> service)
key
- a unique key for the beanservice
- the beans classpublic static void commit()
public static void rollback()
public static void rollbackTransaction(javax.transaction.UserTransaction ut)
public static boolean hasActiveUserTransaction()
public static javax.transaction.UserTransaction getUserTransaction()
public static javax.transaction.UserTransaction getUserTransaction(java.lang.String name)
public static void bindThreadToTransaction(javax.transaction.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 |