Return-Path: Delivered-To: apmail-ws-axis-dev-archive@www.apache.org Received: (qmail 30966 invoked from network); 28 May 2009 11:36:26 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 28 May 2009 11:36:26 -0000 Received: (qmail 91371 invoked by uid 500); 28 May 2009 11:36:37 -0000 Delivered-To: apmail-ws-axis-dev-archive@ws.apache.org Received: (qmail 91292 invoked by uid 500); 28 May 2009 11:36:37 -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 91283 invoked by uid 99); 28 May 2009 11:36:37 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 28 May 2009 11:36:37 +0000 X-ASF-Spam-Status: No, hits=2.2 required=10.0 tests=HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of amilasuriarachchi@gmail.com designates 209.85.221.131 as permitted sender) Received: from [209.85.221.131] (HELO mail-qy0-f131.google.com) (209.85.221.131) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 28 May 2009 11:36:29 +0000 Received: by qyk37 with SMTP id 37so1586383qyk.30 for ; Thu, 28 May 2009 04:36:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:content-type; bh=IDyUg+L5rJxdJiJjTCYQRXwpUKoSnkzKepCI6RQJTbA=; b=HU1cSI0cnAYr+DHAmPNC4ds5KUJJt7FWN7152bWoV5/er35NFX/D0icknElfZgn7/Y /O6x4RoBkpNtz1c0hh6dWrJlU/hb2CieWr8rOWja0NJLt1yUQsQll7H+7KK/aBj0n6FZ IEYZ/MxxoQ/gmJ1U7+LTAISAfG5NRX+WD6D+4= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; b=rjkv8lvX2wJVLG99IplP8d5h8LzJZu2wZgbug+H7Ro9cdg8JprfwqwRdRJ80Ley9Ny WRFVqH/MIyYfa4mSEEqtU29CoRTQRuyqAuhCk4pkC/WbreOx8czu6symtVfgP6lQCMqS eEzhzJ0Gbsen8gf9trCYeWKQuJ0hhrs/k3dwE= MIME-Version: 1.0 Received: by 10.229.110.13 with SMTP id l13mr617507qcp.4.1243510568065; Thu, 28 May 2009 04:36:08 -0700 (PDT) In-Reply-To: References: <20090528093156.7F2B92388897@eris.apache.org> Date: Thu, 28 May 2009 17:06:07 +0530 Message-ID: <60708f4b0905280436l743effbcvb850793fe52fee5b@mail.gmail.com> Subject: Re: svn commit: r779507 - in /webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2: description/AxisDescription.java description/AxisServiceGroup.java engine/AxisConfiguration.java engine/AxisEvent.java From: Amila Suriarachchi To: axis-dev@ws.apache.org Content-Type: multipart/alternative; boundary=0016364eef70af1bfb046af75dd0 X-Virus-Checked: Checked by ClamAV on apache.org --0016364eef70af1bfb046af75dd0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit On Thu, May 28, 2009 at 4:30 PM, Andreas Veithen wrote: > -1 for this change. Reasons: > > * If you generate the Javadoc from this code, there is ZERO > documentation for it. > * As discussed previously, it is ugly and not generic enough. Could you please attach a patch for the better way you suggest? then we can compare the two and go the the best one. thanks, Amila. > > * There are at least two better solutions: add a specific method to > AxisObserver or add a completely new type of event listener. > Personally, I favor the second solution. > > Andreas > > On Thu, May 28, 2009 at 11:31, wrote: > > Author: amilas > > Date: Thu May 28 09:31:54 2009 > > New Revision: 779507 > > > > URL: http://svn.apache.org/viewvc?rev=779507&view=rev > > Log: > > applied the patch for AXIS2-4347 > > > > Modified: > > > webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/description/AxisDescription.java > > > webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/description/AxisServiceGroup.java > > > webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/engine/AxisConfiguration.java > > > webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/engine/AxisEvent.java > > > > Modified: > webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/description/AxisDescription.java > > URL: > http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/description/AxisDescription.java?rev=779507&r1=779506&r2=779507&view=diff > > > ============================================================================== > > --- > webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/description/AxisDescription.java > (original) > > +++ > webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/description/AxisDescription.java > Thu May 28 09:31:54 2009 > > @@ -27,6 +27,7 @@ > > import org.apache.axis2.AxisFault; > > import org.apache.axis2.Constants; > > import org.apache.axis2.engine.AxisConfiguration; > > +import org.apache.axis2.engine.AxisEvent; > > import org.apache.axis2.i18n.Messages; > > import org.apache.axis2.modules.Module; > > import org.apache.axis2.util.JavaUtils; > > @@ -436,6 +437,8 @@ > > */ > > public void engageModule(AxisModule axisModule) throws AxisFault { > > engageModule(axisModule, this); > > + AxisConfiguration config = getAxisConfiguration(); > > + config.notifyObservers(new AxisEvent(AxisEvent.MODULE_ENGAGED , > this) , axisModule); > > } > > > > /** > > @@ -513,6 +516,11 @@ > > if (isEngaged(module)) { > > onDisengage(module); > > engagedModules.remove(module.getArchiveName()); > > + /** > > + * if a Disengaged module belogs to an AxisService or an > Operation > > + * notify with a serviceUpdate > > + */ > > + getAxisConfiguration().notifyObservers(new > AxisEvent(AxisEvent.MODULE_DISENGAGED, this), module); > > } > > } > > > > > > Modified: > webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/description/AxisServiceGroup.java > > URL: > http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/description/AxisServiceGroup.java?rev=779507&r1=779506&r2=779507&view=diff > > > ============================================================================== > > --- > webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/description/AxisServiceGroup.java > (original) > > +++ > webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/description/AxisServiceGroup.java > Thu May 28 09:31:54 2009 > > @@ -146,7 +146,8 @@ > > AxisService service = getService(name); > > > > if (service != null) { > > - > getAxisConfiguration().notifyObservers(AxisEvent.SERVICE_REMOVE, service); > > + getAxisConfiguration().notifyObservers(new > AxisEvent(AxisEvent.SERVICE_REMOVE,service), > > + service); > > } > > > > removeChild(name); > > > > Modified: > webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/engine/AxisConfiguration.java > > URL: > http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/engine/AxisConfiguration.java?rev=779507&r1=779506&r2=779507&view=diff > > > ============================================================================== > > --- > webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/engine/AxisConfiguration.java > (original) > > +++ > webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/engine/AxisConfiguration.java > Thu May 28 09:31:54 2009 > > @@ -247,7 +247,7 @@ > > } > > > > allModules.put(module.getArchiveName(), module); > > - notifyObservers(AxisEvent.MODULE_DEPLOY, module); > > + notifyObservers(new AxisEvent(AxisEvent.MODULE_DEPLOY,null), > module); > > > > // Registering the policy namespaces that the module understand > > registerModulePolicySupport(module); > > @@ -332,7 +332,7 @@ > > public synchronized void addServiceGroup(AxisServiceGroup > axisServiceGroup) > > throws AxisFault { > > axisServiceGroup.setParent(this); > > - notifyObservers(AxisEvent.SERVICE_DEPLOY, axisServiceGroup); > > + notifyObservers(new AxisEvent(AxisEvent.SERVICE_DEPLOY, > axisServiceGroup), axisServiceGroup); > > AxisService axisService; > > > > Iterator services = axisServiceGroup.getServices(); > > @@ -395,7 +395,7 @@ > > } > > > > if (!axisService.isClientSide()) { > > - notifyObservers(AxisEvent.SERVICE_DEPLOY, axisService); > > + notifyObservers(new AxisEvent(AxisEvent.SERVICE_DEPLOY > ,axisService ), axisService); > > } > > } > > // serviceGroups.put(axisServiceGroup.getServiceGroupName(), > > @@ -440,7 +440,7 @@ > > AxisService axisService = services.next(); > > allServices.remove(axisService.getName()); > > if (!axisService.isClientSide()) { > > - notifyObservers(AxisEvent.SERVICE_REMOVE, axisService); > > + notifyObservers(new AxisEvent(AxisEvent.SERVICE_REMOVE , > axisService), axisService); > > } else { > > isClientSide = true; > > } > > @@ -457,7 +457,7 @@ > > } > > removeChild(serviceGroupName); > > if (!isClientSide) { > > - notifyObservers(AxisEvent.SERVICE_REMOVE, axisServiceGroup); > > + notifyObservers(new AxisEvent(AxisEvent.SERVICE_REMOVE, > axisServiceGroup), axisServiceGroup); > > } > > > > return axisServiceGroup; > > @@ -570,12 +570,10 @@ > > } > > } > > > > - public void notifyObservers(int event_type, AxisService service) { > > + public void notifyObservers(AxisEvent event, AxisService service) { > > if (service.isClientSide()) > > return; > > > > - AxisEvent event = new AxisEvent(event_type); > > - > > for (AxisObserver observer : observersList) { > > try { > > observer.serviceUpdate(event, service); > > @@ -586,8 +584,7 @@ > > } > > } > > > > - public void notifyObservers(int event_type, AxisModule moule) { > > - AxisEvent event = new AxisEvent(event_type); > > + public void notifyObservers(AxisEvent event, AxisModule moule) { > > > > for (AxisObserver anObserversList : observersList) { > > > > @@ -600,8 +597,7 @@ > > } > > } > > > > - public void notifyObservers(int event_type, AxisServiceGroup > serviceGroup) { > > - AxisEvent event = new AxisEvent(event_type); > > + public void notifyObservers(AxisEvent event, AxisServiceGroup > serviceGroup) { > > > > for (AxisObserver anObserversList : observersList) { > > > > @@ -1143,7 +1139,7 @@ > > serviceName)); > > } > > service.setActive(false); > > - notifyObservers(AxisEvent.SERVICE_STOP, service); > > + notifyObservers(new AxisEvent(AxisEvent.SERVICE_STOP , service), > service); > > } > > > > public void startService(String serviceName) throws AxisFault { > > @@ -1153,7 +1149,7 @@ > > serviceName)); > > } > > service.setActive(true); > > - notifyObservers(AxisEvent.SERVICE_START, service); > > + notifyObservers(new AxisEvent(AxisEvent.SERVICE_START , > service), service); > > } > > > > public List getModulesForPolicyNamesapce(String > namesapce) { > > > > Modified: > webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/engine/AxisEvent.java > > URL: > http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/engine/AxisEvent.java?rev=779507&r1=779506&r2=779507&view=diff > > > ============================================================================== > > --- > webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/engine/AxisEvent.java > (original) > > +++ > webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/engine/AxisEvent.java > Thu May 28 09:31:54 2009 > > @@ -20,6 +20,8 @@ > > > > package org.apache.axis2.engine; > > > > +import org.apache.axis2.description.AxisDescription; > > + > > public class AxisEvent { > > > > /** > > @@ -32,14 +34,30 @@ > > public static final int SERVICE_START = 3; > > public static final int MODULE_DEPLOY = 4; > > public static final int MODULE_REMOVE = 5; > > + public static final int MODULE_ENGAGED = 6; > > + public static final int MODULE_DISENGAGED = 7; > > + > > + /** > > + * hold a reference to the AxisDiscription > > + * that the AxisEvent must carry ot the Observer > > + * this referrece can be null of not needed > > + */ > > + private AxisDescription axisDiscription; > > + > > private int EVENT_TYPE; > > > > - public AxisEvent(int EVENT_TYPE) { > > + public AxisEvent(int EVENT_TYPE , AxisDescription axisDescription) { > > this.EVENT_TYPE = EVENT_TYPE; > > + this.axisDiscription = axisDiscription; > > + > > } > > > > public int getEventType() { > > return EVENT_TYPE; > > } > > + > > + public AxisDescription getAxisDiscription() { > > + return axisDiscription; > > + } > > > > } > > > > > > > -- Amila Suriarachchi WSO2 Inc. blog: http://amilachinthaka.blogspot.com/ --0016364eef70af1bfb046af75dd0 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable

On Thu, May 28, 2009 at 4:30 PM, Andreas= Veithen <andreas.veithen@gmail.com> wrote:
-1 for this change. Reasons:

* If you generate the Javadoc from this code, there is ZERO
documentation for it.
* As discussed previously, it is ugly and not generic enough.
<= div>Could you please attach a patch for the better way you suggest?

= then we can compare the two and go the the best one.

thanks,
Amila.
=
* There are at least two better solutions: add a specific method to
AxisObserver or add a completely new type of event listener.
Personally, I favor the second solution.

Andreas

On Thu, May 28, 2009 at 11:31, =A0<= amilas@apache.org> wrote:
> Author: amilas
> Date: Thu May 28 09:31:54 2009
> New Revision: 779507
>
> URL: http://svn.apache.org/viewvc?rev=3D779507&view=3D= rev
> Log:
> applied the patch for AXIS2-4347
>
> Modified:
> =A0 =A0webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis= 2/description/AxisDescription.java
> =A0 =A0webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis= 2/description/AxisServiceGroup.java
> =A0 =A0webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis= 2/engine/AxisConfiguration.java
> =A0 =A0webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis= 2/engine/AxisEvent.java
>
> Modified: webservices/axis2/trunk/java/modules/kernel/src/org/apache/a= xis2/description/AxisDescription.java
> URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel= /src/org/apache/axis2/description/AxisDescription.java?rev=3D779507&r1= =3D779506&r2=3D779507&view=3Ddiff
> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D
> --- webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/d= escription/AxisDescription.java (original)
> +++ webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/d= escription/AxisDescription.java Thu May 28 09:31:54 2009
> @@ -27,6 +27,7 @@
> =A0import org.apache.axis2.AxisFault;
> =A0import org.apache.axis2.Constants;
> =A0import org.apache.axis2.engine.AxisConfiguration;
> +import org.apache.axis2.engine.AxisEvent;
> =A0import org.apache.axis2.i18n.Messages;
> =A0import org.apache.axis2.modules.Module;
> =A0import org.apache.axis2.util.JavaUtils;
> @@ -436,6 +437,8 @@
> =A0 =A0 =A0*/
> =A0 =A0 public void engageModule(AxisModule axisModule) throws AxisFau= lt {
> =A0 =A0 =A0 =A0 engageModule(axisModule, this);
> + =A0 =A0 =A0 =A0AxisConfiguration config =3D getAxisConfiguration();<= br> > + =A0 =A0 =A0 =A0config.notifyObservers(new AxisEvent(AxisEvent.MODULE= _ENGAGED , this) , axisModule);
> =A0 =A0 }
>
> =A0 =A0 /**
> @@ -513,6 +516,11 @@
> =A0 =A0 =A0 =A0 if (isEngaged(module)) {
> =A0 =A0 =A0 =A0 =A0 =A0 onDisengage(module);
> =A0 =A0 =A0 =A0 =A0 =A0 engagedModules.remove(module.getArchiveName())= ;
> + =A0 =A0 =A0 =A0 =A0 =A0/**
> + =A0 =A0 =A0 =A0 =A0 =A0 * if a Disengaged module belogs to an AxisSe= rvice or an Operation
> + =A0 =A0 =A0 =A0 =A0 =A0 * notify with a serviceUpdate
> + =A0 =A0 =A0 =A0 =A0 =A0 */
> + =A0 =A0 =A0 =A0 =A0 =A0getAxisConfiguration().notifyObservers(new Ax= isEvent(AxisEvent.MODULE_DISENGAGED, this), module);
> =A0 =A0 =A0 =A0 }
> =A0 =A0 }
>
>
> Modified: webservices/axis2/trunk/java/modules/kernel/src/org/apache/a= xis2/description/AxisServiceGroup.java
> URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kerne= l/src/org/apache/axis2/description/AxisServiceGroup.java?rev=3D779507&r= 1=3D779506&r2=3D779507&view=3Ddiff
> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D
> --- webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/d= escription/AxisServiceGroup.java (original)
> +++ webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/d= escription/AxisServiceGroup.java Thu May 28 09:31:54 2009
> @@ -146,7 +146,8 @@
> =A0 =A0 =A0 =A0 AxisService service =3D getService(name);
>
> =A0 =A0 =A0 =A0 if (service !=3D null) {
> - =A0 =A0 =A0 =A0 =A0 =A0getAxisConfiguration().notifyObservers(AxisEv= ent.SERVICE_REMOVE, service);
> + =A0 =A0 =A0 =A0 =A0 =A0getAxisConfiguration().notifyObservers(new Ax= isEvent(AxisEvent.SERVICE_REMOVE,service),
> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0service);
> =A0 =A0 =A0 =A0 }
>
> =A0 =A0 =A0 =A0 removeChild(name);
>
> Modified: webservices/axis2/trunk/java/modules/kernel/src/org/apache/a= xis2/engine/AxisConfiguration.java
> URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/= src/org/apache/axis2/engine/AxisConfiguration.java?rev=3D779507&r1=3D77= 9506&r2=3D779507&view=3Ddiff
> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D
> --- webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/e= ngine/AxisConfiguration.java (original)
> +++ webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/e= ngine/AxisConfiguration.java Thu May 28 09:31:54 2009
> @@ -247,7 +247,7 @@
> =A0 =A0 =A0 =A0 }
>
> =A0 =A0 =A0 =A0 allModules.put(module.getArchiveName(), module);
> - =A0 =A0 =A0 =A0notifyObservers(AxisEvent.MODULE_DEPLOY, module);
> + =A0 =A0 =A0 =A0notifyObservers(new AxisEvent(AxisEvent.MODULE_DEPLOY= ,null), module);
>
> =A0 =A0 =A0 =A0 // Registering the policy namespaces that the module u= nderstand
> =A0 =A0 =A0 =A0 registerModulePolicySupport(module);
> @@ -332,7 +332,7 @@
> =A0 =A0 public synchronized void addServiceGroup(AxisServiceGroup axis= ServiceGroup)
> =A0 =A0 =A0 =A0 =A0 =A0 throws AxisFault {
> =A0 =A0 =A0 =A0 axisServiceGroup.setParent(this);
> - =A0 =A0 =A0 =A0notifyObservers(AxisEvent.SERVICE_DEPLOY, axisService= Group);
> + =A0 =A0 =A0 =A0notifyObservers(new AxisEvent(AxisEvent.SERVICE_DEPLO= Y, axisServiceGroup), axisServiceGroup);
> =A0 =A0 =A0 =A0 AxisService axisService;
>
> =A0 =A0 =A0 =A0 Iterator<AxisService> services =3D axisServiceGr= oup.getServices();
> @@ -395,7 +395,7 @@
> =A0 =A0 =A0 =A0 =A0 =A0 }
>
> =A0 =A0 =A0 =A0 =A0 =A0 if (!axisService.isClientSide()) {
> - =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0notifyObservers(AxisEvent.SERVICE_DEP= LOY, axisService);
> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0notifyObservers(new AxisEvent(AxisEve= nt.SERVICE_DEPLOY ,axisService ), axisService);
> =A0 =A0 =A0 =A0 =A0 =A0 }
> =A0 =A0 =A0 =A0 }
> =A0 =A0 =A0 =A0 // serviceGroups.put(axisServiceGroup.getServiceGroupN= ame(),
> @@ -440,7 +440,7 @@
> =A0 =A0 =A0 =A0 =A0 =A0 AxisService axisService =3D services.next(); > =A0 =A0 =A0 =A0 =A0 =A0 allServices.remove(axisService.getName());
> =A0 =A0 =A0 =A0 =A0 =A0 if (!axisService.isClientSide()) {
> - =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0notifyObservers(AxisEvent.SERVICE_REM= OVE, axisService);
> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0notifyObservers(new AxisEvent(AxisEve= nt.SERVICE_REMOVE , axisService), axisService);
> =A0 =A0 =A0 =A0 =A0 =A0 } else {
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 isClientSide =3D true;
> =A0 =A0 =A0 =A0 =A0 =A0 }
> @@ -457,7 +457,7 @@
> =A0 =A0 =A0 =A0 }
> =A0 =A0 =A0 =A0 removeChild(serviceGroupName);
> =A0 =A0 =A0 =A0 if (!isClientSide) {
> - =A0 =A0 =A0 =A0 =A0 =A0notifyObservers(AxisEvent.SERVICE_REMOVE, axi= sServiceGroup);
> + =A0 =A0 =A0 =A0 =A0 =A0notifyObservers(new AxisEvent(AxisEvent.SERVI= CE_REMOVE, axisServiceGroup), axisServiceGroup);
> =A0 =A0 =A0 =A0 }
>
> =A0 =A0 =A0 =A0 return axisServiceGroup;
> @@ -570,12 +570,10 @@
> =A0 =A0 =A0 =A0 }
> =A0 =A0 }
>
> - =A0 =A0public void notifyObservers(int event_type, AxisService servi= ce) {
> + =A0 =A0public void notifyObservers(AxisEvent event, AxisService serv= ice) {
> =A0 =A0 =A0 =A0 if (service.isClientSide())
> =A0 =A0 =A0 =A0 =A0 =A0 return;
>
> - =A0 =A0 =A0 =A0AxisEvent event =3D new AxisEvent(event_type);
> -
> =A0 =A0 =A0 =A0 for (AxisObserver observer : observersList) {
> =A0 =A0 =A0 =A0 =A0 =A0 try {
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 observer.serviceUpdate(event, service)= ;
> @@ -586,8 +584,7 @@
> =A0 =A0 =A0 =A0 }
> =A0 =A0 }
>
> - =A0 =A0public void notifyObservers(int event_type, AxisModule moule)= {
> - =A0 =A0 =A0 =A0AxisEvent event =3D new AxisEvent(event_type);
> + =A0 =A0public void notifyObservers(AxisEvent event, AxisModule moule= ) {
>
> =A0 =A0 =A0 =A0 for (AxisObserver anObserversList : observersList) { >
> @@ -600,8 +597,7 @@
> =A0 =A0 =A0 =A0 }
> =A0 =A0 }
>
> - =A0 =A0public void notifyObservers(int event_type, AxisServiceGroup = serviceGroup) {
> - =A0 =A0 =A0 =A0AxisEvent event =3D new AxisEvent(event_type);
> + =A0 =A0public void notifyObservers(AxisEvent event, AxisServiceGroup= serviceGroup) {
>
> =A0 =A0 =A0 =A0 for (AxisObserver anObserversList : observersList) { >
> @@ -1143,7 +1139,7 @@
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 = =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 serviceName));
> =A0 =A0 =A0 =A0 }
> =A0 =A0 =A0 =A0 service.setActive(false);
> - =A0 =A0 =A0 =A0notifyObservers(AxisEvent.SERVICE_STOP, service);
> + =A0 =A0 =A0 =A0notifyObservers(new AxisEvent(AxisEvent.SERVICE_STOP = , service), service);
> =A0 =A0 }
>
> =A0 =A0 public void startService(String serviceName) throws AxisFault = {
> @@ -1153,7 +1149,7 @@
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 = =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 serviceName));
> =A0 =A0 =A0 =A0 }
> =A0 =A0 =A0 =A0 service.setActive(true);
> - =A0 =A0 =A0 =A0notifyObservers(AxisEvent.SERVICE_START, service); > + =A0 =A0 =A0 =A0notifyObservers(new AxisEvent(AxisEvent.SERVICE_START= , service), service);
> =A0 =A0 }
>
> =A0 =A0 public List<AxisModule> getModulesForPolicyNamesapce(Str= ing namesapce) {
>
> Modified: webservices/axis2/trunk/java/modules/kernel/src/org/apache/a= xis2/engine/AxisEvent.java
> URL: http://s= vn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/src/org/ap= ache/axis2/engine/AxisEvent.java?rev=3D779507&r1=3D779506&r2=3D7795= 07&view=3Ddiff
> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D
> --- webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/e= ngine/AxisEvent.java (original)
> +++ webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/e= ngine/AxisEvent.java Thu May 28 09:31:54 2009
> @@ -20,6 +20,8 @@
>
> =A0package org.apache.axis2.engine;
>
> +import org.apache.axis2.description.AxisDescription;
> +
> =A0public class AxisEvent {
>
> =A0 =A0 /**
> @@ -32,14 +34,30 @@
> =A0 =A0 public static final int SERVICE_START =3D 3;
> =A0 =A0 public static final int MODULE_DEPLOY =3D 4;
> =A0 =A0 public static final int MODULE_REMOVE =3D 5;
> + =A0 =A0public static final int MODULE_ENGAGED =3D 6;
> + =A0 =A0public static final int MODULE_DISENGAGED =3D 7;
> +
> + =A0 =A0/**
> + =A0 =A0 * hold a reference to the AxisDiscription
> + =A0 =A0 * that the AxisEvent must carry ot the Observer
> + =A0 =A0 * this referrece can be null of not needed
> + =A0 =A0 */
> + =A0 =A0private AxisDescription axisDiscription;
> +
> =A0 =A0 private int EVENT_TYPE;
>
> - =A0 =A0public AxisEvent(int EVENT_TYPE) {
> + =A0 =A0public AxisEvent(int EVENT_TYPE , AxisDescription axisDescrip= tion) {
> =A0 =A0 =A0 =A0 this.EVENT_TYPE =3D EVENT_TYPE;
> + =A0 =A0 =A0 =A0this.axisDiscription =3D axisDiscription;
> +
> =A0 =A0 }
>
> =A0 =A0 public int getEventType() {
> =A0 =A0 =A0 =A0 return EVENT_TYPE;
> =A0 =A0 }
> +
> + =A0 =A0public AxisDescription getAxisDiscription() {
> + =A0 =A0 =A0 return axisDiscription;
> + =A0 =A0}
>
> =A0}
>
>
>



--
Amila Suria= rachchi
WSO2 Inc.
blog: http://amilachinthaka.blogspot.com/
--0016364eef70af1bfb046af75dd0--