This is an automated email from the ASF dual-hosted git repository.

ahuber pushed a commit to branch dev/2.0.0-M2
in repository https://gitbox.apache.org/repos/asf/isis.git

commit dffff65d1ae23fa9e677fcc5eb0e72e33089ce6c
Author: Andi Huber <ahu...@apache.org>
AuthorDate: Mon Oct 30 17:21:46 2017 +0100

    ISIS-1756 utilize IsisWicketApplication's life-cycle instead of
    providing a life-cycle CDI Bean
---
 .../webapp/jee/IsisDomainAppLifecycleBean.java     | 61 ----------------------
 .../wicket/viewer/IsisWicketApplication.java       |  1 +
 2 files changed, 1 insertion(+), 61 deletions(-)

diff --git 
a/core/runtime/src/main/java/org/apache/isis/core/webapp/jee/IsisDomainAppLifecycleBean.java
 
b/core/runtime/src/main/java/org/apache/isis/core/webapp/jee/IsisDomainAppLifecycleBean.java
deleted file mode 100644
index 416b11f..0000000
--- 
a/core/runtime/src/main/java/org/apache/isis/core/webapp/jee/IsisDomainAppLifecycleBean.java
+++ /dev/null
@@ -1,61 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *       http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- **/
-package org.apache.isis.core.webapp.jee;
-
-import javax.annotation.PostConstruct;
-import javax.annotation.PreDestroy;
-import javax.ejb.Singleton;
-import javax.ejb.Startup;
-import javax.enterprise.context.ApplicationScoped;
-
-import org.apache.isis.core.runtime.system.context.IsisContext;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-
-/**
- * 
- * JEE singleton that hooks into an Isis-Application's life-cycle. 
- * 
- * <p>
- * This CDI managed Bean ensures proper destruction of Isis's context.
- * </p>
- * 
- * @author ahu...@apache.org
- *
- */
-@Singleton
-@Startup
-@ApplicationScoped
-public class IsisDomainAppLifecycleBean {
-
-       private static final Logger log = 
LoggerFactory.getLogger(IsisDomainAppLifecycleBean.class);
-       
-       @PostConstruct
-       public void init() {
-               log.info("initializing ...");
-       }
-       
-       @PreDestroy
-       public void destroy() {
-               IsisContext.destroy();
-               log.info("destroyed.");
-       }
-       
-}
diff --git 
a/core/viewer-wicket-impl/src/main/java/org/apache/isis/viewer/wicket/viewer/IsisWicketApplication.java
 
b/core/viewer-wicket-impl/src/main/java/org/apache/isis/viewer/wicket/viewer/IsisWicketApplication.java
index 03426ac..3347ca4 100644
--- 
a/core/viewer-wicket-impl/src/main/java/org/apache/isis/viewer/wicket/viewer/IsisWicketApplication.java
+++ 
b/core/viewer-wicket-impl/src/main/java/org/apache/isis/viewer/wicket/viewer/IsisWicketApplication.java
@@ -859,6 +859,7 @@ public class IsisWicketApplication
             }
             
getServletContext().setAttribute(WebAppConstants.ISIS_SESSION_FACTORY, null);
             super.onDestroy();
+            IsisContext.destroy();
         } catch(final RuntimeException ex) {
             // symmetry with #init()
             LOG.error("Failed to destroy", ex);

-- 
To stop receiving notification emails like this one, please contact
ahu...@apache.org.

Reply via email to