On Jun 20, 2012, at 12:04 PM, David Blevins wrote: > Let me take a shot at a slightly different approach. Something like what we > did the client with a CDI-like observer pattern. As I mentioned in that > email, we might want to do it in the server as well. Sounds like a good time > to try it out.
Updated the code so that SystemInstance has the observer functionality built-in. We have the following events now: container/openejb-core/src/main/java/org/apache/openejb/assembler/classic/event/AssemblerCreated.java container/openejb-core/src/main/java/org/apache/openejb/assembler/classic/event/AssemblerDestroyed.java container/openejb-loader/src/main/java/org/apache/openejb/loader/event/ComponentAdded.java container/openejb-loader/src/main/java/org/apache/openejb/loader/event/ComponentRemoved.java container/openejb-loader/src/main/java/org/apache/openejb/observer/event/ObserverAdded.java container/openejb-loader/src/main/java/org/apache/openejb/observer/event/ObserverFailed.java container/openejb-loader/src/main/java/org/apache/openejb/observer/event/ObserverRemoved.java Temporarily removed the code in the ConfigurationFactory where we were creating and installing observers. It's fine code to have, we just need to move that into the Assembler as that's it's job (to create the things defined in the openejb/tomee.xml file). We just need to update the FacilitiesInfo to have a collection of observerInfo. We should probably allow the Observers to have dependency injection and just treat them as another kind of ServiceInfo. Well probably want to add a META-INF/ loading mechanism as well. -David
