Return-Path: X-Original-To: apmail-deltaspike-users-archive@www.apache.org Delivered-To: apmail-deltaspike-users-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 2687C10B83 for ; Tue, 19 Nov 2013 03:00:36 +0000 (UTC) Received: (qmail 95212 invoked by uid 500); 19 Nov 2013 03:00:36 -0000 Delivered-To: apmail-deltaspike-users-archive@deltaspike.apache.org Received: (qmail 95086 invoked by uid 500); 19 Nov 2013 03:00:35 -0000 Mailing-List: contact users-help@deltaspike.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@deltaspike.apache.org Delivered-To: mailing list users@deltaspike.apache.org Received: (qmail 95078 invoked by uid 99); 19 Nov 2013 03:00:35 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 19 Nov 2013 03:00:35 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of michael.mathers@gmail.com designates 209.85.128.48 as permitted sender) Received: from [209.85.128.48] (HELO mail-qe0-f48.google.com) (209.85.128.48) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 19 Nov 2013 03:00:31 +0000 Received: by mail-qe0-f48.google.com with SMTP id gc15so433592qeb.21 for ; Mon, 18 Nov 2013 19:00:09 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=K3NomDvUi6LbWff5vWBlvxXeTV/Q98iy55tS1AnsHSw=; b=yOJXC1lB0CKlUJMNozdcHwfxXfDsb8EdQOVAMtMeIUbZiz/JN+ZmztnP7iVGXfuyog i6UU4667x7FE0xgFmvN/1Sus0s9sEbTk9flbOKi23VlYg3RVoozWKhvyAbDmtaAlHx5O NpIH2MNt3nBqz0s9uGKQRNRJh2twKOAYEoVLpaDIsdzuq27ZqAkX8DfLxd2UD4XH989Y TvYmUXYdD6RSyvGDOXbplgaW/1SVIgbESLZJcrwhlgSAtb0rXzg6XmWSRAgUUi8hOlEM TT1bB/aMhI+7byRsaknDDmZ3dGP4rv+TO0gfdd8KZK7dBn48YsFBoHke2pMyNPgw4oFv efDw== MIME-Version: 1.0 X-Received: by 10.224.129.202 with SMTP id p10mr39298625qas.84.1384830009802; Mon, 18 Nov 2013 19:00:09 -0800 (PST) Received: by 10.96.201.106 with HTTP; Mon, 18 Nov 2013 19:00:09 -0800 (PST) In-Reply-To: References: Date: Mon, 18 Nov 2013 20:00:09 -0700 Message-ID: Subject: Re: Request/Session Lifecycle Events and Glassfish 4/Arquillian From: Michael Mathers To: users@deltaspike.apache.org Content-Type: multipart/alternative; boundary=001a11c2c124cf072f04eb7edcc8 X-Virus-Checked: Checked by ClamAV on apache.org --001a11c2c124cf072f04eb7edcc8 Content-Type: text/plain; charset=UTF-8 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 < christian@kaltepoth.de> 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 > > > 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 from public void > > > > > org.apache.deltaspike.core.util.context.ContextualInstanceInfo.setCreationalContext(javax.enterprise.context.spi.CreationalContext) > > 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 > --001a11c2c124cf072f04eb7edcc8--