public class Util
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
private static org.jboss.logging.Logger |
log |
| Constructor and Description |
|---|
Util() |
| Modifier and Type | Method and Description |
|---|---|
protected static void |
appendClassInfo(java.lang.StringBuffer buffer,
java.lang.Class clazz)
Append Class Info
|
static void |
bind(javax.naming.Context ctx,
javax.naming.Name name,
java.lang.Object value)
Bind val to name in ctx, and make sure that all intermediate contexts exist
|
static void |
bind(javax.naming.Context ctx,
java.lang.String name,
java.lang.Object value)
Bind val to name in ctx, and make sure that all intermediate contexts exist
|
protected static void |
checkObject(javax.naming.Context context,
java.lang.String name,
java.lang.Object object,
java.lang.Class clazz)
Checks an object implements the given class
|
static void |
createLinkRef(javax.naming.Context ctx,
java.lang.String fromName,
java.lang.String toName)
Create a link
|
static void |
createLinkRef(java.lang.String fromName,
java.lang.String toName)
Create a link
|
static javax.naming.Context |
createSubcontext(javax.naming.Context ctx,
javax.naming.Name name)
Create a subcontext including any intermediate contexts.
|
static javax.naming.Context |
createSubcontext(javax.naming.Context ctx,
java.lang.String name)
Create a subcontext including any intermediate contexts.
|
static java.lang.Object |
lookup(javax.naming.Context context,
javax.naming.Name name,
java.lang.Class clazz)
Lookup an object in the given context
|
static java.lang.Object |
lookup(javax.naming.Context context,
java.lang.String name,
java.lang.Class clazz)
Lookup an object in the given context
|
static java.lang.Object |
lookup(javax.naming.Name name,
java.lang.Class<?> clazz)
Lookup an object in the default initial context
|
static java.lang.Object |
lookup(java.lang.String name,
java.lang.Class<?> clazz)
Lookup an object in the default initial context
|
static void |
rebind(javax.naming.Context ctx,
javax.naming.Name name,
java.lang.Object value)
Rebind val to name in ctx, and make sure that all intermediate contexts exist
|
static void |
rebind(javax.naming.Context ctx,
java.lang.String name,
java.lang.Object value)
Rebind val to name in ctx, and make sure that all intermediate contexts exist
|
static void |
removeLinkRef(javax.naming.Context ctx,
java.lang.String name)
Remove the link ref
|
static void |
removeLinkRef(java.lang.String name)
Remove the link ref
|
static void |
unbind(javax.naming.Context ctx,
javax.naming.Name name)
Unbinds a name from ctx, and removes parents if they are empty
|
static void |
unbind(javax.naming.Context ctx,
java.lang.String name)
Unbinds a name from ctx, and removes parents if they are empty
|
public static javax.naming.Context createSubcontext(javax.naming.Context ctx,
java.lang.String name)
throws javax.naming.NamingException
ctx - the parent JNDI Context under which value will be boundname - the name relative to ctx of the subcontext.javax.naming.NamingException - on any JNDI failurepublic static javax.naming.Context createSubcontext(javax.naming.Context ctx,
javax.naming.Name name)
throws javax.naming.NamingException
ctx - the parent JNDI Context under which value will be boundname - the name relative to ctx of the subcontext.javax.naming.NamingException - on any JNDI failurepublic static void bind(javax.naming.Context ctx,
java.lang.String name,
java.lang.Object value)
throws javax.naming.NamingException
ctx - the parent JNDI Context under which value will be boundname - the name relative to ctx where value will be boundvalue - the value to bind.javax.naming.NamingException - for any errorpublic static void bind(javax.naming.Context ctx,
javax.naming.Name name,
java.lang.Object value)
throws javax.naming.NamingException
ctx - the parent JNDI Context under which value will be boundname - the name relative to ctx where value will be boundvalue - the value to bind.javax.naming.NamingException - for any errorpublic static void rebind(javax.naming.Context ctx,
java.lang.String name,
java.lang.Object value)
throws javax.naming.NamingException
ctx - the parent JNDI Context under which value will be boundname - the name relative to ctx where value will be boundvalue - the value to bind.javax.naming.NamingException - for any errorpublic static void rebind(javax.naming.Context ctx,
javax.naming.Name name,
java.lang.Object value)
throws javax.naming.NamingException
ctx - the parent JNDI Context under which value will be boundname - the name relative to ctx where value will be boundvalue - the value to bind.javax.naming.NamingException - for any errorpublic static void unbind(javax.naming.Context ctx,
java.lang.String name)
throws javax.naming.NamingException
ctx - the parent JNDI Context under which the name will be unboundname - The name to unbindjavax.naming.NamingException - for any errorpublic static void unbind(javax.naming.Context ctx,
javax.naming.Name name)
throws javax.naming.NamingException
ctx - the parent JNDI Context under which the name will be unboundname - The name to unbindjavax.naming.NamingException - for any errorpublic static java.lang.Object lookup(java.lang.String name,
java.lang.Class<?> clazz)
throws java.lang.Exception
name - the name to lookupclazz - the expected typejava.lang.Exception - for any errorpublic static java.lang.Object lookup(javax.naming.Name name,
java.lang.Class<?> clazz)
throws java.lang.Exception
name - the name to lookupclazz - the expected typejava.lang.Exception - for any errorpublic static java.lang.Object lookup(javax.naming.Context context,
java.lang.String name,
java.lang.Class clazz)
throws java.lang.Exception
context - the contextname - the name to lookupclazz - the expected typejava.lang.Exception - for any errorpublic static java.lang.Object lookup(javax.naming.Context context,
javax.naming.Name name,
java.lang.Class clazz)
throws java.lang.Exception
context - the contextname - the name to lookupclazz - the expected typejava.lang.Exception - for any errorpublic static void createLinkRef(java.lang.String fromName,
java.lang.String toName)
throws javax.naming.NamingException
fromName - the from nametoName - the to namejavax.naming.NamingException - for any errorpublic static void createLinkRef(javax.naming.Context ctx,
java.lang.String fromName,
java.lang.String toName)
throws javax.naming.NamingException
ctx - the contextfromName - the from nametoName - the to namejavax.naming.NamingException - for any errorpublic static void removeLinkRef(java.lang.String name)
throws javax.naming.NamingException
name - the name of the link bindingjavax.naming.NamingException - for any errorpublic static void removeLinkRef(javax.naming.Context ctx,
java.lang.String name)
throws javax.naming.NamingException
ctx - the contextname - the name of the link bindingjavax.naming.NamingException - for any errorprotected static void checkObject(javax.naming.Context context,
java.lang.String name,
java.lang.Object object,
java.lang.Class clazz)
throws java.lang.Exception
context - the contextname - the name to lookupobject - the objectclazz - the expected typejava.lang.Exception - for any errorprotected static void appendClassInfo(java.lang.StringBuffer buffer,
java.lang.Class clazz)
buffer - the buffer to append toclazz - the class to describe