Switch branches/tags
Nothing to show
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
31 lines (23 sloc) 729 Bytes
package com.mycompany.websocketexam;
import javax.annotation.Resource;
import javax.ejb.LocalBean;
import javax.ejb.Stateless;
import javax.inject.Inject;
import javax.jms.JMSContext;
import javax.jms.Queue;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
public class QueueSenderSessionBean {
private static final Logger logger
= LoggerFactory.getLogger(QueueSenderSessionBean.class);
@Resource(mappedName = "jms/myQueue")
private Queue myQueue;
private JMSContext jmsContext;
public void sendMessage(String message) {"Enqueu Message to JMS");
jmsContext.createProducer().send(myQueue, message);