I did finally get to this. With a breakpoint on the the listeners I verified that they get "isActivated" set to true, they are able to get a BeanManager instance and call "fireEvent". I just never see the event.
On Thu, Nov 14, 2013 at 10:05 AM, Christian Kaltepoth < [email protected]> wrote: > Hey Michael, > > I'm not aware of any compatibility issues with Glassfish 4. But AFAIK our > integration test suite only runs against Glassfish 3.1. I'll try to find > some time in the next days to add a Glassfish 4 profile to our suite. > > Apart from that you could do some debugging just to check if the > corresponding listeners are executed. If they are executed they should also > fire the events. The code isn't very complicated. See [1] and [2]. > > Christian > > [1] > > https://github.com/apache/deltaspike/blob/master/deltaspike/modules/servlet/impl/src/main/java/org/apache/deltaspike/servlet/impl/event/EventBridgeFilter.java#L53 > [2] > > https://github.com/apache/deltaspike/blob/master/deltaspike/modules/servlet/impl/src/main/java/org/apache/deltaspike/servlet/impl/event/EventEmitter.java#L47 > > > > 2013/11/13 Michael Mathers <[email protected]> > > > I can't seem to catch these events. I am using DS core and the servlet > > module (0.5) and everything else appears to be working fine. The > > configuration stuff with ProjectStage is great stuff! > > > > I can inject all of the Sevlet objects provided by the DS Servlet module > > but I cannot receive the events. > > > > I created an Arquillian test which pushes over a @WebServlet and then > runs > > the test. The Servlet is initialized by Glassfish and is then called by > > the test via a URL GET and successfully returns a response. The test > gets > > the response but the events are never called. > > > > The web.xml specifies 3.1. I tried adding all the listeners in anyway > and > > it completely blew up (already registered). Any suggestions? > > > > > > INFO: class: org.apache.deltaspike.servlet.impl.event.EventBridgeFilter > > activated=true > > INFO: 20:07:57.079 [admin-listener(2)] INFO > > o.i.j.deltaspike.EventsITServlet - EventsITServlet servlet has been > > initialized > > INFO: Loading application [test] at [/collectortest] > > INFO: test was successfully deployed in 2,643 milliseconds. > > INFO: File /tmp/MIME2910438175498708242.tmp was not deleted > > WARNING: The following warnings have been detected: WARNING: Parameter 1 > of > > type T from public void > > > > > org.apache.deltaspike.core.util.context.ContextualInstanceInfo.setContextualInstance(T) > > is not resolvable to a concrete type. > > WARNING: Parameter 1 of type > > javax.enterprise.context.spi.CreationalContext<T> from public void > > > > > org.apache.deltaspike.core.util.context.ContextualInstanceInfo.setCreationalContext(javax.enterprise.context.spi.CreationalContext<T>) > > is not resolvable to a concrete type. > > > > INFO: 20:07:58.082 [http-listener-1(3)] DEBUG > > o.i.j.deltaspike.EventsITServlet - Responded! > > INFO: 20:07:58.087 [http-listener-1(4)] DEBUG > > org.ipd.jeetest.deltaspike.EventsIT - Returned Stream Line: > EventsITServlet > > Response > > INFO: 20:07:58.087 [http-listener-1(4)] DEBUG > > org.ipd.jeetest.deltaspike.EventsIT - Events Observed: false, false, > false, > > false, false, false > > > > > > > > public void onCreate(@Observes @Initialized HttpSession session) { > > logger.debug("Session created: " + session.getId()); > > } > > public void onDestroy(@Observes @Destroyed HttpSession session) { > > logger.debug("Session destroyed: " + session.getId()); > > } > > public void onRequestCreate(@Observes @Initialized HttpServletRequest > > request) { > > logger.debug("Request created: " + request.getRequestURI()); > > } > > public void onRequestDestroy(@Observes @Destroyed HttpServletRequest > > request) { > > logger.debug("Request destroyed: " + request.getRequestURI()); > > } > > public void onResponseCreate(@Observes @Initialized HttpServletResponse > > response) { > > logger.debug("Response created: "); > > } > > public void onResponseDestroy(@Observes @Destroyed HttpServletResponse > > response) { > > logger.debug("Response destroyed: "); > > } > > > > > > -- > Christian Kaltepoth > Blog: http://blog.kaltepoth.de/ > Twitter: http://twitter.com/chkal > GitHub: https://github.com/chkal >
