Return-Path: Delivered-To: apmail-ws-axis-dev-archive@www.apache.org Received: (qmail 93484 invoked from network); 22 Mar 2006 17:37:38 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 22 Mar 2006 17:37:37 -0000 Received: (qmail 24169 invoked by uid 500); 22 Mar 2006 17:37:35 -0000 Delivered-To: apmail-ws-axis-dev-archive@ws.apache.org Received: (qmail 24099 invoked by uid 500); 22 Mar 2006 17:37:35 -0000 Mailing-List: contact axis-cvs-help@ws.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: List-Id: Delivered-To: mailing list axis-cvs@ws.apache.org Received: (qmail 24088 invoked by uid 500); 22 Mar 2006 17:37:35 -0000 Delivered-To: apmail-ws-axis2-cvs@ws.apache.org Received: (qmail 24085 invoked by uid 99); 22 Mar 2006 17:37:35 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 22 Mar 2006 09:37:35 -0800 X-ASF-Spam-Status: No, hits=-8.2 required=10.0 tests=ALL_TRUSTED,NO_REAL_NAME,WEIRD_QUOTING X-Spam-Check-By: apache.org Received: from [209.237.227.194] (HELO minotaur.apache.org) (209.237.227.194) by apache.org (qpsmtpd/0.29) with SMTP; Wed, 22 Mar 2006 09:37:34 -0800 Received: (qmail 93191 invoked by uid 65534); 22 Mar 2006 17:37:13 -0000 Message-ID: <20060322173713.93190.qmail@minotaur.apache.org> Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r387900 - in /webservices/axis2/trunk/java/modules: core/src/org/apache/axis2/deployment/ core/src/org/apache/axis2/transport/http/ core/src/org/apache/axis2/transport/tcp/ samples/ samples/src/sample/sgccalculator/ tool/script/ Date: Wed, 22 Mar 2006 17:37:12 -0000 To: axis2-cvs@ws.apache.org From: deepal@apache.org X-Mailer: svnmailer-1.0.7 X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Author: deepal Date: Wed Mar 22 09:37:09 2006 New Revision: 387900 URL: http://svn.apache.org/viewcvs?rev=387900&view=rev Log: -fixing TCPServer problem -Fixing Service group sample -fixing bugs in DeploymentEngine.java -fixed tcp-server.bat Modified: webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/deployment/DeploymentEngine.java webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/transport/http/AxisServlet.java webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/transport/tcp/TCPServer.java webservices/axis2/trunk/java/modules/samples/maven.xml webservices/axis2/trunk/java/modules/samples/src/sample/sgccalculator/CalcClient.java webservices/axis2/trunk/java/modules/tool/script/tcp-server.bat Modified: webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/deployment/DeploymentEngine.java URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/deployment/DeploymentEngine.java?rev=387900&r1=387899&r2=387900&view=diff ============================================================================== --- webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/deployment/DeploymentEngine.java (original) +++ webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/deployment/DeploymentEngine.java Wed Mar 22 09:37:09 2006 @@ -27,12 +27,7 @@ import org.apache.axis2.deployment.scheduler.SchedulerTask; import org.apache.axis2.deployment.util.PhasesInfo; import org.apache.axis2.deployment.util.Utils; -import org.apache.axis2.description.AxisModule; -import org.apache.axis2.description.AxisOperation; -import org.apache.axis2.description.AxisService; -import org.apache.axis2.description.AxisServiceGroup; -import org.apache.axis2.description.Flow; -import org.apache.axis2.description.Parameter; +import org.apache.axis2.description.*; import org.apache.axis2.engine.AxisConfiguration; import org.apache.axis2.engine.Phase; import org.apache.axis2.i18n.Messages; @@ -42,14 +37,7 @@ import javax.xml.namespace.QName; import javax.xml.stream.XMLStreamException; -import java.io.File; -import java.io.FileInputStream; -import java.io.FileNotFoundException; -import java.io.FileOutputStream; -import java.io.IOException; -import java.io.InputStream; -import java.io.PrintWriter; -import java.io.StringWriter; +import java.io.*; import java.util.ArrayList; import java.util.HashMap; import java.util.Iterator; @@ -99,12 +87,28 @@ public DeploymentEngine(String repositoryName, String xmlFile) throws DeploymentException { + if ((repositoryName == null || "".equals(repositoryName.trim())) && (xmlFile == null || "".equals(xmlFile.trim()))) { String axis2_home = System.getProperty(Constants.AXIS2_HOME); - if (axis2_home != null && !"".equals("")) { - useDefault = false; - axis2repository = axis2_home; + if (axis2_home != null && !"".equals(axis2_home)) { + File axisRepo = new File(axis2_home); + if (!axisRepo.exists()) { + throw new DeploymentException( + Messages.getMessage("cannotfindrepo", axis2repository)); + } + File axis2conf = new File(axisRepo, "conf"); + if (axis2conf.exists()) { + File axis2xml = new File(axis2conf, "axis2.xml"); + if (!axis2xml.exists()) { + useDefault = true; + } else { + useDefault = false; + } + } else { + useDefault = true; + axis2repository = axis2_home; + } } else { useDefault = true; axis2repository = null; @@ -311,8 +315,9 @@ * called the init method since there is no refernce to configuration context * so who ever create module usieng this has to called module.init if it is * required - * @param modulearchive : Actual module archive file - * @param config : AxisConfiguration : for get classs loders etc.. + * + * @param modulearchive : Actual module archive file + * @param config : AxisConfiguration : for get classs loders etc.. * @return * @throws DeploymentException */ @@ -564,14 +569,14 @@ } return axisConfig; } else { - InputStream in=null; + InputStream in = null; try { in = new FileInputStream(axis2_xml_file_name); populateAxisConfiguration(in); } catch (FileNotFoundException e) { throw new DeploymentException(e); } finally { - if (in!=null) { + if (in != null) { try { in.close(); } catch (IOException e) { Modified: webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/transport/http/AxisServlet.java URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/transport/http/AxisServlet.java?rev=387900&r1=387899&r2=387900&view=diff ============================================================================== --- webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/transport/http/AxisServlet.java (original) +++ webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/transport/http/AxisServlet.java Wed Mar 22 09:37:09 2006 @@ -55,8 +55,8 @@ private static final long serialVersionUID = -2085869393709833372L; public static final String CONFIGURATION_CONTEXT = "CONFIGURATION_CONTEXT"; public static final String SESSION_ID = "SessionId"; - protected ConfigurationContext configContext; - protected AxisConfiguration axisConfiguration; + protected transient ConfigurationContext configContext; + protected transient AxisConfiguration axisConfiguration; protected ListingAgent lister; protected MessageContext createAndSetInitialParamsToMsgCtxt(Object sessionContext, Modified: webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/transport/tcp/TCPServer.java URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/transport/tcp/TCPServer.java?rev=387900&r1=387899&r2=387900&view=diff ============================================================================== --- webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/transport/tcp/TCPServer.java (original) +++ webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/transport/tcp/TCPServer.java Wed Mar 22 09:37:09 2006 @@ -109,6 +109,7 @@ System.out.println("[Axis2] Using the Repository " + repository.getAbsolutePath()); System.out.println("[Axis2] Starting the TCP Server on port " + args[1]); tcpServer.start(); + Runtime.getRuntime().addShutdownHook(new Thread(tcpServer)); } } Modified: webservices/axis2/trunk/java/modules/samples/maven.xml URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/samples/maven.xml?rev=387900&r1=387899&r2=387900&view=diff ============================================================================== --- webservices/axis2/trunk/java/modules/samples/maven.xml (original) +++ webservices/axis2/trunk/java/modules/samples/maven.xml Wed Mar 22 09:37:09 2006 @@ -325,7 +325,7 @@ - + @@ -333,6 +333,15 @@ + + + + + + + + +