[tomcat7] 01/02: Added the SimpleInstanceManager from Tomcat 8 to help integrating the JSP compiler into Jetty 8

Emmanuel Bourg ebourg-guest at moszumanska.debian.org
Fri Sep 26 10:18:05 UTC 2014


This is an automated email from the git hooks/post-receive script.

ebourg-guest pushed a commit to branch master
in repository tomcat7.

commit 5ba27591a93ef2696c9a420e34ef1c793f3a8b3d
Author: Emmanuel Bourg <ebourg at apache.org>
Date:   Fri Sep 26 11:20:49 2014 +0200

    Added the SimpleInstanceManager from Tomcat 8 to help integrating the JSP compiler into Jetty 8
---
 debian/changelog                                   |  2 +
 .../patches/0021-add-simple-instance-manager.patch | 73 ++++++++++++++++++++++
 debian/patches/series                              |  1 +
 3 files changed, 76 insertions(+)

diff --git a/debian/changelog b/debian/changelog
index 4ad5402..d7e9a00 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -2,6 +2,8 @@ tomcat7 (7.0.55-2) UNRELEASED; urgency=medium
 
   * Removed the note about the authbind IPv6 incompatibility
     in /etc/defaults/tomcat7
+  * Added the SimpleInstanceManager from Tomcat 8 to help integrating
+    the JSP compiler into Jetty 8
 
  -- Emmanuel Bourg <ebourg at apache.org>  Wed, 30 Jul 2014 22:53:38 +0200
 
diff --git a/debian/patches/0021-add-simple-instance-manager.patch b/debian/patches/0021-add-simple-instance-manager.patch
new file mode 100644
index 0000000..c635d2b
--- /dev/null
+++ b/debian/patches/0021-add-simple-instance-manager.patch
@@ -0,0 +1,73 @@
+Description: Add the SimpleInstanceManager class from Tomcat 8 to help integrating the JSP compiler into Jetty 8
+Origin: backport, http://svn.apache.org/repos/asf/tomcat/trunk/java/org/apache/tomcat/SimpleInstanceManager.java
+--- /dev/null
++++ b/java/org/apache/tomcat/SimpleInstanceManager.java
+@@ -0,0 +1,68 @@
++/*
++ * 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.tomcat;
++
++import java.lang.reflect.InvocationTargetException;
++
++import javax.naming.NamingException;
++
++/**
++ * SimpleInstanceManager
++ *
++ * Implement the org.apache.tomcat.InstanceManager interface.
++ */
++public class SimpleInstanceManager implements InstanceManager {
++
++    public SimpleInstanceManager() {
++    }
++
++    @Override
++    public Object newInstance(Class<?> clazz) throws IllegalAccessException,
++            InvocationTargetException, NamingException, InstantiationException {
++        return prepareInstance(clazz.newInstance());
++    }
++
++    @Override
++    public Object newInstance(String className) throws IllegalAccessException,
++            InvocationTargetException, NamingException, InstantiationException,
++            ClassNotFoundException  {
++        Class<?> clazz = Thread.currentThread().getContextClassLoader().loadClass(className);
++        return prepareInstance(clazz.newInstance());
++    }
++
++    @Override
++    public Object newInstance(String fqcn, ClassLoader classLoader) throws IllegalAccessException,
++            InvocationTargetException, NamingException, InstantiationException,
++            ClassNotFoundException  {
++        Class<?> clazz = classLoader.loadClass(fqcn);
++        return prepareInstance(clazz.newInstance());
++    }
++
++    @Override
++    public void newInstance(Object o) throws IllegalAccessException, InvocationTargetException,
++            NamingException  {
++        prepareInstance(o);
++    }
++
++    @Override
++    public void destroyInstance(Object o) throws IllegalAccessException, InvocationTargetException {
++    }
++
++    private Object prepareInstance(Object o) {
++        return o;
++    }
++}
diff --git a/debian/patches/series b/debian/patches/series
index 35ae345..5ac9335 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -14,3 +14,4 @@
 0018-fix-manager-webapp.patch
 0019-add-distribution-to-error-page.patch
 0020-disable-java8-support-with-jdtcompiler.patch
+0021-add-simple-instance-manager.patch

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-java/tomcat7.git



More information about the pkg-java-commits mailing list