You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@isis.apache.org by ah...@apache.org on 2017/10/30 16:21:52 UTC
[isis] branch dev/2.0.0/ISIS-1767-jee-7 updated: ISIS-1756 utilize
IsisWicketApplication's life-cycle instead of providing a life-cycle CDI
Bean
This is an automated email from the ASF dual-hosted git repository.
ahuber pushed a commit to branch dev/2.0.0/ISIS-1767-jee-7
in repository https://gitbox.apache.org/repos/asf/isis.git
The following commit(s) were added to refs/heads/dev/2.0.0/ISIS-1767-jee-7 by this push:
new 9ff06b1 ISIS-1756 utilize IsisWicketApplication's life-cycle instead of providing a life-cycle CDI Bean
9ff06b1 is described below
commit 9ff06b1d7d35dc88253754a53fd0f480c4cfdd71
Author: Andi Huber <ah...@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 ahuber@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 6719fcd..612b346 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
['"commits@isis.apache.org" <co...@isis.apache.org>'].