|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.mockrunner.ejb.JNDIUtil
public class JNDIUtil
Util class for creating and managing the JNDI context
Constructor Summary | |
---|---|
JNDIUtil()
|
Method Summary | |
---|---|
static void |
bindUserTransaction(Configuration configuration,
javax.naming.Context context,
javax.transaction.UserTransaction transaction)
Binds the specified UserTransaction to the specified
JNDI context. |
static javax.naming.Context |
getContext(Configuration configuration)
Tries to get the JNDI context from the specified configuration. |
static void |
initMockContextFactory()
Calls MockContextFactory.setAsInitial() , if the
MockContextFactory is not already the current
context factory. |
static void |
resetMockContextFactory()
Calls MockContextFactory.revertSetAsInitial() , if the
MockContextFactory is the current context factory. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public JNDIUtil()
Method Detail |
---|
public static void initMockContextFactory() throws javax.naming.NamingException
MockContextFactory.setAsInitial()
, if the
MockContextFactory
is not already the current
context factory.
javax.naming.NamingException
public static void resetMockContextFactory()
MockContextFactory.revertSetAsInitial()
, if the
MockContextFactory
is the current context factory.
public static javax.naming.Context getContext(Configuration configuration)
null
for the context,
this method initializes the MockEJB JNDI implementation.
configuration
- the configuration
public static void bindUserTransaction(Configuration configuration, javax.naming.Context context, javax.transaction.UserTransaction transaction) throws javax.naming.NamingException
UserTransaction
to the specified
JNDI context.
configuration
- the configurationcontext
- the JNDI contexttransaction
- the UserTransaction
javax.naming.NamingException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |