@Deprecated public class JMSBridgeModule extends Object implements ExceptionListener, MessageListener, Serializable
BridgeUnifiedModule
class is a bridge module based on the
JMS 1.1 unified semantics and classes.Modifier and Type | Class and Description |
---|---|
protected class |
JMSBridgeModule.ConsumerDaemon
Deprecated.
The
ConsumerDaemon thread allows to call
MessageConsumer.receive() for requesting a foreign JMS
message without blocking the JORAM server. |
protected class |
JMSBridgeModule.ReconnectionDaemon
Deprecated.
The
ReconnectionDaemon thread is responsible for reconnecting
the bridge module with the foreign JMS server in case of disconnection. |
protected class |
JMSBridgeModule.StartupDaemon
Deprecated.
The
StartupDaemon thread is responsible for retrieving
the needed JMS administered objects from the JNDI server. |
protected class |
JMSBridgeModule.XARecoverDaemon
Deprecated.
|
Modifier and Type | Field and Description |
---|---|
protected AgentId |
agentId
Deprecated.
Identifier of the agent using this module.
|
private boolean |
automaticRequest
Deprecated.
Automatic receive for a bridge Queue.
|
protected String |
clientID
Deprecated.
JMS clientID field.
|
protected ConnectionFactory |
cnxFact
Deprecated.
Connection factory object for connecting to the foreign JMS server.
|
protected String |
cnxFactName
Deprecated.
ConnectionFactory JNDI name.
|
protected MessageConsumer |
consumer
Deprecated.
Consumer object.
|
protected Connection |
consumerCnx
Deprecated.
|
protected JMSBridgeModule.ConsumerDaemon |
consumerDaemon
Deprecated.
Daemon used for requesting messages.
|
private XAResource |
consumerRes
Deprecated.
consumer XAResource
|
protected Session |
consumerSession
Deprecated.
Session for getting messages from the foreign JMS destination.
|
protected Destination |
dest
Deprecated.
Foreign JMS destination object.
|
protected String |
destName
Deprecated.
Destination JNDI name.
|
private boolean |
isXA
Deprecated.
Indicates to use an XAConnection.
|
protected String |
jndiFactory
Deprecated.
Name of the JNDI factory class to use.
|
protected String |
jndiUrl
Deprecated.
JNDI URL.
|
protected boolean |
listener
Deprecated.
true if a listener has been set on the JMS consumer. |
private Object |
lock
Deprecated.
serializable object for synchronization
|
static Logger |
logger
Deprecated.
logger
|
protected String |
notUsableMessage
Deprecated.
Message explaining why the module is not usable.
|
protected String |
password
Deprecated.
User password for connecting to the foreign JMS server.
|
protected MessageProducer |
producer
Deprecated.
Producer object.
|
protected Connection |
producerCnx
Deprecated.
Connection to the foreign JMS server.
|
private XAResource |
producerRes
Deprecated.
producer XAResource
|
protected Session |
producerSession
Deprecated.
Session for sending messages to the foreign JMS destination.
|
protected Vector |
qout
Deprecated.
Vector holding the pending messages to send after reconnection.
|
protected JMSBridgeModule.ReconnectionDaemon |
reconnectionDaemon
Deprecated.
Daemon used for the reconnection process.
|
protected String |
selector
Deprecated.
Selector for filtering messages.
|
private static long |
serialVersionUID
Deprecated.
define serialVersionUID for interoperability
|
protected boolean |
usable
Deprecated.
true if the module is fully usable. |
protected String |
userName
Deprecated.
User identification for connecting to the foreign JMS server.
|
Constructor and Description |
---|
JMSBridgeModule(Properties prop)
Deprecated.
Constructs a
BridgeUnifiedModule module. |
Modifier and Type | Method and Description |
---|---|
protected void |
acknowledge(Message message)
Deprecated.
Acknowledges a message successfully delivered to the foreign JMS server.
|
void |
close()
Deprecated.
Interrupts the daemons and closes the connection.
|
void |
connect()
Deprecated.
Launches the connection process to the foreign JMS server.
|
protected void |
doConnect()
Deprecated.
Opens a connection with the foreign JMS server and creates the
JMS resources for interacting with the foreign JMS destination.
|
protected void |
doXAConnect()
Deprecated.
Opens a XA connection with the foreign JMS server and creates the
XA JMS resources for interacting with the foreign JMS destination.
|
void |
init(AgentId agentId)
Deprecated.
Initializes the module's parameters.
|
void |
onException(JMSException exc)
Deprecated.
Implements the
javax.jms.ExceptionListener interface for
catching the failures of the connection to the remote JMS server. |
void |
onMessage(Message jmsMessage)
Deprecated.
Implements the
javax.jms.MessageListener interface for
processing the asynchronous deliveries coming from the foreign JMS
server. |
private void |
readObject(ObjectInputStream in)
Deprecated.
Deserializes a
BridgeUnifiedModule instance. |
void |
receive()
Deprecated.
Asynchronous method requesting a delivery from the foreign
JMS destination.
|
Message |
receiveNoWait()
Deprecated.
Synchronous method requesting an immediate delivery from the foreign
JMS destination.
|
void |
send(Message message)
Deprecated.
Sends a message to the foreign JMS destination.
|
protected void |
setConsumer()
Deprecated.
Sets the JMS consumer on the foreign destination.
|
void |
setMessageListener()
Deprecated.
Sets a message listener on the foreign JMS destination.
|
protected void |
unsetConsumer()
Deprecated.
Unsets the JMS consumer.
|
void |
unsetMessageListener()
Deprecated.
Unsets the set message listener on the foreign JMS destination.
|
private static final long serialVersionUID
public static Logger logger
protected AgentId agentId
protected String jndiFactory
protected String jndiUrl
protected String cnxFactName
protected String destName
protected ConnectionFactory cnxFact
protected Destination dest
protected String userName
protected String password
protected String clientID
protected String selector
protected boolean usable
true
if the module is fully usable.protected String notUsableMessage
protected transient Connection producerCnx
protected transient Connection consumerCnx
protected transient Session producerSession
protected transient Session consumerSession
protected transient MessageProducer producer
protected transient MessageConsumer consumer
protected transient boolean listener
true
if a listener has been set on the JMS consumer.protected transient Vector qout
protected transient JMSBridgeModule.ConsumerDaemon consumerDaemon
protected transient JMSBridgeModule.ReconnectionDaemon reconnectionDaemon
private boolean automaticRequest
private boolean isXA
private transient XAResource producerRes
private transient XAResource consumerRes
private Object lock
public JMSBridgeModule(Properties prop)
BridgeUnifiedModule
module.prop
- JMS properties required for establishing the link with the
foreign JMS server.public void init(AgentId agentId)
agentId
- Identifier of the agent using the module.IllegalArgumentException
- If the provided properties are
invalid.public void connect() throws JMSException
IllegalStateException
- If the module can't access
the foreign JMS server.JMSException
- If the needed JMS resources can't be
created.public void setMessageListener() throws IllegalStateException
IllegalStateException
- If the module state does
not allow to set a listener.public void unsetMessageListener()
public Message receiveNoWait() throws IllegalStateException
null
if no message is available or if the request
fails.IllegalStateException
- If the module state does
not allow to request a message.public void receive() throws IllegalStateException
IllegalStateException
- If the module state does
not allow to request a message.public void send(Message message) throws JMSException
IllegalStateException
- If the module's state does
not permit message sendings.MessageFormatException
- If the MOM message could not
be converted into a foreign JMS message.JMSException
public void close()
public void onException(JMSException exc)
javax.jms.ExceptionListener
interface for
catching the failures of the connection to the remote JMS server.
Reacts by launching a reconnection process.
onException
in interface ExceptionListener
public void onMessage(Message jmsMessage)
javax.jms.MessageListener
interface for
processing the asynchronous deliveries coming from the foreign JMS
server.onMessage
in interface MessageListener
protected void doXAConnect() throws JMSException
JMSException
- If the needed JMS resources could not be created.protected void doConnect() throws JMSException
JMSException
- If the needed JMS resources could not be created.protected void setConsumer() throws JMSException
JMSException
- If the JMS consumer could not be created.protected void unsetConsumer()
protected void acknowledge(Message message)
private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException
BridgeUnifiedModule
instance.IOException
ClassNotFoundException
Copyright © 2022 ScalAgent D.T.. All rights reserved.