javax.resource.spi
Interface ResourceAdapter

All Known Implementing Classes:
DummyResourceAdapter (src) , FSDirContextAdaptor (src) , JmsResourceAdapter (src) , MailResourceAdapter (src) , TestResourceAdapter (src) , TestResourceAdapter (src)

public interface ResourceAdapter

Operations for lifecycle management and message endpoint configuration. Implementations of this interface must be javabeans


Method Summary
 void endpointActivation(MessageEndpointFactory (src)  endpointFactory, ActivationSpec (src)  spec)
          Activates the endpoint factory
 void endpointDeactivation(MessageEndpointFactory (src)  endpointFactory, ActivationSpec (src)  spec)
          Deactivates the endpoint
 XAResource (src) [] getXAResources(ActivationSpec (src) [] specs)
          Called by the application server during recovery
 void start(BootstrapContext (src)  ctx)
          Used to bootstrap the resource adapter
 void stop()
          Used to stop the resource adapter
 

Method Detail

start

public void start(BootstrapContext (src)  ctx)
           throws ResourceAdapterInternalException (src) 
Used to bootstrap the resource adapter

Parameters:
ctx - the bootstrap context
Throws:
ResourceAdapterInternalException (src) - for a bootstrap failure

stop

public void stop()
Used to stop the resource adapter


endpointActivation

public void endpointActivation(MessageEndpointFactory (src)  endpointFactory,
                               ActivationSpec (src)  spec)
                        throws ResourceException (src) 
Activates the endpoint factory

Parameters:
endpointFactory - the endpoint factory
spec - the activation spec
Throws:
ResourceException (src) - for a generic error
NotSupportedException - for incorrect activation

endpointDeactivation

public void endpointDeactivation(MessageEndpointFactory (src)  endpointFactory,
                                 ActivationSpec (src)  spec)
Deactivates the endpoint

Parameters:
endpointFactory - the endpoint factory
spec - the activation spec

getXAResources

public XAResource (src) [] getXAResources(ActivationSpec (src) [] specs)
                            throws ResourceException (src) 
Called by the application server during recovery

Parameters:
specs - the activation specs
Returns:
the XAResources used to perform the recovery
Throws:
ResourceException (src) - for a generic error