| java.lang.Object com.mockrunner.ejb.JNDIUtil
JNDIUtil | public class JNDIUtil (Code) | | Util class for creating and managing the JNDI context
|
Method Summary | |
public static void | bindUserTransaction(Configuration configuration, Context context, UserTransaction transaction) Binds the specified UserTransaction to the specified
JNDI context. | public static Context | getContext(Configuration configuration) Tries to get the JNDI context from the specified configuration. | public static void | initMockContextFactory() Calls MockContextFactory.setAsInitial() , if the
MockContextFactory is not already the current
context factory. | public static void | resetMockContextFactory() Calls MockContextFactory.revertSetAsInitial() , if the
MockContextFactory is the current context factory. |
bindUserTransaction | public static void bindUserTransaction(Configuration configuration, Context context, UserTransaction transaction) throws NamingException(Code) | | Binds the specified UserTransaction to the specified
JNDI context.
Parameters: configuration - the configuration Parameters: context - the JNDI context Parameters: transaction - the UserTransaction |
getContext | public static Context getContext(Configuration configuration)(Code) | | Tries to get the JNDI context from the specified configuration.
If the configuration returns null for the context,
this method initializes the MockEJB JNDI implementation.
Parameters: configuration - the configuration the JNDI context |
initMockContextFactory | public static void initMockContextFactory() throws NamingException(Code) | | Calls MockContextFactory.setAsInitial() , if the
MockContextFactory is not already the current
context factory.
|
resetMockContextFactory | public static void resetMockContextFactory()(Code) | | Calls MockContextFactory.revertSetAsInitial() , if the
MockContextFactory is the current context factory.
|
|
|