org.apache.geronimo.connector
Class ResourceAdapterWrapper

java.lang.Object
  extended byorg.apache.geronimo.connector.ResourceAdapterWrapper
All Implemented Interfaces:
org.apache.geronimo.gbean.DynamicGBean, org.apache.geronimo.gbean.GBeanLifecycle, javax.resource.spi.ResourceAdapter

public class ResourceAdapterWrapper
extends Object
implements org.apache.geronimo.gbean.GBeanLifecycle, org.apache.geronimo.gbean.DynamicGBean, javax.resource.spi.ResourceAdapter

Dynamic GBean wrapper around a ResourceAdapter object, exposing the config-properties as GBean attributes.

Version:
$Revision: 1.15 $ $Date: 2004/07/12 06:07:50 $

Field Summary
static org.apache.geronimo.gbean.GBeanInfo GBEAN_INFO
           
 
Constructor Summary
ResourceAdapterWrapper()
          default constructor for enhancement proxy endpoint
ResourceAdapterWrapper(Class resourceAdapterClass, Map activationSpecInfoMap, GeronimoWorkManager workManager)
           
 
Method Summary
 void doFail()
           
 void doStart()
           
 void doStop()
           
 void endpointActivation(javax.resource.spi.endpoint.MessageEndpointFactory messageEndpointFactory, javax.resource.spi.ActivationSpec activationSpec)
           
 void endpointDeactivation(javax.resource.spi.endpoint.MessageEndpointFactory messageEndpointFactory, javax.resource.spi.ActivationSpec activationSpec)
           
 Map getActivationSpecInfoMap()
           
 Object getAttribute(String name)
           
static org.apache.geronimo.gbean.GBeanInfo getGBeanInfo()
           
 Class getResourceAdapterClass()
           
 XAResource[] getXAResources(javax.resource.spi.ActivationSpec[] specs)
           
 Object invoke(String name, Object[] arguments, String[] types)
           
 void registerResourceAdapterAssociation(javax.resource.spi.ResourceAdapterAssociation resourceAdapterAssociation)
           
 void setAttribute(String name, Object value)
           
 void start(javax.resource.spi.BootstrapContext ctx)
           
 void stop()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

GBEAN_INFO

public static final org.apache.geronimo.gbean.GBeanInfo GBEAN_INFO
Constructor Detail

ResourceAdapterWrapper

public ResourceAdapterWrapper()
default constructor for enhancement proxy endpoint


ResourceAdapterWrapper

public ResourceAdapterWrapper(Class resourceAdapterClass,
                              Map activationSpecInfoMap,
                              GeronimoWorkManager workManager)
                       throws InstantiationException,
                              IllegalAccessException
Method Detail

getResourceAdapterClass

public Class getResourceAdapterClass()

getActivationSpecInfoMap

public Map getActivationSpecInfoMap()

registerResourceAdapterAssociation

public void registerResourceAdapterAssociation(javax.resource.spi.ResourceAdapterAssociation resourceAdapterAssociation)
                                        throws javax.resource.ResourceException
Throws:
javax.resource.ResourceException

start

public void start(javax.resource.spi.BootstrapContext ctx)
           throws javax.resource.spi.ResourceAdapterInternalException
Specified by:
start in interface javax.resource.spi.ResourceAdapter
Throws:
javax.resource.spi.ResourceAdapterInternalException

stop

public void stop()
Specified by:
stop in interface javax.resource.spi.ResourceAdapter

endpointActivation

public void endpointActivation(javax.resource.spi.endpoint.MessageEndpointFactory messageEndpointFactory,
                               javax.resource.spi.ActivationSpec activationSpec)
                        throws javax.resource.ResourceException
Specified by:
endpointActivation in interface javax.resource.spi.ResourceAdapter
Throws:
javax.resource.ResourceException

endpointDeactivation

public void endpointDeactivation(javax.resource.spi.endpoint.MessageEndpointFactory messageEndpointFactory,
                                 javax.resource.spi.ActivationSpec activationSpec)
Specified by:
endpointDeactivation in interface javax.resource.spi.ResourceAdapter

getXAResources

public XAResource[] getXAResources(javax.resource.spi.ActivationSpec[] specs)
                            throws javax.resource.ResourceException
Specified by:
getXAResources in interface javax.resource.spi.ResourceAdapter
Throws:
javax.resource.ResourceException

doStart

public void doStart()
             throws org.apache.geronimo.gbean.WaitingException,
                    Exception
Specified by:
doStart in interface org.apache.geronimo.gbean.GBeanLifecycle
Throws:
org.apache.geronimo.gbean.WaitingException
Exception

doStop

public void doStop()
            throws org.apache.geronimo.gbean.WaitingException
Specified by:
doStop in interface org.apache.geronimo.gbean.GBeanLifecycle
Throws:
org.apache.geronimo.gbean.WaitingException

doFail

public void doFail()
Specified by:
doFail in interface org.apache.geronimo.gbean.GBeanLifecycle

getAttribute

public Object getAttribute(String name)
                    throws Exception
Specified by:
getAttribute in interface org.apache.geronimo.gbean.DynamicGBean
Throws:
Exception

setAttribute

public void setAttribute(String name,
                         Object value)
                  throws Exception
Specified by:
setAttribute in interface org.apache.geronimo.gbean.DynamicGBean
Throws:
Exception

invoke

public Object invoke(String name,
                     Object[] arguments,
                     String[] types)
              throws Exception
Specified by:
invoke in interface org.apache.geronimo.gbean.DynamicGBean
Throws:
Exception

getGBeanInfo

public static org.apache.geronimo.gbean.GBeanInfo getGBeanInfo()


Copyright © 2003-2005 Apache Software Foundation. All Rights Reserved.