Install & Compatibility
Where this runs
No compatibility data collected yet for this library.
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
ConnectionFactory
✓ javax.jms.ConnectionFactory
Sends a text message to a JMS queue.
import javax.jms.ConnectionFactory;
import javax.jms.Connection;
import javax.jms.Session;
import javax.jms.MessageProducer;
import javax.jms.TextMessage;
import javax.jms.Queue;
public class Example {
public static void main(String[] args) throws Exception {
ConnectionFactory factory = new com.sun.messaging.ConnectionFactory();
try (Connection conn = factory.createConnection();
Session session = conn.createSession(false, Session.AUTO_ACKNOWLEDGE)) {
Queue queue = session.createQueue("test");
MessageProducer producer = session.createProducer(queue);
TextMessage msg = session.createTextMessage("Hello");
producer.send(msg);
}
}
}
Audit
Dependencies
No dependency data recorded yet.