org.objectweb.easybeans.container.mdb
Class MDBResourceAdapterHelper

java.lang.Object
  extended by org.objectweb.easybeans.container.mdb.MDBResourceAdapterHelper

public final class MDBResourceAdapterHelper
extends java.lang.Object

This class allow to get the ResourceAdapter object for a given destination (activation-spec object).

Author:
Florent Benoit

Field Summary
private static JLog logger
          Logger.
 
Constructor Summary
private MDBResourceAdapterHelper()
          Utility class, no public constructor.
 
Method Summary
static javax.resource.spi.ResourceAdapter getJOnASResourceAdapter(java.lang.String jndiName)
          Gets the ResourceAdapter by using JOnAS code (used when embedded into JOnAS application server).
static javax.resource.spi.ResourceAdapter getResourceAdapter(java.lang.String jndiName, Embedded embedded)
          Gets the resource adapter object for the given jndi name (activation spec) and the given embedded object.
 
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

MDBResourceAdapterHelper

private MDBResourceAdapterHelper()
Utility class, no public constructor.

Method Detail

getResourceAdapter

public static javax.resource.spi.ResourceAdapter getResourceAdapter(java.lang.String jndiName,
                                                                    Embedded embedded)
                                                             throws javax.resource.ResourceException
Gets the resource adapter object for the given jndi name (activation spec) and the given embedded object.

Parameters:
jndiName - the nameof the activation spec bound in the registry
embedded - the embedded server
Returns:
an instance of the resource adapter that provides the MDB activation spec.
Throws:
javax.resource.ResourceException - if an error occurs while trying to get the resource adapter.

getJOnASResourceAdapter

public static javax.resource.spi.ResourceAdapter getJOnASResourceAdapter(java.lang.String jndiName)
                                                                  throws javax.resource.ResourceException
Gets the ResourceAdapter by using JOnAS code (used when embedded into JOnAS application server).

Parameters:
jndiName - the name bound in the registry for activation spec object.
Returns:
an instance of the resource adapter.
Throws:
javax.resource.ResourceException - if there is a failure when retrieving the resource adapter object.