org.objectweb.easybeans.deployment.helper
Class JavaContextHelper

java.lang.Object
  extended by org.objectweb.easybeans.deployment.helper.JavaContextHelper

public final class JavaContextHelper
extends java.lang.Object

Builds a Context (java: context).

Author:
Florent Benoit

Field Summary
private static JLog logger
          Logger.
 
Constructor Summary
private JavaContextHelper()
          Utility class.
 
Method Summary
static javax.naming.Context build(ClassAnnotationMetadata bean, Factory easyBeansFactory)
          Build a new context for the given bean.
private static java.lang.Object getEnvEntryValue(EnvEntry envEntry)
          Gets the value for a given env-entry.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

logger

private static JLog logger
Logger.

Constructor Detail

JavaContextHelper

private JavaContextHelper()
Utility class.

Method Detail

build

public static javax.naming.Context build(ClassAnnotationMetadata bean,
                                         Factory easyBeansFactory)
                                  throws JavaContextHelperException
Build a new context for the given bean.

Parameters:
bean - the bean for which there is a need to build a context.
easyBeansFactory - the factory to build EJBContext
Returns:
a java: context.
Throws:
JavaContextHelperException - if environment cannot be built

getEnvEntryValue

private static java.lang.Object getEnvEntryValue(EnvEntry envEntry)
Gets the value for a given env-entry.

Parameters:
envEntry - the element representing env-entry.
Returns:
the value associated to the given element.