org.objectweb.easybeans.injection
Class JNDILookupHelper

java.lang.Object
  extended by org.objectweb.easybeans.injection.JNDILookupHelper

public final class JNDILookupHelper
extends java.lang.Object

Helper class for injecting a JNDI Name in the bean.

Author:
Florent Benoit

Nested Class Summary
static class JNDILookupHelper.JndiType
          Type of lookup available.
 
Field Summary
private static java.lang.String JAVA_COMP
          Comp prefix.
private static java.lang.String JAVA_COMP_ENV
          ENV prefix.
private static JLog logger
          Logger.
 
Constructor Summary
private JNDILookupHelper()
          Utility class, no public constructor.
 
Method Summary
static java.lang.Object getCompJndiName(java.lang.String name)
          Gets a JNDI name object in java:comp/.
static java.lang.Object getEnvJndiName(java.lang.String name)
          Gets a JNDI name object in java:comp/env/.
static java.lang.Object getJndiName(java.lang.String name)
          Gets a JNDI name object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

JAVA_COMP

private static final java.lang.String JAVA_COMP
Comp prefix.

See Also:
Constant Field Values

JAVA_COMP_ENV

private static final java.lang.String JAVA_COMP_ENV
ENV prefix.

See Also:
Constant Field Values

logger

private static JLog logger
Logger.

Constructor Detail

JNDILookupHelper

private JNDILookupHelper()
Utility class, no public constructor.

Method Detail

getJndiName

public static java.lang.Object getJndiName(java.lang.String name)
Gets a JNDI name object.

Parameters:
name - the name of the object to lookup.
Returns:
object found for the given JNDI name, else null.

getEnvJndiName

public static java.lang.Object getEnvJndiName(java.lang.String name)
Gets a JNDI name object in java:comp/env/.

Parameters:
name - the name of the object to lookup.
Returns:
object found for the given JNDI name, else null.

getCompJndiName

public static java.lang.Object getCompJndiName(java.lang.String name)
Gets a JNDI name object in java:comp/.

Parameters:
name - the name of the object to lookup.
Returns:
object found for the given JNDI name, else null.