axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dee...@apache.org
Subject svn commit: r438358 - in /webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2: deployment/ServiceBuilder.java engine/DependencyManager.java engine/Service.java
Date Wed, 30 Aug 2006 04:40:20 GMT
Author: deepal
Date: Tue Aug 29 21:40:20 2006
New Revision: 438358

URL: http://svn.apache.org/viewvc?rev=438358&view=rev
Log:
- change the method signature of startup method in service impl class
- fixing AXIS2-743
   - if the service name attribute is there , then the name of the service will be the name
specified by name attribute , else it will be name of the service archive file

Modified:
    webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/deployment/ServiceBuilder.java
    webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/engine/DependencyManager.java
    webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/engine/Service.java

Modified: webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/deployment/ServiceBuilder.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/deployment/ServiceBuilder.java?rev=438358&r1=438357&r2=438358&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/deployment/ServiceBuilder.java
(original)
+++ webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/deployment/ServiceBuilder.java
Tue Aug 29 21:40:20 2006
@@ -83,10 +83,18 @@
                 OMAttribute serviceNameatt = service_element.getAttribute(new QName(ATTRIBUTE_NAME));
 
                 if (serviceNameatt != null) {
-                    service.setName(serviceNameatt.getAttributeValue());
+                    if (!"".equals(serviceNameatt.getAttributeValue().trim())) {
+                        service.setServiceDescription(serviceNameatt.getAttributeValue());
+                    }
                 }
             }
+            OMAttribute serviceNameatt = service_element.getAttribute(new QName(ATTRIBUTE_NAME));
 
+            if (serviceNameatt != null) {
+                if (!"".equals(serviceNameatt.getAttributeValue().trim())) {
+                    service.setServiceDescription(serviceNameatt.getAttributeValue());
+                }
+            }
             // Process WS-Addressing flag attribute
             OMAttribute addressingRequiredatt = service_element.getAttribute(new QName(ATTRIBUTE_WSADDRESSING));
             if (addressingRequiredatt != null) {

Modified: webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/engine/DependencyManager.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/engine/DependencyManager.java?rev=438358&r1=438357&r2=438358&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/engine/DependencyManager.java
(original)
+++ webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/engine/DependencyManager.java
Tue Aug 29 21:40:20 2006
@@ -155,14 +155,19 @@
                 Class implClass = Class.forName(((String) implInfoParam.getValue()).trim(),
true,
                         classLoader);
                 Object serviceImpl = implClass.newInstance();
-                Method[] methods = serviceImpl.getClass().getMethods();
-
-                for (int i = 0; i < methods.length; i++) {
-                    if (SERVICE_START_METHOD.equals(methods[i].getName())
-                            && (methods[i].getParameterTypes().length == 1)
-                            && (methods[i].getParameterTypes()[0] == ConfigurationContext.class))
{
-                        methods[i].invoke(serviceImpl, new Object[]{configCtx});
-                        break;
+                if (serviceImpl instanceof Service) {
+                    org.apache.axis2.engine.Service service = (Service) serviceImpl;
+                    service.startUp(configCtx, axisService);
+                } else {
+                    Method[] methods = serviceImpl.getClass().getMethods();
+                    for (int i = 0; i < methods.length; i++) {
+                        if (SERVICE_START_METHOD.equals(methods[i].getName())
+                                && (methods[i].getParameterTypes().length == 1)
+                                && (methods[i].getParameterTypes()[0] == ConfigurationContext.class)
+                                && (methods[i].getParameterTypes()[1] == AxisService.class))
{
+                            methods[i].invoke(serviceImpl, new Object[]{configCtx, axisService});
+                            break;
+                        }
                     }
                 }
             } catch (Exception e) {

Modified: webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/engine/Service.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/engine/Service.java?rev=438358&r1=438357&r2=438358&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/engine/Service.java (original)
+++ webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/engine/Service.java Tue
Aug 29 21:40:20 2006
@@ -17,14 +17,22 @@
 
 package org.apache.axis2.engine;
 
+import org.apache.axis2.context.ConfigurationContext;
 import org.apache.axis2.context.OperationContext;
 import org.apache.axis2.context.ServiceContext;
+import org.apache.axis2.description.AxisService;
 
 /**
  * This class *may* be implemented by any service which require some information from Axis2
engine,
  * but its not a must.
  */
 public interface Service {
+
+    /**
+     * this will be called during the deployement time of the service. irrespective
+     * of the service scope this method will be called
+     */
+    public void startUp(ConfigurationContext configctx, AxisService service);
 
     /**
      * this will be called during the initialization of the service. If the service is in
the application scope, then this



---------------------------------------------------------------------
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