Return-Path: Delivered-To: apmail-ws-axis-dev-archive@www.apache.org Received: (qmail 84933 invoked from network); 16 Jun 2007 05:46:42 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 16 Jun 2007 05:46:42 -0000 Received: (qmail 38960 invoked by uid 500); 16 Jun 2007 05:46:44 -0000 Delivered-To: apmail-ws-axis-dev-archive@ws.apache.org Received: (qmail 38509 invoked by uid 500); 16 Jun 2007 05:46:43 -0000 Mailing-List: contact axis-dev-help@ws.apache.org; run by ezmlm Precedence: bulk Reply-To: axis-dev@ws.apache.org list-help: list-unsubscribe: List-Post: List-Id: Delivered-To: mailing list axis-dev@ws.apache.org Received: (qmail 38496 invoked by uid 99); 16 Jun 2007 05:46:43 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 15 Jun 2007 22:46:42 -0700 X-ASF-Spam-Status: No, hits=0.8 required=10.0 tests=INFO_TLD,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (herse.apache.org: domain of davanum@gmail.com designates 209.85.146.178 as permitted sender) Received: from [209.85.146.178] (HELO wa-out-1112.google.com) (209.85.146.178) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 15 Jun 2007 22:46:38 -0700 Received: by wa-out-1112.google.com with SMTP id k22so1379469waf for ; Fri, 15 Jun 2007 22:46:18 -0700 (PDT) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:reply-to:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=GBGsJdV+gbenRS7Uakn/gvPkUjzm89N67y0HeK4VGewRT0pjDmXGHxM4xyL8lT6D3W8AfKS36f4/EddaKf2S0oHTC5buEcZiGIr+7fdT/i7GKAR4teBU0Wbyc/ZKhQW+qfz0+sQ5wk65Fr6l1rUrwVFvOk9fPOs1wapEhhmNH8E= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:reply-to:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=GFxnWwxgWPBVCF5dHs3MY69QTxaJFVHnyeh3JnmZ3WQZJzN82ge8F9GA2OhfXtbiemGVkglCgyxQLpQtOCGbLPNvB0sKRRBuElAP6Z5Rzeu8u/vazGO4mkRuaRsp2LU5HrIvWGwMzusKoV/JmotnJYVC4vCxatvEpIrH8oSCrO4= Received: by 10.114.77.1 with SMTP id z1mr3853679waa.1181972778412; Fri, 15 Jun 2007 22:46:18 -0700 (PDT) Received: by 10.114.113.3 with HTTP; Fri, 15 Jun 2007 22:46:18 -0700 (PDT) Message-ID: <19e0530f0706152246h2cda7026jb27a32f02a15a74e@mail.gmail.com> Date: Sat, 16 Jun 2007 01:46:18 -0400 From: "Davanum Srinivas" Reply-To: dims@apache.org To: "axis-dev@ws.apache.org" Subject: Re: svn commit: r547870 - in /webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2: engine/AxisServer.java transport/SimpleAxis2Server.java In-Reply-To: <20070616054204.7F4151A981A@eris.apache.org> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <20070616054204.7F4151A981A@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Due to overwhelming negative reactions associated with my changes to clean this up, i reverted my changed. thanks, dims On 6/16/07, dims@apache.org wrote: > Author: dims > Date: Fri Jun 15 22:42:03 2007 > New Revision: 547870 > > URL: http://svn.apache.org/viewvc?view=rev&rev=547870 > Log: > back out all my changes as per -1 from deepal (http://marc.info/?l=axis-cvs&m=118196353513373&w=2) > > Modified: > webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/engine/AxisServer.java > webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/SimpleAxis2Server.java > > Modified: webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/engine/AxisServer.java > URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/engine/AxisServer.java?view=diff&rev=547870&r1=547869&r2=547870 > ============================================================================== > --- webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/engine/AxisServer.java (original) > +++ webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/engine/AxisServer.java Fri Jun 15 22:42:03 2007 > @@ -29,37 +29,17 @@ > */ > public class AxisServer { > > - protected ConfigurationContext configContext; > - protected ListenerManager listenerManager; > - private boolean startOnDeploy; > - private boolean started = false; > - > - /** > - * @param startOnDeploy - Should the server be started automatically when the first service is deployed > - * @throws Exception > - */ > - public AxisServer(boolean startOnDeploy) throws Exception { > - this.startOnDeploy = startOnDeploy; > - } > - > - /** > - * Users extending this class can override this method to supply a custom ConfigurationContext > - * @return > - * @throws AxisFault > - */ > - protected ConfigurationContext createDefaultConfigurationContext() throws AxisFault { > - return ConfigurationContextFactory.createConfigurationContextFromFileSystem(null); > - } > + private ConfigurationContext configContext; > > /** > * Will create a configuration context from the avialable data and then it > * will start the listener manager > * @throws AxisFault if something went wrong > */ > - public void start()throws AxisFault { > - listenerManager = new ListenerManager(); > - listenerManager.startSystem(getConfigurationContext()); > - started = true; > + public void strat()throws AxisFault { > + configContext = ConfigurationContextFactory.createConfigurationContextFromFileSystem(null); > + ListenerManager listenerManager = new ListenerManager(); > + listenerManager.startSystem(configContext); > } > > /** > @@ -68,43 +48,26 @@ > * @throws AxisFault : If something went wrong > */ > public void deployService(String serviceClassName) throws AxisFault{ > - AxisConfiguration axisConfig = getConfigurationContext().getAxisConfiguration(); > + if(configContext==null){ > + strat(); > + } > + AxisConfiguration axisConfig = configContext.getAxisConfiguration(); > AxisService service = AxisService.createService(serviceClassName,axisConfig); > axisConfig.addService(service); > - if(!started && startOnDeploy){ > - start(); > - } > } > > - /** > - * Stop the server, automatically terminates the listener manager as well. > - * @throws AxisFault > - */ > public void stop() throws AxisFault{ > if(configContext!=null){ > configContext.terminate(); > } > } > > - /** > - * Creates a default configuration context if one is not set already via setConfigurationContext > - * > - * @return > - * @throws AxisFault > - */ > - public ConfigurationContext getConfigurationContext() throws AxisFault { > - if(configContext == null){ > - configContext = createDefaultConfigurationContext(); > - } > + > + public ConfigurationContext getConfigContext() { > return configContext; > } > > - /** > - * Set the configuration context. Please call this before you call deployService or start method > - * > - * @param configContext > - */ > - public void setConfigurationContext(ConfigurationContext configContext) { > + public void setConfigContext(ConfigurationContext configContext) { > this.configContext = configContext; > } > } > > Modified: webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/SimpleAxis2Server.java > URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/SimpleAxis2Server.java?view=diff&rev=547870&r1=547869&r2=547870 > ============================================================================== > --- webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/SimpleAxis2Server.java (original) > +++ webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/SimpleAxis2Server.java Fri Jun 15 22:42:03 2007 > @@ -19,12 +19,10 @@ > import org.apache.axis2.context.ConfigurationContext; > import org.apache.axis2.context.ConfigurationContextFactory; > import org.apache.axis2.engine.ListenerManager; > -import org.apache.axis2.engine.AxisServer; > import org.apache.axis2.transport.http.SimpleHTTPServer; > import org.apache.axis2.util.CommandLineOption; > import org.apache.axis2.util.CommandLineOptionParser; > import org.apache.axis2.util.OptionsValidator; > -import org.apache.axis2.AxisFault; > import org.apache.commons.logging.Log; > import org.apache.commons.logging.LogFactory; > > @@ -32,7 +30,7 @@ > import java.util.List; > import java.util.Map; > > -public class SimpleAxis2Server extends AxisServer { > +public class SimpleAxis2Server { > > private static final Log log = LogFactory.getLog(SimpleHTTPServer.class); > > @@ -40,14 +38,6 @@ > > public static int DEFAULT_PORT = 8080; > > - public SimpleAxis2Server ( > - String repoLocation, > - String confLocation) throws Exception { > - super(false); > - configContext = ConfigurationContextFactory > - .createConfigurationContextFromFileSystem(repoLocation, > - confLocation); > - } > > /** > * @param args > @@ -92,8 +82,12 @@ > } > > try { > - SimpleAxis2Server server = new SimpleAxis2Server(repoLocation, confLocation); > - server.start(); > + ConfigurationContext configctx = ConfigurationContextFactory > + .createConfigurationContextFromFileSystem(repoLocation, > + confLocation); > + ListenerManager listenerManager = new ListenerManager(); > + listenerManager.init(configctx); > + listenerManager.start(); > log.info("[SimpleAxisServer] Started"); > } catch (Throwable t) { > log.fatal("[SimpleAxisServer] Shutting down. Error starting SimpleAxisServer", t); > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: axis-cvs-unsubscribe@ws.apache.org > For additional commands, e-mail: axis-cvs-help@ws.apache.org > > -- Davanum Srinivas :: http://davanum.wordpress.com --------------------------------------------------------------------- To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org For additional commands, e-mail: axis-dev-help@ws.apache.org