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 252502 - Creating an Enterprise Application Using Maven needs update
Summary: Creating an Enterprise Application Using Maven needs update
Status: NEW
Alias: None
Product: usersguide
Classification: Unclassified
Component: JavaEE (show other bugs)
Version: 8.1
Hardware: PC All
: P3 normal (vote)
Assignee: Kenneth Ganfield
URL: https://netbeans.org/kb/docs/javaee/m...
Keywords:
Depends on:
Blocks:
 
Reported: 2015-05-20 12:17 UTC by Petr Hejl
Modified: 2015-05-20 12:17 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Petr Hejl 2015-05-20 12:17:04 UTC
The tutorial needs to be updated to reflect the actual results of the steps when using Java EE 7 and GlassFish.

1) NewMessage bean uses annotation and java:app namespace to define JMS:
@JMSDestinationDefinition(name = "java:app/jms/NewMessage", interfaceName = "javax.jms.Queue", resourceAdapter = "jmsra", destinationName = "NewMessage")
@MessageDriven(activationConfig = {
    @ActivationConfigProperty(propertyName = "destinationType", propertyValue = "javax.jms.Queue"),
    @ActivationConfigProperty(propertyName = "destinationLookup", propertyValue = "java:app/jms/NewMessage")
})

2) There is no glassfish-resources.xml generated in EJB module anymore.
3) PostMessage servlet should use these resources in order to work:
@Resource(mappedName = "java:comp/DefaultJMSConnectionFactory")
private ConnectionFactory connectionFactory;

@Resource(mappedName = "java:app/jms/NewMessage")
private Queue queue;