This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 121052

Summary: [60cat] Missing return statement in a code generated by Enterprise Resources > Send JMS Message
Product: javaee Reporter: jlaskowski <jlaskowski>
Component: CodeAssignee: martin_adamek <martin_adamek>
Status: RESOLVED WONTFIX    
Severity: blocker    
Priority: P3    
Version: 6.x   
Hardware: PC   
OS: Windows XP   
Issue Type: ENHANCEMENT Exception Reporter:

Description jlaskowski 2007-11-03 13:12:36 UTC
[ BUILD # : 200710301200 ]
[ JDK VERSION : 1.6.0_02 ]

The code could look as follows:

    private Message createJMSMessageForjmsMyQueue(Session session,
String messageData) throws JMSException {
        TextMessage message = session.createTextMessage(messageData);
        return message;
    }

    private void sendJMSMessageToMyQueue(String messageData) throws
JMSException {
        Connection connection = null;
        Session session = null;
        try {
            connection = myQueueFactory.createConnection();
            session = connection.createSession(false,
javax.jms.Session.AUTO_ACKNOWLEDGE);
            MessageProducer messageProducer =
session.createProducer(myQueue);
           
messageProducer.send(createJMSMessageForjmsMyQueue(session,
messageData));
        } finally {
            if (session != null) {
                session.close();
            }
            if (connection != null) {
                connection.close();
            }
        }
    }
Comment 1 Martin Balin 2016-07-07 08:53:19 UTC
This old bug may not be relevant anymore. If you can still reproduce it in 8.2 development builds please reopen this issue.

Thanks for your cooperation,
NetBeans IDE 8.2 Release Boss