2

I have an application which is build as a .war file, we have a new requirement to read the JMS queues, i've tried to add ejb-jar.xml file and pointed to the message listener, but no messages were received by the deployed application, and deploy logs do not show anything about the Message driven beans. Was wondering if the .ear structure has anything to do with the whole thing.

Environement: CDI, MyBatis, Wildfly 9.2, Java 1.8

thank you.

Zeus
  • 6,386
  • 6
  • 54
  • 89
  • Just wondering, are you starting your app with `standalone.xml` or `standalone-full.xml`? Also why Wildfly 9.2, 10.1 is latest. – John Ament Oct 21 '16 at 22:47
  • Standalone.xml..i changed it to standalone-full.xml for this change. when we started we started with 9.2, we will update the server in future – Zeus Oct 21 '16 at 22:49

1 Answers1

2

You appear to be trying to use the Java EE 7 Web Profile, which defines which EE 7 specification components must be implemented by a container supporting WAR only deployments.

This profile says that the requirements of the "Enterprise JavaBeans (EJB) 3.2 Lite" specification must be implemented.

The EJB Lite specification requires support for:

  • Stateless, stateful, and singleton session bean components only
    • Local business interface and no-interface view only
  • Container-managed transactions and bean-managed transactions
  • Declarative and programmatic security
  • Interceptors
  • Local asynchronous session bean invocations
  • Non-persistent EJB Timer Service
  • Deployment descriptor support (ejb-jar.xml)

There is no Message Driven Bean support in WAR deployments there at this time.

Therefore you have two options:

  1. migrate your application to a full EAR deployment with an EJB module and WAR module;
  2. If your message driven beans are fully decoupled from the web module then you could deploy them in a standalone EJB module. If you need to share JPA entities or other libraries then the EAR is an easier way to go.
Steve C
  • 18,876
  • 5
  • 34
  • 37
  • But you can still activate the full java ee profile in war deployment, can't you? – maress Oct 21 '16 at 09:20
  • You can only do this by deploying your WAR as a web module in an EAR and adding the components not supported by EJB Lite into an additional EJB module in the EAR. – Steve C Oct 22 '16 at 07:47