org.mule.providers.oracle.jms
Class AbstractOracleJmsConnector

java.lang.Object
  extended by org.mule.providers.AbstractConnector
      extended by org.mule.providers.jms.JmsConnector
          extended by org.mule.providers.oracle.jms.AbstractOracleJmsConnector
All Implemented Interfaces:
ExceptionListener, EventListener, javax.resource.spi.work.WorkListener, ConnectionNotificationListener, Disposable, Initialisable, UMOServerNotificationListener, UMOConnectable, UMOConnector
Direct Known Subclasses:
OracleJmsConnector

public abstract class AbstractOracleJmsConnector
extends JmsConnector


Field Summary
protected  String payloadFactory
           
static String PAYLOADFACTORY_PROPERTY
          If a queue's payload is an ADT (Oracle Advanced Data Type), the appropriate payload factory must be specified in the endpoint's properties.
 
Fields inherited from class org.mule.providers.jms.JmsConnector
password, username
 
Fields inherited from class org.mule.providers.AbstractConnector
connected, connecting, connectionStrategy, createMultipleTransactedReceivers, DEFAULT_NUM_CONCURRENT_TX_RECEIVERS, defaultInboundTransformer, defaultOutboundTransformer, defaultResponseTransformer, dispatcherFactory, dispatchers, disposed, disposing, exceptionListener, initialised, logger, name, numberOfConcurrentTransactedReceivers, receivers, serviceDescriptor, serviceOverrides, sessionHandler, started, startOnConnect
 
Fields inherited from interface org.mule.umo.provider.UMOConnector
INT_VALUE_NOT_SET
 
Constructor Summary
AbstractOracleJmsConnector()
           
 
Method Summary
 void close(Session session)
          Attempts to close the underlying JDBC connection before closing the JMS session.
protected  ConnectionFactory createConnectionFactory()
          Oracle has two different factory classes: AQjmsQueueConnectionFactory which implements javax.jms.QueueConnectionFactory and AQjmsTopicConnectionFactory which implements javax.jms.TopicConnectionFactory so there is no single class to return in this method.
protected  void doConnect()
          Template method where any connections should be made for the connector
abstract  Connection getJdbcConnection()
           
 String getPayloadFactory()
           
 String getProtocol()
          The Oracle AQ connector supports both the oaq:// and the jms:// protocols.
 Session getSession(boolean transacted, boolean topic)
          Some versions of Oracle do not support more than one JMS session per connection.
 boolean isMultipleSessionsPerConnection()
           
 Message preProcessMessage(Message message, Session session)
          If the incoming message is an XMLType, return it as a standard javax.jms.TextMessage.
 void setMultipleSessionsPerConnection(boolean multipleSessionsPerConnection)
           
 void setPayloadFactory(String payloadFactory)
           
 boolean supportsProperty(String property)
          Oracle throws a "JMS-102: Feature not supported" error if any of these "standard" properties are used.
 boolean supportsProtocol(String protocol)
          The Oracle AQ connector supports both the oaq:// and the jms:// protocols.
 
Methods inherited from class org.mule.providers.jms.JmsConnector
applyVendorSpecificConnectionFactoryProperties, close, close, close, close, closeQuietly, closeQuietly, closeQuietly, closeQuietly, closeQuietly, createConnection, createRedeliveryHandler, doDisconnect, doDispose, doInitialise, doStart, doStop, getAcknowledgementMode, getClientId, getConnection, getConnectionFactory, getConnectionFactoryClass, getConnectionFactoryJndiName, getConnectionFactoryProperties, getJmsSupport, getJndiContext, getJndiInitialFactory, getJndiProviderProperties, getJndiProviderUrl, getMaxRedelivery, getMessageAdapter, getPassword, getReceiverKey, getRedeliveryHandler, getReplyToHandler, getSession, getSessionFromTransaction, getSpecification, getTopicResolver, getUsername, initJndiContext, isCacheJmsSessions, isDurable, isEagerConsumer, isForceJndiDestinations, isHonorQosHeaders, isJndiDestinations, isNoLocal, isPersistentDelivery, isRecoverJmsConnections, isRemoteSyncEnabled, onNotification, setAcknowledgementMode, setCacheJmsSessions, setClientId, setConnection, setConnectionFactory, setConnectionFactoryClass, setConnectionFactoryJndiName, setConnectionFactoryProperties, setDurable, setEagerConsumer, setForceJndiDestinations, setHonorQosHeaders, setJmsSupport, setJndiContext, setJndiDestinations, setJndiInitialFactory, setJndiProviderProperties, setJndiProviderUrl, setMaxRedelivery, setNoLocal, setPassword, setPersistentDelivery, setRecoverJmsConnections, setRedeliveryHandler, setSpecification, setTopicResolver, setUsername
 
Methods inherited from class org.mule.providers.AbstractConnector
checkDisposed, connect, createReceiver, destroyReceiver, disconnect, dispatch, dispose, disposeDispatchers, disposeReceivers, disposeWorkManagers, exceptionThrown, fireNotification, getConnectEventId, getConnectionDescription, getConnectionStrategy, getDefaultInboundTransformer, getDefaultOutboundTransformer, getDefaultResponseTransformer, getDispatcherFactory, getDispatcherThreadingProfile, getDispatcherWorkManager, getExceptionListener, getMaxDispatchersActive, getName, getNumberOfConcurrentTransactedReceivers, getOutputStream, getReceiver, getReceivers, getReceivers, getReceiverThreadingProfile, getReceiverWorkManager, getScheduler, getServiceDescriptor, getServiceOverrides, getSessionHandler, getStreamMessageAdapter, getSupportedProtocols, handleException, handleWorkException, initFromServiceDescriptor, initialise, initialiseFromUrl, isConnected, isCreateMultipleTransactedReceivers, isDisposed, isDisposing, isEnableMessageEvents, isStarted, lookupReceiver, receive, receive, registerListener, registerSupportedProtocol, registerSupportedProtocolWithoutPrefix, send, setConnectionStrategy, setCreateMultipleTransactedReceivers, setDefaultInboundTransformer, setDefaultOutboundTransformer, setDefaultResponseTransformer, setDispatcherFactory, setDispatcherThreadingProfile, setEnableMessageEvents, setExceptionListener, setMaxDispatchersActive, setName, setNumberOfConcurrentTransactedReceivers, setReceiverThreadingProfile, setServiceOverrides, setSessionHandler, setSupportedProtocols, startConnector, stopConnector, toString, unregisterListener, unregisterSupportedProtocol, workAccepted, workCompleted, workRejected, workStarted
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

PAYLOADFACTORY_PROPERTY

public static final String PAYLOADFACTORY_PROPERTY
If a queue's payload is an ADT (Oracle Advanced Data Type), the appropriate payload factory must be specified in the endpoint's properties. Note: if all queues are of the same payload type, this property may be set globally for the connector instead of for each endpoint.

See Also:
Constant Field Values

payloadFactory

protected String payloadFactory
Constructor Detail

AbstractOracleJmsConnector

public AbstractOracleJmsConnector()
Method Detail

getProtocol

public String getProtocol()
The Oracle AQ connector supports both the oaq:// and the jms:// protocols.

Specified by:
getProtocol in interface UMOConnector
Overrides:
getProtocol in class JmsConnector
Returns:
the primary protocol name for endpoints of this connector

supportsProtocol

public boolean supportsProtocol(String protocol)
The Oracle AQ connector supports both the oaq:// and the jms:// protocols.

Specified by:
supportsProtocol in interface UMOConnector
Overrides:
supportsProtocol in class AbstractConnector
Parameters:
protocol - protocol name
Returns:
true if the protocol is supported by this connector.

doConnect

protected void doConnect()
                  throws ConnectException
Description copied from class: AbstractConnector
Template method where any connections should be made for the connector

Overrides:
doConnect in class JmsConnector
Throws:
ConnectException

getSession

public Session getSession(boolean transacted,
                          boolean topic)
                   throws JMSException
Some versions of Oracle do not support more than one JMS session per connection. In this case we need to open a new connection for each session, otherwise we will get the following error: JMS-106: Cannot have more than one open Session on a JMSConnection.

Overrides:
getSession in class JmsConnector
Throws:
JMSException
See Also:
multipleSessionsPerConnection

supportsProperty

public boolean supportsProperty(String property)
Oracle throws a "JMS-102: Feature not supported" error if any of these "standard" properties are used.

Overrides:
supportsProperty in class JmsConnector

preProcessMessage

public Message preProcessMessage(Message message,
                                 Session session)
                          throws Exception
If the incoming message is an XMLType, return it as a standard javax.jms.TextMessage. If the incoming message is any other AdtMessage, return it as a standard javax.jms.ObjectMessage.

Overrides:
preProcessMessage in class JmsConnector
Parameters:
message - - the incoming message
session - - the JMS session
Returns:
the preprocessed message
Throws:
Exception

close

public void close(Session session)
           throws JMSException
Attempts to close the underlying JDBC connection before closing the JMS session.

Overrides:
close in class JmsConnector
Throws:
JMSException
See Also:
org.mule.providers.jms.JmsConnector.close( javax.jms.Session)

getJdbcConnection

public abstract Connection getJdbcConnection()
                                      throws JMSException
Throws:
JMSException

isMultipleSessionsPerConnection

public boolean isMultipleSessionsPerConnection()

setMultipleSessionsPerConnection

public void setMultipleSessionsPerConnection(boolean multipleSessionsPerConnection)

createConnectionFactory

protected ConnectionFactory createConnectionFactory()
                                             throws InitialisationException,
                                                    NamingException
Oracle has two different factory classes: AQjmsQueueConnectionFactory which implements javax.jms.QueueConnectionFactory and AQjmsTopicConnectionFactory which implements javax.jms.TopicConnectionFactory so there is no single class to return in this method.

Overrides:
createConnectionFactory in class JmsConnector
Returns:
null
Throws:
InitialisationException
NamingException

getPayloadFactory

public String getPayloadFactory()

setPayloadFactory

public void setPayloadFactory(String payloadFactory)


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