Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.codehaus.activemq.ra
Class ActiveMQResourceAdapter

    java.lang.Object
      org.codehaus.activemq.ra.ActiveMQResourceAdapter

All Implemented Interfaces:
  ResourceAdapter

public class ActiveMQResourceAdapter
extends java.lang.Object
implements ResourceAdapter

Knows how to connect to one ActiveMQ server. It can then activate endpoints and deliver messages to those enpoints using the connection configure in the resource adapter.

Version:
  $Revision: 1.11 $

Constructor Summary
`ActiveMQResourceAdapter()`
`ActiveMQResourceAdapter(ConnectionFactory connectionFactory)`

Method Summary
`void` | `endpointActivation(MessageEndpointFactory endpointFactory, ActivationSpec activationSpec)`
`void` | `endpointDeactivation(MessageEndpointFactory endpointFactory, ActivationSpec activationSpec)`
`BootstrapContext` | `getBootstrapContext()`
`java.lang.String` | `getClientid()`
`java.lang.String` | `getEndpointWorkerType()`
`ActiveMQConnectionRequestInfo` | `getInfo()`
`java.lang.String` | `getPassword()`
`Connection` | `getPhysicalConnection()`
`java.lang.String` | `getServerUrl()`
`java.lang.String` | `getUserName()`
`XAResource[]` | `getXAResources(ActivationSpec[] activationSpecs)` We only connect to one resource manager per ResourceAdapter instance, so any ActivationSpec will return the same XAResource.
`java.lang.Boolean` | `isXA()`
`static Connection` | `makeConnection(ConnectionFactory connectionFactory, ActiveMQConnectionRequestInfo info)` A helper method to create a new JMS connection from the connection request info.
`void` | `setClientid(java.lang.String clientid)`
`void` | `setEndpointWorkerType(java.lang.String endpointWorkerType)`
`void` | `setPassword(java.lang.String password)`
`void` | `setServerUrl(java.lang.String url)`
`void` | `setUserName(java.lang.String userid)`
`void` | `setXA(java.lang.Boolean xa)`
`void` | `start(BootstrapContext bootstrapContext)`
`void` | `stop()`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### ActiveMQResourceAdapter

    public ActiveMQResourceAdapter()

### ActiveMQResourceAdapter

    public ActiveMQResourceAdapter(ConnectionFactory connectionFactory)

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)`

### makeConnection

    public static Connection makeConnection(ConnectionFactory connectionFactory,
                                            ActiveMQConnectionRequestInfo info)
                                     throws JMSException

  A helper method to create a new JMS connection from the connection request info. If no specific connection factory instance is passed in then the default ActiveMQ implementation is used

  Parameters:
    `connectionFactory` - an optional connection factory to use or null to use the default
    `info` - the connection request info
  Returns:
    a newly created connection
  Throws:
    `JMSException`

### getPhysicalConnection

    public Connection getPhysicalConnection()

  Returns:
    Returns the physicalConnection.

### stop

    public void stop()

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

### getBootstrapContext

    public BootstrapContext getBootstrapContext()

  Returns:

### endpointActivation

    public void endpointActivation(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(MessageEndpointFactory endpointFactory,
                                     ActivationSpec activationSpec)

  Specified by:
    `endpointDeactivation` in interface `ResourceAdapter`
  See Also:
    `ResourceAdapter.endpointDeactivation(javax.resource.spi.endpoint.MessageEndpointFactory, javax.resource.spi.ActivationSpec)`

### 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[])`

### getClientid

    public java.lang.String getClientid()

  Returns:

### getPassword

    public java.lang.String getPassword()

  Returns:

### getServerUrl

    public java.lang.String getServerUrl()

  Returns:

### getUserName

    public java.lang.String getUserName()

  Returns:

### setClientid

    public void setClientid(java.lang.String clientid)

  Parameters:
    `clientid` -

### setPassword

    public void setPassword(java.lang.String password)

  Parameters:
    `password` -

### setServerUrl

    public void setServerUrl(java.lang.String url)

  Parameters:
    `url` -

### setUserName

    public void setUserName(java.lang.String userid)

  Parameters:
    `userid` -

### isXA

    public java.lang.Boolean isXA()

### setXA

    public void setXA(java.lang.Boolean xa)

### getEndpointWorkerType

    public java.lang.String getEndpointWorkerType()

  Returns:
    Returns the endpointWorkerType.

### setEndpointWorkerType

    public void setEndpointWorkerType(java.lang.String endpointWorkerType)

  Parameters:
    `endpointWorkerType` - The endpointWorkerType to set.

### getInfo

    public ActiveMQConnectionRequestInfo getInfo()

  Returns:
    Returns the info.

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2004 Protique, Ltd.. All Rights Reserved.