This week's book giveaway is in the OCPJP forum. We're giving away four copies of OCA/OCP Java SE 7 Programmer I & II Study Guide and have Kathy Sierra & Bert Bates on-line! See this thread for details.
is it possible to initialize a List in an Interceptor (or EJB) in the deployment descriptor?
I am trying to implement the Observer Pattern with an Interceptor as the Observable. The Observers must be injected into the Interceptor.
I thought I saw something like this but I cannot find an example. Perhaps I am confusing it with Spring.
The spec doesn't have anything for initializing the state of the interceptors via deployment descriptors. Instead you can actually mark a specific method which would do the initialization (it's called a post-construct method). How you initiliaze that data in the post-construct method isn't governed by the spec.