public class JMSProducer extends JMSClient
JMS_LOGGER, NO_TX, QUEUE, SESSION_TX, TOPIC
Constructor and Description |
---|
JMSProducer(java.lang.String destinationName,
javax.jms.Session session,
java.util.Properties env) |
JMSProducer(java.lang.String destinationName,
java.lang.String conFactoryName,
int txMode,
java.util.Properties env) |
JMSProducer(java.lang.String destinationName,
java.lang.String conFactoryName,
int txMode,
java.util.Properties env,
java.lang.String providerUserName,
java.lang.String providerPassword) |
Modifier and Type | Method and Description |
---|---|
void |
addMessage(JMSData data) |
void |
close()
Releses all resources that is cached by the client like JMS Session and
Connection.
|
JMSClient |
createClientInSession()
Creates another JMSClient of the same type in this clients Session.
|
JMSClient |
createClientInSession(java.lang.String destinationName,
java.util.Properties env)
Creates another JMSClient of the same type in this clients Session.
|
JMSConsumer |
createJMSConsumerInSession(java.lang.String selector)
Create a JMSConsumer in the same session as this JMSProducer.
|
void |
sendMessage(boolean autocommit) |
void |
sendMessage(JMSData data,
boolean autocommit)
Write a message to the Destination.
|
void |
sendMessage(java.util.List<JMSData> listData,
boolean autocommit)
Write a List of messages to the Destination.
|
commitTx, getDestinationName, getEnvironment, getProviderPassword, getProviderUserName, getSession, isValid, rollbackTx
public JMSProducer(java.lang.String destinationName, java.lang.String conFactoryName, int txMode, java.util.Properties env, java.lang.String providerUserName, java.lang.String providerPassword) throws MXException
destinationName
- the JNDI name of the Destination.conFactoryName
- the JNDI name of the ConnectionFactory.txMode
- The transaction mode for the JMS client Session.env
- The env properties to get an InitialContext.providerUserName
- The provider connection user.providerPassword
- The provider connection password.MXException
public JMSProducer(java.lang.String destinationName, java.lang.String conFactoryName, int txMode, java.util.Properties env) throws MXException
destinationName
- the JNDI name of the Destination.conFactoryName
- the JNDI name of the ConnectionFactory.txMode
- The transaction mode for the JMS client Session.env
- The env properties to get an InitialContext.MXException
public JMSProducer(java.lang.String destinationName, javax.jms.Session session, java.util.Properties env) throws MXException
destinationName
- the JNDI name of the Destination.session
- the JMS session from which the client should be created.env
- The env properties to get an InitialContext.MXException
public void addMessage(JMSData data)
data
- public void sendMessage(boolean autocommit) throws MXException
autocommit
- MXException
public void sendMessage(java.util.List<JMSData> listData, boolean autocommit) throws MXException
listData
- the list of JMSData objects each representing one jms Message.autocommit
- If set to true will commit the transaction if invoked in the context
of a JMS Session transaction.MXException
public void sendMessage(JMSData data, boolean autocommit) throws MXException
data
- the JMSData object representing a jms message.autocommit
- If set to true will commit the transaction if invoked in the context
of a JMS Session transaction.MXException
public void close()
JMSClient
public JMSClient createClientInSession() throws MXException
JMSClient
createClientInSession
in class JMSClient
MXException
public JMSClient createClientInSession(java.lang.String destinationName, java.util.Properties env) throws MXException
JMSClient
createClientInSession
in class JMSClient
MXException
public JMSConsumer createJMSConsumerInSession(java.lang.String selector) throws MXException
selector
- the message selector for the consumer.MXException