KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > objectweb > petals > binding > axis2 > listener > soap > AxisJettyServlet


1 /**
2  * PETALS - PETALS Services Platform.
3  * Copyright (c) 2005 EBM Websourcing, http://www.ebmwebsourcing.com/
4  *
5  * This library is free software; you can redistribute it and/or
6  * modify it under the terms of the GNU Lesser General Public
7  * License as published by the Free Software Foundation; either
8  * version 2.1 of the License, or (at your option) any later version.
9  * This library is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12  * Lesser General Public License for more details.
13  *
14  * You should have received a copy of the GNU Lesser General Public
15  * License along with this library; if not, write to the Free Software
16  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17  *
18  * -------------------------------------------------------------------------
19  * $Id$
20  * -------------------------------------------------------------------------
21  */

22 package org.objectweb.petals.binding.axis2.listener.soap;
23
24 import javax.servlet.ServletConfig JavaDoc;
25 import javax.servlet.ServletException JavaDoc;
26
27 import org.apache.axis2.Constants;
28 import org.apache.axis2.context.ConfigurationContext;
29 import org.apache.axis2.transport.http.AxisServlet;
30
31 /**
32  * Special servlet for Jetty server. This servlet extends AxisServlet to
33  * override the initConfigContext method that load a configuration context from
34  * a War file. In the Axis2BC, the configuration context is loaded at component
35  * startup and is passed by Jetty server and this servlet.
36  *
37  * @author Christophe Hamerling - EBM WebSourcing
38  *
39  */

40 public class AxisJettyServlet extends AxisServlet {
41
42     /**
43      *
44      */

45     private static final long serialVersionUID = -8035921158344750120L;
46
47     /**
48      * Creates a new instance of AxisJettyServlet
49      *
50      * @param configContext
51      */

52     public AxisJettyServlet(ConfigurationContext configContext) {
53         this.configContext = configContext;
54     }
55
56     /*
57      * (non-Javadoc)
58      *
59      * @see org.apache.axis2.transport.http.AxisServlet#initConfigContext(javax.servlet.ServletConfig)
60      */

61     protected ConfigurationContext initConfigContext(ServletConfig JavaDoc config)
62         throws ServletException JavaDoc {
63         // nothign to do, just return the configuration context. Avoid loading
64
// the configuration from default location (WAR)
65
this.configContext.setProperty(Constants.CONTAINER_MANAGED, Constants.VALUE_TRUE);
66         return this.configContext;
67     }
68
69 }
70
Popular Tags