org.apache.servicemix.jms
Class JmsEndpoint

java.lang.Object
  extended by org.apache.servicemix.common.endpoints.AbstractEndpoint
      extended by org.apache.servicemix.soap.SoapEndpoint
          extended by org.apache.servicemix.jms.JmsEndpoint
All Implemented Interfaces:
Endpoint, JmsEndpointType

public class JmsEndpoint
extends SoapEndpoint
implements JmsEndpointType

non-Spring JMS endpoint This JMS endpoint can be either a consumer or a provider and is optimized to work with SOAP messages.

Version:
$Revision$
Author:
gnodet

Field Summary
protected  javax.resource.spi.ActivationSpec activationSpec
           
protected  javax.resource.spi.BootstrapContext bootstrapContext
           
protected  javax.jms.ConnectionFactory connectionFactory
           
protected  javax.jms.Destination destination
           
protected  java.lang.String destinationStyle
           
protected  java.lang.String initialContextFactory
           
protected  java.lang.String jmsProviderDestinationName
           
protected  java.lang.String jmsProviderReplyToName
           
protected  java.lang.String jndiConnectionFactoryName
           
protected  java.lang.String jndiDestinationName
           
protected  java.lang.String jndiProviderURL
           
protected  java.lang.String jndiReplyToName
           
protected  JmsMarshaler marshaler
           
protected  boolean needJavaIdentifiers
           
protected  java.lang.String processorName
           
protected  javax.resource.spi.ResourceAdapter resourceAdapter
           
protected  boolean rollbackOnError
           
protected  org.apache.servicemix.store.Store store
          The store to keep pending exchanges
protected  org.apache.servicemix.store.StoreFactory storeFactory
           
protected  boolean synchronous
           
protected  boolean useMsgIdInResponse
           
 
Fields inherited from class org.apache.servicemix.soap.SoapEndpoint
activated, defaultMep, defaultOperation, dynamic, policies, processor, role, soap, soapVersion, targetEndpoint, targetInterfaceName, targetService, wsdlResource, wsdls
 
Fields inherited from class org.apache.servicemix.common.endpoints.AbstractEndpoint
definition, description, endpoint, interfaceName, logger, service, serviceUnit
 
Constructor Summary
JmsEndpoint()
           
JmsEndpoint(boolean dynamic)
           
 
Method Summary
protected  SoapExchangeProcessor createConsumerProcessor()
           
protected  javax.jbi.servicedesc.ServiceEndpoint createExternalEndpoint()
           
protected  SoapExchangeProcessor createProcessor(java.lang.String type)
           
protected  SoapExchangeProcessor createProviderProcessor()
           
 javax.resource.spi.ActivationSpec getActivationSpec()
          The ActivationSpec to use on a JCA consumer endpoint.
 AuthenticationService getAuthenticationService()
           
 javax.resource.spi.BootstrapContext getBootstrapContext()
          The BootstrapContext to use for a JCA consumer endpoint.
 JmsConfiguration getConfiguration()
           
 javax.jms.ConnectionFactory getConnectionFactory()
          A configured ConnectionFactory to use on this endpoint.
 javax.jms.Destination getDestination()
          A configured Destination to use on this endpoint.
 java.lang.String getDestinationStyle()
          Specifies the destination type used with the jmsProviderDestinationName.
 java.lang.String getInitialContextFactory()
          The class name of the JNDI InitialContextFactory to use.
 java.lang.String getJmsProviderDestinationName()
          The name of the destination created by a call to Session.createQueue or Session.createTopic.
 java.lang.String getJmsProviderReplyToName()
          The name of the reply destination created by a call to Session.createQueue or Session.createTopic.
 java.lang.String getJndiConnectionFactoryName()
          The name of the JMS ConnectionFactory to lookup in JNDI.
 java.lang.String getJndiDestinationName()
          The name of the JMS Destination to lookup in JNDI.
 java.lang.String getJndiProviderURL()
          The provider URL used to create the JNDI context.
 java.lang.String getJndiReplyToName()
          The name of the JMS Reply-to destination to lookup in JNDI.
 KeystoreManager getKeystoreManager()
           
protected  java.lang.String getLocationURI()
           
 JmsMarshaler getMarshaler()
           
 java.lang.String getProcessorName()
          Specifies the processor family to use for this endpoint.
 javax.resource.spi.ResourceAdapter getResourceAdapter()
          The ResourceAdapter to use on a JCA consumer endpoint.
 org.apache.servicemix.store.Store getStore()
           
 org.apache.servicemix.store.StoreFactory getStoreFactory()
           
 boolean isNeedJavaIdentifiers()
          Indicates if the JMS properties used by the endpoint need to be spec compliant.
 boolean isRollbackOnError()
          Indicates if the JBI exchange is rolled back if an error is encountered.
 boolean isSynchronous()
          Indicates if a JCA consumer endpoint sends the JBI exchange synchronously or asynchronously.
 boolean isUseMsgIdInResponse()
          Indicates whether the message id of the request message should be used as the correlation id in the response or the correlation id of the request.
protected  java.lang.Class loadClass(java.lang.String name)
          Attempts to load the class on the current thread context class loader or the class loader which loaded us
protected  java.io.InputStream loadResource(java.lang.String uri)
          Loads the resource from the given URI
protected  void overrideDefinition(javax.wsdl.Definition def)
           
 void setActivationSpec(javax.resource.spi.ActivationSpec activationSpec)
           
 void setBootstrapContext(javax.resource.spi.BootstrapContext bootstrapContext)
           
 void setConnectionFactory(javax.jms.ConnectionFactory connectionFactory)
           
 void setDestination(javax.jms.Destination destination)
           
 void setDestinationStyle(java.lang.String destinationStyle)
           
 void setInitialContextFactory(java.lang.String initialContextFactory)
           
 void setJmsProviderDestinationName(java.lang.String jmsProviderDestinationName)
           
 void setJmsProviderReplyToName(java.lang.String jmsProviderReplyToName)
           
 void setJndiConnectionFactoryName(java.lang.String jndiConnectionFactoryName)
           
 void setJndiDestinationName(java.lang.String jndiDestinationName)
           
 void setJndiProviderURL(java.lang.String jndiProviderURL)
           
 void setJndiReplyToName(java.lang.String jndiReplyToName)
           
 void setMarshaler(JmsMarshaler marshaler)
          Specifies the class implementing the logic for marshaling and unmarshaling messages between the JMS destination and the endpoint.
 void setNeedJavaIdentifiers(boolean needJavaIdentifiers)
           
 void setProcessorName(java.lang.String processorName)
           
 void setResourceAdapter(javax.resource.spi.ResourceAdapter resourceAdapter)
           
 void setRoleAsString(java.lang.String role)
          Specifies the role of this endpoint.
 void setRollbackOnError(boolean rollbackOnError)
           
 void setStore(org.apache.servicemix.store.Store store)
          Specifies a persistent data store to hold pending exchanges for the endpoint.
 void setStoreFactory(org.apache.servicemix.store.StoreFactory storeFactory)
          Specifies the factory used to create presistent data stores for this endpoint.
 void setSynchronous(boolean synchronous)
           
 void setUseMsgIdInResponse(boolean useMsgIdInResponse)
           
 java.lang.String toString()
           
 
Methods inherited from class org.apache.servicemix.soap.SoapEndpoint
activate, createWsdlReader, createWsdlWriter, deactivate, getDefaultMep, getDefaultOperation, getPolicies, getRole, getSoapVersion, getTargetEndpoint, getTargetInterfaceName, getTargetService, getWsdlResource, getWsdls, isSoap, loadWsdl, mapDefinition, mapImports, process, registerExtensions, retrieveProxiedEndpointDefinition, setDefaultMep, setDefaultOperation, setDescription, setPolicies, setRole, setSoap, setSoapVersion, setTargetEndpoint, setTargetInterfaceName, setTargetService, setWsdlResource, start, stop
 
Methods inherited from class org.apache.servicemix.common.endpoints.AbstractEndpoint
getDefinition, getDescription, getEndpoint, getInterfaceName, getKey, getService, getServiceUnit, isExchangeOkay, prepareExchange, setDefinition, setEndpoint, setInterfaceName, setService, setServiceUnit, validate
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

initialContextFactory

protected java.lang.String initialContextFactory

jndiProviderURL

protected java.lang.String jndiProviderURL

destinationStyle

protected java.lang.String destinationStyle

jndiConnectionFactoryName

protected java.lang.String jndiConnectionFactoryName

jndiDestinationName

protected java.lang.String jndiDestinationName

jmsProviderDestinationName

protected java.lang.String jmsProviderDestinationName

jndiReplyToName

protected java.lang.String jndiReplyToName

jmsProviderReplyToName

protected java.lang.String jmsProviderReplyToName

useMsgIdInResponse

protected boolean useMsgIdInResponse

connectionFactory

protected javax.jms.ConnectionFactory connectionFactory

destination

protected javax.jms.Destination destination

processorName

protected java.lang.String processorName

marshaler

protected JmsMarshaler marshaler

resourceAdapter

protected javax.resource.spi.ResourceAdapter resourceAdapter

activationSpec

protected javax.resource.spi.ActivationSpec activationSpec

bootstrapContext

protected javax.resource.spi.BootstrapContext bootstrapContext

synchronous

protected boolean synchronous

rollbackOnError

protected boolean rollbackOnError

needJavaIdentifiers

protected boolean needJavaIdentifiers

store

protected org.apache.servicemix.store.Store store
The store to keep pending exchanges


storeFactory

protected org.apache.servicemix.store.StoreFactory storeFactory
Constructor Detail

JmsEndpoint

public JmsEndpoint()

JmsEndpoint

public JmsEndpoint(boolean dynamic)
Method Detail

getBootstrapContext

public javax.resource.spi.BootstrapContext getBootstrapContext()
The BootstrapContext to use for a JCA consumer endpoint.

Returns:
the bootstrapContext

setBootstrapContext

public void setBootstrapContext(javax.resource.spi.BootstrapContext bootstrapContext)
Parameters:
bootstrapContext - the bootstrapContext to set

isSynchronous

public boolean isSynchronous()
Indicates if a JCA consumer endpoint sends the JBI exchange synchronously or asynchronously. This changes the transaction boundary.

Returns:
the synchronous

setSynchronous

public void setSynchronous(boolean synchronous)
Parameters:
synchronous - true means the exchange is sent synchronously

isRollbackOnError

public boolean isRollbackOnError()
Indicates if the JBI exchange is rolled back if an error is encountered.

Returns:
the rollbackOnError

setRollbackOnError

public void setRollbackOnError(boolean rollbackOnError)
Parameters:
rollbackOnError - the rollbackOnError to set

getActivationSpec

public javax.resource.spi.ActivationSpec getActivationSpec()
The ActivationSpec to use on a JCA consumer endpoint.

Returns:
the activationSpec

setActivationSpec

public void setActivationSpec(javax.resource.spi.ActivationSpec activationSpec)
Parameters:
activationSpec - the activationSpec to set

getResourceAdapter

public javax.resource.spi.ResourceAdapter getResourceAdapter()
The ResourceAdapter to use on a JCA consumer endpoint.

Returns:
the resourceAdapter

setResourceAdapter

public void setResourceAdapter(javax.resource.spi.ResourceAdapter resourceAdapter)
Parameters:
resourceAdapter - the resourceAdapter to set

getInitialContextFactory

public java.lang.String getInitialContextFactory()
The class name of the JNDI InitialContextFactory to use.

Returns:
Returns the initialContextFactory.

setInitialContextFactory

public void setInitialContextFactory(java.lang.String initialContextFactory)
Parameters:
initialContextFactory - The initialContextFactory to set.

getJmsProviderDestinationName

public java.lang.String getJmsProviderDestinationName()
The name of the destination created by a call to Session.createQueue or Session.createTopic. This property is used when destination and jndiDestinationName are both null.

Returns:
Returns the jmsProviderDestinationName.

setJmsProviderDestinationName

public void setJmsProviderDestinationName(java.lang.String jmsProviderDestinationName)
Parameters:
jmsProviderDestinationName - The jmsProviderDestinationName to set.

getJndiReplyToName

public java.lang.String getJndiReplyToName()
The name of the JMS Reply-to destination to lookup in JNDI. If this property is not set a temporary replyTo queue is used.

Returns:
Returns the jndiReplyToName.

setJndiReplyToName

public void setJndiReplyToName(java.lang.String jndiReplyToName)
Parameters:
jndiReplyToName - the JNDI name of the replyTo queue

getJmsProviderReplyToName

public java.lang.String getJmsProviderReplyToName()
The name of the reply destination created by a call to Session.createQueue or Session.createTopic. This property is used when jndiReplyToName is null. A temporary queue will be used if a replyTo is not provided.

Returns:
Returns the jmsProviderReplyToName.

setJmsProviderReplyToName

public void setJmsProviderReplyToName(java.lang.String jmsProviderReplyToName)
Parameters:
jmsProviderReplyToName - the name of the replyTo destination

getJndiConnectionFactoryName

public java.lang.String getJndiConnectionFactoryName()
The name of the JMS ConnectionFactory to lookup in JNDI. Used if connectionFactory is null

Returns:
Returns the jndiConnectionFactoryName.

setJndiConnectionFactoryName

public void setJndiConnectionFactoryName(java.lang.String jndiConnectionFactoryName)
Parameters:
jndiConnectionFactoryName - the JNDI name of the connection factory

getJndiDestinationName

public java.lang.String getJndiDestinationName()
The name of the JMS Destination to lookup in JNDI. Used if destination is null.

Returns:
Returns the destination's JNDI name.

setJndiDestinationName

public void setJndiDestinationName(java.lang.String jndiDestinationName)
Parameters:
jndiDestinationName - the JNDI name of the JMS destination

getJndiProviderURL

public java.lang.String getJndiProviderURL()
The provider URL used to create the JNDI context.

Returns:
Returns the jndiProviderURL.

setJndiProviderURL

public void setJndiProviderURL(java.lang.String jndiProviderURL)
Parameters:
jndiProviderURL - The JNDI provider URL

getDestinationStyle

public java.lang.String getDestinationStyle()
Specifies the destination type used with the jmsProviderDestinationName. Can be queue or topic.

Returns:
Returns the destinationStyle.

setDestinationStyle

public void setDestinationStyle(java.lang.String destinationStyle)
Parameters:
destinationStyle - queue or topic

getConnectionFactory

public javax.jms.ConnectionFactory getConnectionFactory()
A configured ConnectionFactory to use on this endpoint.

Returns:
Returns the connectionFactory.

setConnectionFactory

public void setConnectionFactory(javax.jms.ConnectionFactory connectionFactory)
Parameters:
connectionFactory - a configured JMS ConnectionFactory

getDestination

public javax.jms.Destination getDestination()
A configured Destination to use on this endpoint.

Returns:
Returns the destination.

setDestination

public void setDestination(javax.jms.Destination destination)
Parameters:
destination - a configured JMS destination

isNeedJavaIdentifiers

public boolean isNeedJavaIdentifiers()
Indicates if the JMS properties used by the endpoint need to be spec compliant.

Returns:
if jms properties should be spec compliant

setNeedJavaIdentifiers

public void setNeedJavaIdentifiers(boolean needJavaIdentifiers)
Parameters:
needJavaIdentifiers - if jms properties should be spec compliant

setRoleAsString

public void setRoleAsString(java.lang.String role)
Specifies the role of this endpoint. Endpoints can be consumer or provider.

Overrides:
setRoleAsString in class SoapEndpoint
Parameters:
role -
role - the role of the endpoint

getStore

public org.apache.servicemix.store.Store getStore()
Returns:
Returns the store.

setStore

public void setStore(org.apache.servicemix.store.Store store)
Specifies a persistent data store to hold pending exchanges for the endpoint.

Parameters:
store - The store to set.

getStoreFactory

public org.apache.servicemix.store.StoreFactory getStoreFactory()
Returns:
Returns the storeFactory.

setStoreFactory

public void setStoreFactory(org.apache.servicemix.store.StoreFactory storeFactory)
Specifies the factory used to create presistent data stores for this endpoint.

Parameters:
storeFactory - the factory used to create persistent stores

createProviderProcessor

protected SoapExchangeProcessor createProviderProcessor()
Specified by:
createProviderProcessor in class SoapEndpoint

createConsumerProcessor

protected SoapExchangeProcessor createConsumerProcessor()
Specified by:
createConsumerProcessor in class SoapEndpoint

createProcessor

protected SoapExchangeProcessor createProcessor(java.lang.String type)

loadClass

protected java.lang.Class loadClass(java.lang.String name)
                             throws java.lang.ClassNotFoundException
Attempts to load the class on the current thread context class loader or the class loader which loaded us

Throws:
java.lang.ClassNotFoundException

loadResource

protected java.io.InputStream loadResource(java.lang.String uri)
Loads the resource from the given URI


createExternalEndpoint

protected javax.jbi.servicedesc.ServiceEndpoint createExternalEndpoint()
Specified by:
createExternalEndpoint in class SoapEndpoint

getLocationURI

protected java.lang.String getLocationURI()

overrideDefinition

protected void overrideDefinition(javax.wsdl.Definition def)
Specified by:
overrideDefinition in class SoapEndpoint

toString

public java.lang.String toString()
Overrides:
toString in class AbstractEndpoint

getProcessorName

public java.lang.String getProcessorName()
Specifies the processor family to use for this endpoint. Can be:

Returns:
Returns the processorName.

setProcessorName

public void setProcessorName(java.lang.String processorName)
Parameters:
processorName - The processorName to set.

getConfiguration

public JmsConfiguration getConfiguration()

getAuthenticationService

public AuthenticationService getAuthenticationService()
Overrides:
getAuthenticationService in class SoapEndpoint

getKeystoreManager

public KeystoreManager getKeystoreManager()
Overrides:
getKeystoreManager in class SoapEndpoint

isUseMsgIdInResponse

public boolean isUseMsgIdInResponse()
Indicates whether the message id of the request message should be used as the correlation id in the response or the correlation id of the request.

Returns:

setUseMsgIdInResponse

public void setUseMsgIdInResponse(boolean useMsgIdInResponse)

getMarshaler

public JmsMarshaler getMarshaler()

setMarshaler

public void setMarshaler(JmsMarshaler marshaler)
Specifies the class implementing the logic for marshaling and unmarshaling messages between the JMS destination and the endpoint. Defaults to DefaultJmsMarshaler.

Parameters:
marshaler - the marshaling class


Copyright © 2005-2014 FuseSource. All Rights Reserved.