[webbeans-dev] Application scope not active

Nicklas Karlsson nickarls at gmail.com
Thu Dec 4 12:08:22 EST 2008


9.6.3 in the 20081203 specs lists when the Application scope is active:

• The application scope is active during the service() method of any
servlet in the web application.
• The application scope is active during any Java EE web service invocation.
• The application scope is also active during any remote method
invocation of any EJB bean, during any call to an EJBtimeout method
and during message delivery to any EJB message driven bean

When is the application scope *not* active?

The specs says that "The application context is shared between all
servlet requests, web service invocations, EJB remote method
invocations,EJB timeouts and message deliveries to message driven
beans that execute within the same application". But apparently the
application context active state is not shared? I can't recall Pete's
motivation, but I recall changing the active to a ThreadLocal.
Apparently it not "always on", and the states (application scope and
others) should be flipped according to the lifecycle rules in the
specs?
---
Nik




More information about the weld-dev mailing list