org.objectweb.easybeans.tests.common.helper
Class EJBHelper

java.lang.Object
  extended by org.objectweb.easybeans.tests.common.helper.EJBHelper

public final class EJBHelper
extends java.lang.Object

This helper is used to do ejb operations.

Author:
Eduardo Studzinski Estima de Castro, Gisele Pinheiro Souza

Field Summary
static java.lang.String ITF_LOCAL
          Constant used to identify a local interface.
static java.lang.String ITF_REMOTE
          Constant used to identify a remote interface.
 
Constructor Summary
private EJBHelper()
          Helper should have a private constructor.
 
Method Summary
static
<E> E
getBeanLocalInstance(java.lang.String beanClassName)
          Gets a local instance of a bean.
static
<E> E
getBeanRemoteInstance(java.lang.String beanClassName)
          Gets a remote instance of a bean.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ITF_REMOTE

public static final java.lang.String ITF_REMOTE
Constant used to identify a remote interface.

See Also:
Constant Field Values

ITF_LOCAL

public static final java.lang.String ITF_LOCAL
Constant used to identify a local interface.

See Also:
Constant Field Values
Constructor Detail

EJBHelper

private EJBHelper()
Helper should have a private constructor.

Method Detail

getBeanRemoteInstance

public static <E> E getBeanRemoteInstance(java.lang.String beanClassName)
                               throws java.lang.Exception
Gets a remote instance of a bean.

Type Parameters:
E - bean element type
Parameters:
beanClassName - classname of the bean
Returns:
bean instance
Throws:
java.lang.Exception - if occurs a problem in the instance invokation

getBeanLocalInstance

public static <E> E getBeanLocalInstance(java.lang.String beanClassName)
                              throws java.lang.Exception
Gets a local instance of a bean.

Type Parameters:
E - bean element type
Parameters:
beanClassName - classname of the bean
Returns:
bean instance
Throws:
java.lang.Exception - if occurs a problem in the instance invokation