org.mule.module.jca
Class MuleResourceAdapter

java.lang.Object
  extended by org.mule.module.jca.MuleResourceAdapter
All Implemented Interfaces:
Serializable, ResourceAdapter

public class MuleResourceAdapter
extends Object
implements ResourceAdapter, Serializable

MuleResourceAdapter TODO

See Also:
Serialized Form

Field Summary
protected  BootstrapContext bootstrapContext
           
protected  String defaultJcaModelName
           
protected  Map endpoints
           
protected  MuleConnectionRequestInfo info
           
protected  Log logger
          logger used by this class
protected  MuleContext muleContext
           
 
Constructor Summary
MuleResourceAdapter()
           
 
Method Summary
protected  Service createJcaService(javax.resource.spi.endpoint.MessageEndpointFactory endpointFactory, JcaModel model, InboundEndpoint endpoint)
           
protected  InboundEndpoint createMessageInflowEndpoint(MuleActivationSpec muleActivationSpec)
           
 void endpointActivation(javax.resource.spi.endpoint.MessageEndpointFactory endpointFactory, ActivationSpec activationSpec)
           
 void endpointDeactivation(javax.resource.spi.endpoint.MessageEndpointFactory endpointFactory, ActivationSpec activationSpec)
           
 boolean equals(Object o)
           
 BootstrapContext getBootstrapContext()
           
 String getConfigurationBuilder()
           
 String getConfigurations()
           
 MuleConnectionRequestInfo getInfo()
           
protected  JcaModel getJcaModel(String modelName)
           
 String getModelName()
           
 String getPassword()
           
 String getUserName()
           
 XAResource[] getXAResources(ActivationSpec[] activationSpecs)
          We only connect to one resource manager per ResourceAdapter instance, so any ActivationSpec will return the same XAResource.
 int hashCode()
           
protected  String resolveModelName(MuleActivationSpec activationSpec)
           
 void setConfigurationBuilder(String configbuilder)
           
 void setConfigurations(String configurations)
           
 void setModelName(String modelName)
           
 void setPassword(String password)
           
 void setUserName(String userid)
           
 void start(BootstrapContext bootstrapContext)
           
 void stop()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

logger

protected transient Log logger
logger used by this class


muleContext

protected transient MuleContext muleContext

bootstrapContext

protected transient BootstrapContext bootstrapContext

info

protected MuleConnectionRequestInfo info

endpoints

protected final Map endpoints

defaultJcaModelName

protected String defaultJcaModelName
Constructor Detail

MuleResourceAdapter

public MuleResourceAdapter()
Method Detail

start

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

stop

public void stop()
Specified by:
stop in interface ResourceAdapter
See Also:
ResourceAdapter.stop()

getBootstrapContext

public BootstrapContext getBootstrapContext()
Returns:
the bootstrap context for this adapter

endpointActivation

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

endpointDeactivation

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

resolveModelName

protected String resolveModelName(MuleActivationSpec activationSpec)
                           throws ResourceException
Throws:
ResourceException

getJcaModel

protected JcaModel getJcaModel(String modelName)
                        throws MuleException,
                               ResourceException
Throws:
MuleException
ResourceException

createJcaService

protected Service createJcaService(javax.resource.spi.endpoint.MessageEndpointFactory endpointFactory,
                                   JcaModel model,
                                   InboundEndpoint endpoint)
                            throws MuleException
Throws:
MuleException

createMessageInflowEndpoint

protected InboundEndpoint createMessageInflowEndpoint(MuleActivationSpec muleActivationSpec)
                                               throws MuleException
Throws:
MuleException

getXAResources

public XAResource[] getXAResources(ActivationSpec[] activationSpecs)
                            throws ResourceException
We only connect to one resource manager per ResourceAdapter instance, so any ActivationSpec will return the same XAResource.

Specified by:
getXAResources in interface ResourceAdapter
Throws:
ResourceException
See Also:
ResourceAdapter.getXAResources(javax.resource.spi.ActivationSpec[])

getPassword

public String getPassword()
Returns:

getConfigurations

public String getConfigurations()
Returns:

getUserName

public String getUserName()
Returns:

setPassword

public void setPassword(String password)
Parameters:
password -

setConfigurations

public void setConfigurations(String configurations)
Parameters:
configurations -

setUserName

public void setUserName(String userid)
Parameters:
userid -

getConfigurationBuilder

public String getConfigurationBuilder()

setConfigurationBuilder

public void setConfigurationBuilder(String configbuilder)

getInfo

public MuleConnectionRequestInfo getInfo()
Returns:
Returns the info.

equals

public boolean equals(Object o)
Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object

getModelName

public String getModelName()

setModelName

public void setModelName(String modelName)


Copyright © 2003-2009 MuleSource, Inc.. All Rights Reserved.