axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jayachan...@apache.org
Subject svn commit: r201603 - /webservices/axis/trunk/archive/java/scratch/ashu_jaya_venkat/JAX-WS2/javax/xml/rpc/ServiceFactory.java
Date Fri, 24 Jun 2005 12:25:34 GMT
Author: jayachandra
Date: Fri Jun 24 05:25:33 2005
New Revision: 201603

URL: http://svn.apache.org/viewcvs?rev=201603&view=rev
Log:
modified   ServiceFactory.java

Modified:
    webservices/axis/trunk/archive/java/scratch/ashu_jaya_venkat/JAX-WS2/javax/xml/rpc/ServiceFactory.java

Modified: webservices/axis/trunk/archive/java/scratch/ashu_jaya_venkat/JAX-WS2/javax/xml/rpc/ServiceFactory.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/archive/java/scratch/ashu_jaya_venkat/JAX-WS2/javax/xml/rpc/ServiceFactory.java?rev=201603&r1=201602&r2=201603&view=diff
==============================================================================
--- webservices/axis/trunk/archive/java/scratch/ashu_jaya_venkat/JAX-WS2/javax/xml/rpc/ServiceFactory.java
(original)
+++ webservices/axis/trunk/archive/java/scratch/ashu_jaya_venkat/JAX-WS2/javax/xml/rpc/ServiceFactory.java
Fri Jun 24 05:25:33 2005
@@ -29,7 +29,9 @@
 	/**
 	 * A constant representing the property used to lookup the name of a ServiceFactory implementation
class. 
 	 */
-	public static final java.lang.String SERVICEFACTORY_PROPERTY = null;
+	public static final java.lang.String SERVICEFACTORY_PROPERTY = "javax.xml.rpc.ServiceFactory";
+	
+	public static ServiceFactory serviceFactoryImpl = null;
 	
 	/**
 	 * Empty constructor
@@ -44,7 +46,34 @@
 	 * @throws ServiceException
 	 */
 	public static ServiceFactory newInstance() throws ServiceException {
-		return null;
+		
+		if (serviceFactoryImpl != null)
+			return serviceFactoryImpl;
+		
+		//<TBR>: Comment to be removed
+		//I must be returning the class set using the property 
+		//SERVICEFACTORY_PROPERTY. This class will be set at the
+		//configuration time(?), using configuration data viz. system props
+		//or XML/properites config files or user and system preference data
+		//</TBR>		
+		try {
+			String serviceFactoryImplName;
+			//<TBR>: Comment to be removed
+			// Here actually initialization of the name with the corresponding
+			// hashmap entry value of SERVICEFACTORY_PROPERTY key should happen 
+			// Since we didn't finalize the hash map for config information 
+			// we will use the default impl class
+			//</TBR>
+			serviceFactoryImplName = "org.apache.axis.jaxrpc.ServiceFactoryImpl";
+			Class loadedClass;
+			
+			loadedClass = Thread.currentThread().getContextClassLoader().loadClass(serviceFactoryImplName);
+			
+			serviceFactoryImpl = (ServiceFactory)loadedClass.newInstance();
+		} catch (Exception e) {
+			throw new ServiceException(e);
+		}
+		return serviceFactoryImpl;
 	}
 	
 	/**



Mime
View raw message