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 - [60cat] Missing return statement in a code generated by Enterprise Resources > Send JMS Message
Summary: [60cat] Missing return statement in a code generated by Enterprise Resources ...
Status: RESOLVED WONTFIX
Alias: None
Product: javaee
Classification: Unclassified
Component: Code (show other bugs)
Version: 6.x
Hardware: PC Windows XP
: P3 blocker (vote)
Assignee: martin_adamek
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-11-03 13:12 UTC by jlaskowski
Modified: 2016-07-07 08:53 UTC (History)
0 users

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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