Search in sources :

Example 46 with Topic

use of javax.jms.Topic in project tomee by apache.

the class FieldInjectionMdbBean 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();
}
Also used : MessageProducer(javax.jms.MessageProducer) Topic(javax.jms.Topic) Session(javax.jms.Session)

Example 47 with Topic

use of javax.jms.Topic in project tomee by apache.

the class SetterInjectionMdbBean 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();
}
Also used : MessageProducer(javax.jms.MessageProducer) Topic(javax.jms.Topic) Session(javax.jms.Session)

Example 48 with Topic

use of javax.jms.Topic in project tomee by apache.

the class FieldInjectionSingletonBean 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();
}
Also used : MessageProducer(javax.jms.MessageProducer) Topic(javax.jms.Topic) Session(javax.jms.Session)

Example 49 with Topic

use of javax.jms.Topic in project tomee by apache.

the class SetterInjectionSingletonBean 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();
}
Also used : MessageProducer(javax.jms.MessageProducer) Topic(javax.jms.Topic) Session(javax.jms.Session)

Example 50 with Topic

use of javax.jms.Topic in project tomee by apache.

the class EncStatefulBean 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();
}
Also used : MessageProducer(javax.jms.MessageProducer) Topic(javax.jms.Topic) Session(javax.jms.Session)

Aggregations

Topic (javax.jms.Topic)69 Session (javax.jms.Session)40 MessageProducer (javax.jms.MessageProducer)34 JMSException (javax.jms.JMSException)22 NamingException (javax.naming.NamingException)14 TextMessage (javax.jms.TextMessage)13 Message (javax.jms.Message)9 LaserCreateException (cern.laser.business.LaserCreateException)6 LaserRuntimeException (cern.laser.business.LaserRuntimeException)6 TopicSession (javax.jms.TopicSession)6 Test (org.junit.Test)6 ConnectionFactory (javax.jms.ConnectionFactory)5 MessageListener (javax.jms.MessageListener)5 Connection (javax.jms.Connection)4 Queue (javax.jms.Queue)3 TopicConnection (javax.jms.TopicConnection)3 ActiveMQConnection (org.apache.activemq.ActiveMQConnection)3 AlarmImpl (cern.laser.business.data.AlarmImpl)2 JmsMessageException (com.axway.ats.action.exceptions.JmsMessageException)2 ManagedSession (com.axway.ats.action.jms.model.sessions.ManagedSession)2