summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArnaud Simon <arnaudsimon@apache.org>2008-10-28 13:44:56 +0000
committerArnaud Simon <arnaudsimon@apache.org>2008-10-28 13:44:56 +0000
commita9ff42414f14d97a631507ab10cc01f8a1d113c9 (patch)
treed322c48d7412f1e6a4ebb2e40c4ad53fd9646a85
parent6d386184df38afa6bb214384fcabf6522bad9ad0 (diff)
downloadqpid-python-a9ff42414f14d97a631507ab10cc01f8a1d113c9.tar.gz
QPID-1401:added missing QManServlet.java
git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@708576 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r--java/management/client/build.xml1
-rw-r--r--java/management/client/src/main/java/org/apache/qpid/management/servlet/QManServlet.java66
2 files changed, 66 insertions, 1 deletions
diff --git a/java/management/client/build.xml b/java/management/client/build.xml
index 608e491f80..0159745cb2 100644
--- a/java/management/client/build.xml
+++ b/java/management/client/build.xml
@@ -35,7 +35,6 @@
<mkdir dir="${servlet.root}"/>
<mkdir dir="${servlet.web-inf}"/>
<mkdir dir="${servlet.classes}"/>
- <mkdir dir="${servlet.lib}"/>
<copy file="./web.xml" todir="${servlet.web-inf}" verbose="false"/>
<copy todir="${servlet.classes}" verbose="false">
<fileset dir="${module.classes}">
diff --git a/java/management/client/src/main/java/org/apache/qpid/management/servlet/QManServlet.java b/java/management/client/src/main/java/org/apache/qpid/management/servlet/QManServlet.java
new file mode 100644
index 0000000000..8c69545f07
--- /dev/null
+++ b/java/management/client/src/main/java/org/apache/qpid/management/servlet/QManServlet.java
@@ -0,0 +1,66 @@
+/*
+ *
+ * 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.qpid.management.servlet;
+
+import javax.servlet.ServletException;
+import javax.servlet.http.HttpServlet;
+
+import org.apache.qpid.management.domain.services.QMan;
+import org.apache.qpid.management.domain.services.StartupFailureException;
+
+/**
+ * QMan initializer.
+ *
+ * @author Andrea Gazzarini
+ */
+public class QManServlet extends HttpServlet {
+
+ private static final long serialVersionUID = 6149614872902682208L;
+
+ // QMan instance
+ private QMan qman;
+
+ /**
+ * Initializes QMan instance.
+ *
+ * @throws ServletException when It's not possibile to proceed with initialization.
+ */
+ @Override
+ public void init() throws ServletException
+ {
+ qman = new QMan();
+ try {
+ qman.start();
+ } catch (StartupFailureException exception)
+ {
+ throw new ServletException(exception);
+ }
+ }
+
+ /**
+ * Stops QMan instance.
+ */
+ @Override
+ public void destroy()
+ {
+ // qman.stop();
+ }
+} \ No newline at end of file