axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Deepal Jayasinghe <dee...@opensource.lk>
Subject Re: svn commit: r547859 - in /webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2: engine/AxisServer.java transport/SimpleAxis2Server.java
Date Sat, 16 Jun 2007 04:32:37 GMT
hmm , what is the use of deploying a service to a server which is not
running ?

For me it is so obvious deploying service mean deploy the service to a
running system.


-Deepal

dims@apache.org wrote:
> Author: dims
> Date: Fri Jun 15 21:28:51 2007
> New Revision: 547859
>
> URL: http://svn.apache.org/viewvc?view=rev&rev=547859
> Log:
> add a parameter in the constructor for the user to take a decision on whether deploying
a service should start the server
>
> 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=547859&r1=547858&r2=547859
> ==============================================================================
> --- 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 21:28:51 2007
> @@ -31,10 +31,22 @@
>  
>      protected ConfigurationContext configContext;
>      protected ListenerManager listenerManager;
> +    private boolean startOnDeploy;
> +    private boolean started = false;
>  
> -    public AxisServer() throws Exception {
> +    /**
> +     * @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);
>      }
> @@ -47,6 +59,7 @@
>      public void start()throws AxisFault {
>          listenerManager = new ListenerManager();
>          listenerManager.startSystem(getConfigurationContext());
> +        started = true;
>      }
>  
>      /**
> @@ -58,8 +71,15 @@
>          AxisConfiguration axisConfig = getConfigurationContext().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();
>
> 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=547859&r1=547858&r2=547859
> ==============================================================================
> --- 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 21:28:51 2007
> @@ -43,9 +43,10 @@
>      public SimpleAxis2Server (
>              String repoLocation,
>              String confLocation) throws Exception {
> -       configContext = ConfigurationContextFactory
> -                    .createConfigurationContextFromFileSystem(repoLocation,
> -                                                              confLocation);
> +        super(false);
> +        configContext = ConfigurationContextFactory
> +                .createConfigurationContextFromFileSystem(repoLocation,
> +                        confLocation);
>      }
>  
>      /**
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-cvs-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-cvs-help@ws.apache.org
>
>
>
>   

-- 
Thanks,
Deepal
................................................................
"The highest tower is built one brick at a time"



---------------------------------------------------------------------
To unsubscribe, e-mail: axis-cvs-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-cvs-help@ws.apache.org


Mime
View raw message