use of javax.jms.MessageProducer in project tomee by apache.
the class EncStatelessBean method testJmsConnection.
private void testJmsConnection(final javax.jms.Connection connection) throws JMSException {
final Session session = connection.createSession(false, Session.DUPS_OK_ACKNOWLEDGE);
final Topic topic = session.createTopic("test");
final MessageProducer producer = session.createProducer(topic);
producer.send(session.createMessage());
producer.close();
session.close();
connection.close();
}
use of javax.jms.MessageProducer in project tomee by apache.
the class EncSingletonBean method testJmsConnection.
private void testJmsConnection(final javax.jms.Connection connection) throws JMSException {
final Session session = connection.createSession(false, Session.DUPS_OK_ACKNOWLEDGE);
final Topic topic = session.createTopic("test");
final MessageProducer producer = session.createProducer(topic);
producer.send(session.createMessage());
producer.close();
session.close();
connection.close();
}
use of javax.jms.MessageProducer in project tomee by apache.
the class AnnotatedFieldInjectionStatefulBean method testJmsConnection.
private void testJmsConnection(final javax.jms.Connection connection) throws JMSException {
final Session session = connection.createSession(false, Session.DUPS_OK_ACKNOWLEDGE);
final Topic topic = session.createTopic("test");
final MessageProducer producer = session.createProducer(topic);
producer.send(session.createMessage());
producer.close();
session.close();
connection.close();
}
use of javax.jms.MessageProducer in project tomee by apache.
the class ContextLookupStatefulBean method testJmsConnection.
private void testJmsConnection(final Connection connection) throws JMSException {
final Session session = connection.createSession(false, Session.DUPS_OK_ACKNOWLEDGE);
final Topic topic = session.createTopic("test");
final MessageProducer producer = session.createProducer(topic);
producer.send(session.createMessage());
producer.close();
session.close();
connection.close();
}
use of javax.jms.MessageProducer in project tomee by apache.
the class ContextLookupStatefulPojoBean method testJmsConnection.
private void testJmsConnection(final Connection connection) throws JMSException {
final Session session = connection.createSession(false, Session.DUPS_OK_ACKNOWLEDGE);
final Topic topic = session.createTopic("test");
final MessageProducer producer = session.createProducer(topic);
producer.send(session.createMessage());
producer.close();
session.close();
connection.close();
}
Aggregations