@Stateless public class MyBean implements My { private static final Logger log = Logger.getLogger(MyBean.class.getName()); @Resource(mappedName = "jms/MyConnectionFactory") private ConnectionFactory connectionFactory; public void notifyScheduler() { try { notifySchedulerOrThrow(); // Line 31 // ... public void notifySchedulerOrThrow() throws JMSException { Connection connection = connectionFactory.createConnection(); // Line 39 // ...