站内搜索: 请输入搜索关键词
当前页面: 在线文档首页 > JBoss 4.0.1 sp1 j2ee API Documentation 英文版文档

ResourceAdapter (JBoss J2EE API) - JBoss 4.0.1 sp1 j2ee API Documentation 英文版文档


javax.resource.spi
Interface ResourceAdapter


public interface ResourceAdapter

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


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

Method Detail

start

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

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

stop

public void stop()
Used to stop the resource adapter


endpointActivation

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

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

endpointDeactivation

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

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

getXAResources

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

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


Copyright © 2002 JBoss Group, LLC. All Rights Reserved.