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

Summary: Creating an Enterprise Application Using Maven needs update
Product: usersguide Reporter: Petr Hejl <phejl>
Component: JavaEEAssignee: Kenneth Ganfield <kganfield>
Status: NEW ---    
Severity: normal    
Priority: P3    
Version: 8.1   
Hardware: PC   
OS: All   
URL: https://netbeans.org/kb/docs/javaee/maven-entapp.html
Issue Type: DEFECT Exception Reporter:

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;