[jboss-user] [EJB3] - EJB inside WAR deployment order

Tomas Bartalos do-not-reply at jboss.com
Tue Aug 30 10:49:51 EDT 2011

Tomas Bartalos [http://community.jboss.org/people/barti] created the discussion

"EJB inside WAR deployment order"

To view the discussion, visit: http://community.jboss.org/message/623781#623781

Is there a way how to influence the deployment order of EJB packed inside WAR (according to EJB 3.1 spec).

Background: We have a servlet filter, where we need to access EJB bean.
The problem is, that the filter is Guice driven, so we can't use @EJB annotation in the code, however we have to make a custom ejb lookup.

Problem: When we deploy the web app, we get an error saying, that the EJB is not bound, because the web app and the filter is initialized before the EJB.

Workaround: If I create a plain old servlet filter with @EJB annotation to an existing EJB, the deployment order is correct (1. EJB, 2. Web app).
However this forces me to create useless filter, with @EJB reference to some existing bean.
Is there a "proper" way how to influence the order ?

thanks for your answers,

Reply to this message by going to Community

Start a new discussion in EJB3 at Community

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-user/attachments/20110830/92ef65b6/attachment.html 

More information about the jboss-user mailing list