|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object | +--pt.jcodeutil.core.ejb.ContextUtils
Title:
Description: Utilities for creating contexts and closing them.
| Constructor Summary | |
ContextUtils()
|
|
| Method Summary | |
static void |
close(javax.naming.Context ctx)
Close the context given by argument, ignoring any exception. |
static javax.naming.Context |
getContext(java.lang.String initialCtxFactory,
java.lang.String providerURL)
Get a context based in the arguments that are given. |
static javax.naming.Context |
getContext(java.lang.String initialCtxFactory,
java.lang.String providerURL,
java.lang.String securityAuthentication)
Get a context based in the arguments that are given. |
static javax.naming.Context |
getContext(java.lang.String inicialContextFactory,
java.lang.String providerURL,
java.lang.String securityPrincipal,
java.lang.String securityCredentials)
Get a context based in the arguments that are given. |
static javax.naming.Context |
getRootContext()
Get the root context based in the called context. |
static java.lang.Object |
lookup(javax.naming.Context ctx,
java.lang.String envName,
java.lang.Class classType)
Do a lookup of an Object in the context given by argument. |
static java.lang.Object |
narrow(java.lang.Object obj,
java.lang.Class classType)
Narrow an object to a specific Class Type. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public ContextUtils()
| Method Detail |
public static javax.naming.Context getContext(java.lang.String initialCtxFactory,
java.lang.String providerURL)
throws javax.naming.NamingException
initialCtxFactory - the context factoryproviderURL - the provider of the contextjavax.naming.NamingException -
public static javax.naming.Context getContext(java.lang.String initialCtxFactory,
java.lang.String providerURL,
java.lang.String securityAuthentication)
throws javax.naming.NamingException
initialCtxFactory - the context factory.providerURL - the provider of the context.securityAuthentication - the authentication to be used.javax.naming.NamingException -
public static javax.naming.Context getContext(java.lang.String inicialContextFactory,
java.lang.String providerURL,
java.lang.String securityPrincipal,
java.lang.String securityCredentials)
throws javax.naming.NamingException
initialCtxFactory - the context factory.providerURL - the provider of the context.securityPrincipal - the principal to be used.securityCredentials - the credentials to be used.javax.naming.NamingException -
public static javax.naming.Context getRootContext()
throws javax.naming.NamingException
public static void close(javax.naming.Context ctx)
ctx - the context to be closed.
public static final java.lang.Object narrow(java.lang.Object obj,
java.lang.Class classType)
obj - the object to be narrowed.classType - the class type that the object is going to be narrowed to.
public static final java.lang.Object lookup(javax.naming.Context ctx,
java.lang.String envName,
java.lang.Class classType)
throws javax.naming.NamingException
ctx - context where to look forenvName - name to look forclassType - class type of the object in the contextjavax.naming.NamingException - if not found
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||