juddi-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ks...@apache.org
Subject svn commit: r823040 - in /webservices/juddi/trunk/juddi-console: subscription-listener/src/main/java/org/apache/juddi/test/ subscription-listener/src/main/resources/META-INF/ subscription-listener/src/main/webapp/WEB-INF/ uddi-portlets/src/main/java/or...
Date Thu, 08 Oct 2009 05:51:19 GMT
Author: kstam
Date: Thu Oct  8 05:51:18 2009
New Revision: 823040

URL: http://svn.apache.org/viewvc?rev=823040&view=rev
Log:
JUDDI-287 adding auto register/unregister annotations, clientConfig should not be static

Added:
    webservices/juddi/trunk/juddi-console/uddi-portlets/src/main/java/org/apache/juddi/portlets/server/service/Constants.java
Modified:
    webservices/juddi/trunk/juddi-console/subscription-listener/src/main/java/org/apache/juddi/test/HelloWorldImpl.java
    webservices/juddi/trunk/juddi-console/subscription-listener/src/main/resources/META-INF/uddi.xml
    webservices/juddi/trunk/juddi-console/subscription-listener/src/main/webapp/WEB-INF/web.xml
    webservices/juddi/trunk/juddi-console/uddi-portlets/src/main/java/org/apache/juddi/portlets/client/UDDISearch.java
    webservices/juddi/trunk/juddi-console/uddi-portlets/src/main/java/org/apache/juddi/portlets/server/service/FindServiceImpl.java
    webservices/juddi/trunk/juddi-console/uddi-portlets/src/main/java/org/apache/juddi/portlets/server/service/InquiryServiceImpl.java
    webservices/juddi/trunk/juddi-console/uddi-portlets/src/main/java/org/apache/juddi/portlets/server/service/JUDDIApiServiceImpl.java
    webservices/juddi/trunk/juddi-console/uddi-portlets/src/main/java/org/apache/juddi/portlets/server/service/PublicationServiceImpl.java
    webservices/juddi/trunk/juddi-console/uddi-portlets/src/main/java/org/apache/juddi/portlets/server/service/SecurityServiceImpl.java
    webservices/juddi/trunk/juddi-console/uddi-portlets/src/main/java/org/apache/juddi/portlets/server/service/SubscriptionServiceImpl.java
    webservices/juddi/trunk/juddi-console/uddi-portlets/src/main/resources/META-INF/uddi.xml

Modified: webservices/juddi/trunk/juddi-console/subscription-listener/src/main/java/org/apache/juddi/test/HelloWorldImpl.java
URL: http://svn.apache.org/viewvc/webservices/juddi/trunk/juddi-console/subscription-listener/src/main/java/org/apache/juddi/test/HelloWorldImpl.java?rev=823040&r1=823039&r2=823040&view=diff
==============================================================================
--- webservices/juddi/trunk/juddi-console/subscription-listener/src/main/java/org/apache/juddi/test/HelloWorldImpl.java
(original)
+++ webservices/juddi/trunk/juddi-console/subscription-listener/src/main/java/org/apache/juddi/test/HelloWorldImpl.java
Thu Oct  8 05:51:18 2009
@@ -15,7 +15,7 @@
 	    description="WSDL endpoint for the HelloWorld Service. This service is used for "
 				  + "testing the jUDDI annotation functionality",
 	    accessPointType="wsdlDeployment",
-	    accessPoint="http://${serverName}:${serverPort}/subscription-listener/helloworld")
+	    accessPoint="http://${serverName}:${serverPort}/subscription-listener/services/helloworld?wsdl")
 @WebService(
 		endpointInterface = "org.apache.juddi.test.HelloWorld",
         serviceName = "HelloWorld")

Modified: webservices/juddi/trunk/juddi-console/subscription-listener/src/main/resources/META-INF/uddi.xml
URL: http://svn.apache.org/viewvc/webservices/juddi/trunk/juddi-console/subscription-listener/src/main/resources/META-INF/uddi.xml?rev=823040&r1=823039&r2=823040&view=diff
==============================================================================
--- webservices/juddi/trunk/juddi-console/subscription-listener/src/main/resources/META-INF/uddi.xml
(original)
+++ webservices/juddi/trunk/juddi-console/subscription-listener/src/main/resources/META-INF/uddi.xml
Thu Oct  8 05:51:18 2009
@@ -2,29 +2,31 @@
 
 <uddi>
     <reloadDelay>5000</reloadDelay>
-	<nodes>
-		<node>
-			<name>default</name>
-			<properties>
-				<property name="serverName" value="localhost"/>
-				<property name="serverPort" value="8080"/>
-			</properties>
-			<description>Main jUDDI node</description>
-			<!-- JAX-WS Transport -->
-			<proxyTransport>org.apache.juddi.v3.client.transport.JAXWSTransport</proxyTransport>
-			<custodyTransferUrl>http://${serverName}:${serverPort}/juddiv3/services/custody-transfer?wsdl</custodyTransferUrl>
-			<inquiryUrl>http://${serverName}:${serverPort}/juddiv3/services/inquiry?wsdl</inquiryUrl>
-	        <publishUrl>http://${serverName}:${serverPort}/juddiv3/services/publish?wsdl</publishUrl>
-	        <securityUrl>http://${serverName}:${serverPort}/juddiv3/services/security?wsdl</securityUrl>
-			<subscriptionUrl>http://${serverName}:${serverPort}/juddiv3/services/subscription?wsdl</subscriptionUrl>
-			<subscriptionListenerUrl>http://${serverName}:${serverPort}/juddiv3/services/subscription-listener?wsdl</subscriptionListenerUrl>
-			<juddiApiUrl>http://${serverName}:${serverPort}/juddiv3/services/juddi-api?wsdl</juddiApiUrl>
-		</node>
-	</nodes>
-	<clerks>
-	   <clerk name="default" node="default" publisher="root" password="root">
-	       <class>org.apache.juddi.test.HelloWorldImpl</class>
-	   </clerk>
-   </clerks> 
+    <manager name="sub-man">
+		<nodes>
+			<node>
+				<name>default</name>
+				<properties>
+					<property name="serverName" value="localhost"/>
+					<property name="serverPort" value="8080"/>
+				</properties>
+				<description>Main jUDDI node</description>
+				<!-- JAX-WS Transport -->
+				<proxyTransport>org.apache.juddi.v3.client.transport.JAXWSTransport</proxyTransport>
+				<custodyTransferUrl>http://${serverName}:${serverPort}/juddiv3/services/custody-transfer?wsdl</custodyTransferUrl>
+				<inquiryUrl>http://${serverName}:${serverPort}/juddiv3/services/inquiry?wsdl</inquiryUrl>
+		        <publishUrl>http://${serverName}:${serverPort}/juddiv3/services/publish?wsdl</publishUrl>
+		        <securityUrl>http://${serverName}:${serverPort}/juddiv3/services/security?wsdl</securityUrl>
+				<subscriptionUrl>http://${serverName}:${serverPort}/juddiv3/services/subscription?wsdl</subscriptionUrl>
+				<subscriptionListenerUrl>http://${serverName}:${serverPort}/juddiv3/services/subscription-listener?wsdl</subscriptionListenerUrl>
+				<juddiApiUrl>http://${serverName}:${serverPort}/juddiv3/services/juddi-api?wsdl</juddiApiUrl>
+			</node>
+		</nodes>
+		<clerks>
+		   <clerk name="default" node="default" publisher="root" password="root">
+		       <class>org.apache.juddi.test.HelloWorldImpl</class>
+		   </clerk>
+	   </clerks>
+	</manager>
    
 </uddi>
\ No newline at end of file

Modified: webservices/juddi/trunk/juddi-console/subscription-listener/src/main/webapp/WEB-INF/web.xml
URL: http://svn.apache.org/viewvc/webservices/juddi/trunk/juddi-console/subscription-listener/src/main/webapp/WEB-INF/web.xml?rev=823040&r1=823039&r2=823040&view=diff
==============================================================================
--- webservices/juddi/trunk/juddi-console/subscription-listener/src/main/webapp/WEB-INF/web.xml
(original)
+++ webservices/juddi/trunk/juddi-console/subscription-listener/src/main/webapp/WEB-INF/web.xml
Thu Oct  8 05:51:18 2009
@@ -62,9 +62,14 @@
     <servlet-name>UDDIClerkServlet</servlet-name>
     <display-name>Clerk Servlet</display-name>
     <servlet-class>
-      org.apache.juddi.v3.client.UDDIClerkServlet
+      org.apache.juddi.v3.client.config.UDDIClerkServlet
     </servlet-class>
     <load-on-startup>1</load-on-startup>
+    <init-param>
+      <param-name>managerName</param-name>
+      <param-value>sub-man</param-value>
+    </init-param>
+    
   </servlet>
   -->
   

Modified: webservices/juddi/trunk/juddi-console/uddi-portlets/src/main/java/org/apache/juddi/portlets/client/UDDISearch.java
URL: http://svn.apache.org/viewvc/webservices/juddi/trunk/juddi-console/uddi-portlets/src/main/java/org/apache/juddi/portlets/client/UDDISearch.java?rev=823040&r1=823039&r2=823040&view=diff
==============================================================================
--- webservices/juddi/trunk/juddi-console/uddi-portlets/src/main/java/org/apache/juddi/portlets/client/UDDISearch.java
(original)
+++ webservices/juddi/trunk/juddi-console/uddi-portlets/src/main/java/org/apache/juddi/portlets/client/UDDISearch.java
Thu Oct  8 05:51:18 2009
@@ -16,7 +16,6 @@
  */
 package org.apache.juddi.portlets.client;
 
-import org.apache.juddi.portlets.client.service.InquiryResponse;
 import org.apache.juddi.portlets.client.service.InquiryService;
 import org.apache.juddi.portlets.client.service.InquiryServiceAsync;
 import org.apache.juddi.portlets.client.service.SearchResponse;
@@ -31,9 +30,6 @@
 import com.google.gwt.user.client.ui.Label;
 import com.google.gwt.user.client.ui.RootPanel;
 import com.google.gwt.user.client.ui.TextArea;
-
-import com.google.gwt.user.client.ui.TextBox;
-import com.google.gwt.user.client.ui.VerticalPanel;
 import com.google.gwt.user.client.ui.Widget;
 
 /**
@@ -44,18 +40,13 @@
 public class UDDISearch implements EntryPoint, ClickListener {
 
 	Label tokenLabel = new Label("");
-
-	private String token = null;
-	private TextBox tmodelKeyBox = new TextBox();
 	
     private TextArea queryTextArea = new TextArea();
     private TextArea resultTextArea = new TextArea();
 	
 	private Button searchButton = new Button("Search");
 	
-	private VerticalPanel tmodelPanel = new VerticalPanel();
 	private InquiryServiceAsync inquiryService = (InquiryServiceAsync) GWT.create(InquiryService.class);
-	
 	private FlowPanel searchPanel = new FlowPanel();
 	
 	private final static String DEFAULT_QUERY = "<find_tModel xmlns=\"urn:uddi-org:api_v3\">"

Added: webservices/juddi/trunk/juddi-console/uddi-portlets/src/main/java/org/apache/juddi/portlets/server/service/Constants.java
URL: http://svn.apache.org/viewvc/webservices/juddi/trunk/juddi-console/uddi-portlets/src/main/java/org/apache/juddi/portlets/server/service/Constants.java?rev=823040&view=auto
==============================================================================
--- webservices/juddi/trunk/juddi-console/uddi-portlets/src/main/java/org/apache/juddi/portlets/server/service/Constants.java
(added)
+++ webservices/juddi/trunk/juddi-console/uddi-portlets/src/main/java/org/apache/juddi/portlets/server/service/Constants.java
Thu Oct  8 05:51:18 2009
@@ -0,0 +1,7 @@
+package org.apache.juddi.portlets.server.service;
+
+public interface Constants {
+
+	public final static String MANAGER_NAME = "uddi-portlet-man";
+	public final static String NODE_NAME = "default";
+}

Modified: webservices/juddi/trunk/juddi-console/uddi-portlets/src/main/java/org/apache/juddi/portlets/server/service/FindServiceImpl.java
URL: http://svn.apache.org/viewvc/webservices/juddi/trunk/juddi-console/uddi-portlets/src/main/java/org/apache/juddi/portlets/server/service/FindServiceImpl.java?rev=823040&r1=823039&r2=823040&view=diff
==============================================================================
--- webservices/juddi/trunk/juddi-console/uddi-portlets/src/main/java/org/apache/juddi/portlets/server/service/FindServiceImpl.java
(original)
+++ webservices/juddi/trunk/juddi-console/uddi-portlets/src/main/java/org/apache/juddi/portlets/server/service/FindServiceImpl.java
Thu Oct  8 05:51:18 2009
@@ -25,7 +25,7 @@
 import org.apache.juddi.portlets.client.model.Service;
 import org.apache.juddi.portlets.client.service.FindResponse;
 import org.apache.juddi.portlets.client.service.FindService;
-import org.apache.juddi.v3.client.config.ClientConfig;
+import org.apache.juddi.v3.client.config.UDDIClerkManager;
 import org.apache.juddi.v3.client.i18n.EntityForLang;
 import org.apache.juddi.v3.client.transport.Transport;
 import org.apache.log4j.Logger;
@@ -71,9 +71,9 @@
 			logger.debug("FindBusiness " + findBusiness + " sending findBusinesses request..");
 			List<Business> businesses = new ArrayList<Business>();
 		
-	    	 String clazz = ClientConfig.getInstance().getNodes().get("default").getProxyTransport();
+	    	 String clazz = UDDIClerkManager.getClientConfig(Constants.MANAGER_NAME).getNodes().get(Constants.NODE_NAME).getProxyTransport();
 	         Class<?> transportClass = Loader.loadClass(clazz);
-        	 Transport transport = (Transport) transportClass.newInstance(); 
+	         Transport transport = (Transport) transportClass.getConstructor(String.class,String.class).newInstance(Constants.MANAGER_NAME,Constants.NODE_NAME);
 
         	 UDDIInquiryPortType inquiryService = transport.getUDDIInquiryService();
         	 BusinessList businessList = inquiryService.findBusiness(findBusiness);
         	 for (BusinessInfo businessInfo : businessList.getBusinessInfos().getBusinessInfo())
{

Modified: webservices/juddi/trunk/juddi-console/uddi-portlets/src/main/java/org/apache/juddi/portlets/server/service/InquiryServiceImpl.java
URL: http://svn.apache.org/viewvc/webservices/juddi/trunk/juddi-console/uddi-portlets/src/main/java/org/apache/juddi/portlets/server/service/InquiryServiceImpl.java?rev=823040&r1=823039&r2=823040&view=diff
==============================================================================
--- webservices/juddi/trunk/juddi-console/uddi-portlets/src/main/java/org/apache/juddi/portlets/server/service/InquiryServiceImpl.java
(original)
+++ webservices/juddi/trunk/juddi-console/uddi-portlets/src/main/java/org/apache/juddi/portlets/server/service/InquiryServiceImpl.java
Thu Oct  8 05:51:18 2009
@@ -16,6 +16,7 @@
  */
 package org.apache.juddi.portlets.server.service;
 
+import java.lang.reflect.InvocationTargetException;
 import java.util.HashMap;
 import java.util.Map;
 
@@ -27,8 +28,8 @@
 import org.apache.juddi.portlets.client.model.ServiceBinding;
 import org.apache.juddi.portlets.client.service.InquiryResponse;
 import org.apache.juddi.portlets.client.service.InquiryService;
+import org.apache.juddi.v3.client.config.UDDIClerkManager;
 import org.apache.juddi.portlets.client.service.SearchResponse;
-import org.apache.juddi.v3.client.config.ClientConfig;
 import org.apache.juddi.v3.client.i18n.EntityForLang;
 import org.apache.juddi.v3.client.transport.Transport;
 import org.apache.log4j.Logger;
@@ -63,11 +64,11 @@
 	}
 	
 	private Transport getTransport() 
-		throws ConfigurationException, ClassNotFoundException, InstantiationException, IllegalAccessException
{
+		throws ConfigurationException, ClassNotFoundException, InstantiationException, IllegalAccessException,
IllegalArgumentException, SecurityException, InvocationTargetException, NoSuchMethodException
{
 		if (transport==null) {
-			String clazz = ClientConfig.getInstance().getNodes().get("default").getProxyTransport();
-	        Class<?> transportClass = Loader.loadClass(clazz);
-	   	 	transport = (Transport) transportClass.newInstance(); 
+			String clazz = UDDIClerkManager.getClientConfig(Constants.MANAGER_NAME).getNodes().get(Constants.NODE_NAME).getProxyTransport();
+	         Class<?> transportClass = Loader.loadClass(clazz);
+	         transport = (Transport) transportClass.getConstructor(String.class,String.class).newInstance(Constants.MANAGER_NAME,Constants.NODE_NAME);
 
 		}
 		return transport;
 	}

Modified: webservices/juddi/trunk/juddi-console/uddi-portlets/src/main/java/org/apache/juddi/portlets/server/service/JUDDIApiServiceImpl.java
URL: http://svn.apache.org/viewvc/webservices/juddi/trunk/juddi-console/uddi-portlets/src/main/java/org/apache/juddi/portlets/server/service/JUDDIApiServiceImpl.java?rev=823040&r1=823039&r2=823040&view=diff
==============================================================================
--- webservices/juddi/trunk/juddi-console/uddi-portlets/src/main/java/org/apache/juddi/portlets/server/service/JUDDIApiServiceImpl.java
(original)
+++ webservices/juddi/trunk/juddi-console/uddi-portlets/src/main/java/org/apache/juddi/portlets/server/service/JUDDIApiServiceImpl.java
Thu Oct  8 05:51:18 2009
@@ -28,7 +28,7 @@
 import org.apache.juddi.portlets.client.model.Publisher;
 import org.apache.juddi.portlets.client.service.JUDDIApiResponse;
 import org.apache.juddi.portlets.client.service.JUDDIApiService;
-import org.apache.juddi.v3.client.config.ClientConfig;
+import org.apache.juddi.v3.client.config.UDDIClerkManager;
 import org.apache.juddi.v3.client.transport.Transport;
 import org.apache.juddi.v3_service.JUDDIApiPortType;
 import org.apache.log4j.Logger;
@@ -56,9 +56,9 @@
 		JUDDIApiResponse response = new JUDDIApiResponse();
 		List<Publisher> publishers = new ArrayList<Publisher>();
 		try {
-	    	 String clazz = ClientConfig.getInstance().getNodes().get("default").getProxyTransport();
+	    	 String clazz = UDDIClerkManager.getClientConfig(Constants.MANAGER_NAME).getNodes().get(Constants.NODE_NAME).getProxyTransport();
 	         Class<?> transportClass = Loader.loadClass(clazz);
-        	 Transport transport = (Transport) transportClass.newInstance(); 
+	         Transport transport = (Transport) transportClass.getConstructor(String.class,String.class).newInstance(Constants.MANAGER_NAME,Constants.NODE_NAME);
  
         	 JUDDIApiPortType apiService = transport.getJUDDIApiService();
         	 PublisherDetail publisherDetail = null;
         	 publisherDetail = apiService.getPublisherDetail(getPublisherDetail);
@@ -93,9 +93,9 @@
 	public JUDDIApiResponse savePublisher(String token, Publisher publisher) {
 		JUDDIApiResponse response = new JUDDIApiResponse();
 		try {
-	    	 String clazz = ClientConfig.getInstance().getNodes().get("default").getProxyTransport();
+			String clazz = UDDIClerkManager.getClientConfig(Constants.MANAGER_NAME).getNodes().get(Constants.NODE_NAME).getProxyTransport();
 	         Class<?> transportClass = Loader.loadClass(clazz);
-	       	 Transport transport = (Transport) transportClass.newInstance(); 
+	         Transport transport = (Transport) transportClass.getConstructor(String.class,String.class).newInstance(Constants.MANAGER_NAME,Constants.NODE_NAME);
  
 	       	 JUDDIApiPortType apiService = transport.getJUDDIApiService();
 	       	 SavePublisher savePublisher = new SavePublisher();
 	       	 savePublisher.setAuthInfo(token);
@@ -128,9 +128,9 @@
 	public JUDDIApiResponse deletePublisher(String token, String publisherId) {
 		JUDDIApiResponse response = new JUDDIApiResponse();
 		try {
-	    	 String clazz = ClientConfig.getInstance().getNodes().get("default").getProxyTransport();
+			 String clazz = UDDIClerkManager.getClientConfig(Constants.MANAGER_NAME).getNodes().get(Constants.NODE_NAME).getProxyTransport();
 	         Class<?> transportClass = Loader.loadClass(clazz);
-	       	 Transport transport = (Transport) transportClass.newInstance(); 
+	         Transport transport = (Transport) transportClass.getConstructor(String.class,String.class).newInstance(Constants.MANAGER_NAME,Constants.NODE_NAME);
 
 	       	 JUDDIApiPortType apiService = transport.getJUDDIApiService();
 	       	 DeletePublisher deletePublisher = new DeletePublisher();
 	         deletePublisher.setAuthInfo(token);

Modified: webservices/juddi/trunk/juddi-console/uddi-portlets/src/main/java/org/apache/juddi/portlets/server/service/PublicationServiceImpl.java
URL: http://svn.apache.org/viewvc/webservices/juddi/trunk/juddi-console/uddi-portlets/src/main/java/org/apache/juddi/portlets/server/service/PublicationServiceImpl.java?rev=823040&r1=823039&r2=823040&view=diff
==============================================================================
--- webservices/juddi/trunk/juddi-console/uddi-portlets/src/main/java/org/apache/juddi/portlets/server/service/PublicationServiceImpl.java
(original)
+++ webservices/juddi/trunk/juddi-console/uddi-portlets/src/main/java/org/apache/juddi/portlets/server/service/PublicationServiceImpl.java
Thu Oct  8 05:51:18 2009
@@ -25,8 +25,8 @@
 import org.apache.juddi.portlets.client.model.Service;
 import org.apache.juddi.portlets.client.service.PublicationResponse;
 import org.apache.juddi.portlets.client.service.PublicationService;
-import org.apache.juddi.v3.client.config.ClientConfig;
 import org.apache.juddi.v3.client.config.UDDIClerk;
+import org.apache.juddi.v3.client.config.UDDIClerkManager;
 import org.apache.juddi.v3.client.i18n.EntityForLang;
 import org.apache.juddi.v3.client.transport.Transport;
 import org.apache.log4j.Logger;
@@ -63,9 +63,9 @@
 		logger.debug("GetRegistrationInfo " + getRegistrationInfo + " sending get Busineses request..");
 		List<Business> businesses = new ArrayList<Business>();
 		try {
-	    	 String clazz = ClientConfig.getInstance().getNodes().get("default").getProxyTransport();
+			 String clazz = UDDIClerkManager.getClientConfig(Constants.MANAGER_NAME).getNodes().get(Constants.NODE_NAME).getProxyTransport();
 	         Class<?> transportClass = Loader.loadClass(clazz);
-        	 Transport transport = (Transport) transportClass.newInstance(); 
+	         Transport transport = (Transport) transportClass.getConstructor(String.class,String.class).newInstance(Constants.MANAGER_NAME,Constants.NODE_NAME);
 
         	 UDDIPublicationPortType publicationService = transport.getUDDIPublishService();
         	 RegisteredInfo info = publicationService.getRegisteredInfo(getRegistrationInfo);
         	 for (BusinessInfo businessInfo : info.getBusinessInfos().getBusinessInfo()) {

Modified: webservices/juddi/trunk/juddi-console/uddi-portlets/src/main/java/org/apache/juddi/portlets/server/service/SecurityServiceImpl.java
URL: http://svn.apache.org/viewvc/webservices/juddi/trunk/juddi-console/uddi-portlets/src/main/java/org/apache/juddi/portlets/server/service/SecurityServiceImpl.java?rev=823040&r1=823039&r2=823040&view=diff
==============================================================================
--- webservices/juddi/trunk/juddi-console/uddi-portlets/src/main/java/org/apache/juddi/portlets/server/service/SecurityServiceImpl.java
(original)
+++ webservices/juddi/trunk/juddi-console/uddi-portlets/src/main/java/org/apache/juddi/portlets/server/service/SecurityServiceImpl.java
Thu Oct  8 05:51:18 2009
@@ -27,8 +27,8 @@
 import org.apache.commons.configuration.ConfigurationException;
 import org.apache.juddi.portlets.client.service.SecurityResponse;
 import org.apache.juddi.portlets.client.service.SecurityService;
-import org.apache.juddi.v3.client.config.ClientConfig;
 import org.apache.juddi.v3.client.config.UDDIClerk;
+import org.apache.juddi.v3.client.config.UDDIClerkManager;
 import org.apache.juddi.v3.client.transport.Transport;
 import org.apache.juddi.v3.client.transport.TransportException;
 import org.apache.log4j.Logger;
@@ -81,7 +81,7 @@
 					session.setAttribute("UserName", username);
 				
 					//upon success obtain tokens from other registries
-					Map<String, UDDIClerk> clerks = ClientConfig.getInstance().getClerks();
+					Map<String, UDDIClerk> clerks = UDDIClerkManager.getClientConfig("uddi-portlet-man").getClerks();
 					for (UDDIClerk clerk : clerks.values()) {
 						if (username.equals(clerk.getPublisher())) {
 							try {
@@ -118,9 +118,9 @@
 		InstantiationException, IllegalAccessException, TransportException, DispositionReportFaultMessage,
RemoteException, 
 		IllegalArgumentException, SecurityException, InvocationTargetException, NoSuchMethodException
{
 		
-		String clazz = ClientConfig.getInstance().getNodes().get(node).getProxyTransport();
-		Class<?> transportClass = Loader.loadClass(clazz);
-		Transport transport = (Transport) transportClass.getConstructor(String.class).newInstance(node);
+		String clazz = UDDIClerkManager.getClientConfig(Constants.MANAGER_NAME).getNodes().get(Constants.NODE_NAME).getProxyTransport();
+        Class<?> transportClass = Loader.loadClass(clazz);
+        Transport transport = (Transport) transportClass.getConstructor(String.class,String.class).newInstance(Constants.MANAGER_NAME,Constants.NODE_NAME);
 
 		UDDISecurityPortType securityService = transport.getUDDISecurityService();
 		GetAuthToken getAuthToken = new GetAuthToken();
 		getAuthToken.setUserID(username);

Modified: webservices/juddi/trunk/juddi-console/uddi-portlets/src/main/java/org/apache/juddi/portlets/server/service/SubscriptionServiceImpl.java
URL: http://svn.apache.org/viewvc/webservices/juddi/trunk/juddi-console/uddi-portlets/src/main/java/org/apache/juddi/portlets/server/service/SubscriptionServiceImpl.java?rev=823040&r1=823039&r2=823040&view=diff
==============================================================================
--- webservices/juddi/trunk/juddi-console/uddi-portlets/src/main/java/org/apache/juddi/portlets/server/service/SubscriptionServiceImpl.java
(original)
+++ webservices/juddi/trunk/juddi-console/uddi-portlets/src/main/java/org/apache/juddi/portlets/server/service/SubscriptionServiceImpl.java
Thu Oct  8 05:51:18 2009
@@ -33,8 +33,8 @@
 import org.apache.juddi.portlets.client.model.Subscription;
 import org.apache.juddi.portlets.client.service.SubscriptionResponse;
 import org.apache.juddi.portlets.client.service.SubscriptionService;
-import org.apache.juddi.v3.client.config.ClientConfig;
 import org.apache.juddi.v3.client.config.UDDIClerk;
+import org.apache.juddi.v3.client.config.UDDIClerkManager;
 import org.apache.juddi.v3.client.config.UDDINode;
 import org.apache.juddi.v3.client.transport.Transport;
 import org.apache.log4j.Logger;
@@ -71,7 +71,7 @@
 		}
 		logger.debug("Publisher " + publisher + " sending getSubscription request..");
 		try {
-			Map<String, UDDIClerk> clerks = ClientConfig.getInstance().getClerks();
+			Map<String, UDDIClerk> clerks = UDDIClerkManager.getClientConfig("uddi-portlet-man").getClerks();
 			for (UDDIClerk clerk : clerks.values()) {
 				if (publisher.equals(clerk.getPublisher())) {
 					
@@ -99,9 +99,9 @@
 		modelNode.setClerkName(clerk.getName());
 		modelNode.setDescription(node.getDescription());
 		try {
-	    	 String clazz = ClientConfig.getInstance().getNodes().get(node.getName()).getProxyTransport();
-		     Class<?> transportClass = Loader.loadClass(clazz);
-	       	 Transport transport = (Transport) transportClass.getConstructor(String.class).newInstance(node.getName());

+			 String clazz = UDDIClerkManager.getClientConfig(Constants.MANAGER_NAME).getNodes().get(Constants.NODE_NAME).getProxyTransport();
+	         Class<?> transportClass = Loader.loadClass(clazz);
+	         Transport transport = (Transport) transportClass.getConstructor(String.class,String.class).newInstance(Constants.MANAGER_NAME,Constants.NODE_NAME);
 
 	       	 String authToken = (String) session.getAttribute(clerk.getName());
 	       	 
 	       	 UDDISubscriptionPortType subscriptionService = transport.getUDDISubscriptionService();
@@ -137,10 +137,10 @@
 	
 		logger.debug("Sending saveSubscriptions request..");
 		try {
-			 UDDIClerk clerk = ClientConfig.getInstance().getClerks().get(modelSubscription.getClerkName());
-	    	 String clazz = ClientConfig.getInstance().getNodes().get(clerk.getNode().getName()).getProxyTransport();
-	         Class<?> transportClass = Loader.loadClass(clazz);
-	       	 Transport transport = (Transport) transportClass.getConstructor(String.class).newInstance(clerk.getNode().getName());

+			 UDDIClerk clerk = UDDIClerkManager.getClientConfig("uddi-portlet-man").getClerks().get(modelSubscription.getClerkName());
+			 String clazz = UDDIClerkManager.getClientConfig(clerk.getManagerName()).getNodes().get(clerk.getNode().getName()).getProxyTransport();
+	         Class<?> transportClass = Loader.loadClass(clazz); 
+	       	 Transport transport = (Transport) transportClass.getConstructor(String.class).newInstance(clerk.getManagerName(),clerk.getNode().getName());

 	       	 UDDISubscriptionPortType subscriptionService = transport.getUDDISubscriptionService();
 	       	 List<org.uddi.sub_v3.Subscription> subscriptionList = new ArrayList<org.uddi.sub_v3.Subscription>();
 	       	 org.uddi.sub_v3.Subscription subscription = new org.uddi.sub_v3.Subscription();
@@ -204,8 +204,8 @@
 		logger.debug("Sending deleteSubscriptions request for subscriptionKey=" 
 				+ modelSubscription.getSubscriptionKey());
 		try {
-			 UDDIClerk clerk = ClientConfig.getInstance().getClerks().get(modelSubscription.getClerkName());
-	    	 String clazz = ClientConfig.getInstance().getNodes().get(clerk.getNode().getName()).getProxyTransport();
+			 UDDIClerk clerk = UDDIClerkManager.getClientConfig("uddi-portlet-man").getClerks().get(modelSubscription.getClerkName());
+	    	 String clazz = UDDIClerkManager.getClientConfig("uddi-portlet-man").getNodes().get(clerk.getNode().getName()).getProxyTransport();
 	         Class<?> transportClass = Loader.loadClass(clazz);
 	       	 Transport transport = (Transport) transportClass.getConstructor(String.class).newInstance(clerk.getNode().getName());

 	       	 UDDISubscriptionPortType subscriptionService = transport.getUDDISubscriptionService();

Modified: webservices/juddi/trunk/juddi-console/uddi-portlets/src/main/resources/META-INF/uddi.xml
URL: http://svn.apache.org/viewvc/webservices/juddi/trunk/juddi-console/uddi-portlets/src/main/resources/META-INF/uddi.xml?rev=823040&r1=823039&r2=823040&view=diff
==============================================================================
--- webservices/juddi/trunk/juddi-console/uddi-portlets/src/main/resources/META-INF/uddi.xml
(original)
+++ webservices/juddi/trunk/juddi-console/uddi-portlets/src/main/resources/META-INF/uddi.xml
Thu Oct  8 05:51:18 2009
@@ -2,75 +2,73 @@
 
 <uddi>
     <reloadDelay>5000</reloadDelay>
-	<nodes>
-		<node>
-			<name>default</name>
-			<properties>
-				<property name="serverName" value="localhost"/>
-				<property name="serverPort" value="8080"/>
-				<property name="rmiPort" value="1099"/>
-			</properties>
-			<description>Main jUDDI node</description>
-			<!-- JAX-WS Transport -->
-			<proxyTransport>org.apache.juddi.v3.client.transport.JAXWSTransport</proxyTransport>
-			<custodyTransferUrl>http://${serverName}:${serverPort}/juddiv3/services/custody-transfer?wsdl</custodyTransferUrl>
-			<inquiryUrl>http://${serverName}:${serverPort}/juddiv3/services/inquiry?wsdl</inquiryUrl>
-	        <publishUrl>http://${serverName}:${serverPort}/juddiv3/services/publish?wsdl</publishUrl>
-	        <securityUrl>http://${serverName}:${serverPort}/juddiv3/services/security?wsdl</securityUrl>
-			<subscriptionUrl>http://${serverName}:${serverPort}/juddiv3/services/subscription?wsdl</subscriptionUrl>
-			<subscriptionListenerUrl>http://${serverPort}:${serverPort}/juddiv3/services/subscription-listener?wsdl</subscriptionListenerUrl>
-			<juddiApiUrl>http://${serverName}:${serverPort}/juddiv3/services/juddi-api?wsdl</juddiApiUrl>
-			<!-- In VM Transport Settings 
-			<proxyTransport>org.apache.juddi.v3.client.transport.InVMTransport</proxyTransport>
-			<custodyTransferUrl>org.apache.juddi.api.impl.UDDICustodyTransferImpl</custodyTransferUrl>
-			<inquiryUrl>org.apache.juddi.api.impl.UDDIInquiryImpl</inquiryUrl>
-	        <publishUrl>org.apache.juddi.api.impl.UDDIPublicationImpl</publishUrl>
-	        <securityUrl>org.apache.juddi.api.impl.UDDISecurityImpl</securityUrl>
-			<subscriptionUrl>org.apache.juddi.api.impl.UDDISubscriptionImpl</subscriptionUrl>
-			<subscriptionListenerUrl>org.apache.juddi.api.impl.UDDISubscriptionListenerImpl</subscriptionListenerUrl>
-			<juddiApiUrl>org.apache.juddi.api.impl.JUDDIApiImpl</juddiApiUrl>
-			-->
-			<!-- RMI Transport Settings 
-			<proxyTransport>org.apache.juddi.v3.client.transport.RMITransport</proxyTransport>
-			<custodyTransferUrl>/juddiv3/UDDICustodyTransferService</custodyTransferUrl>
-			<inquiryUrl>/juddiv3/UDDIInquiryService</inquiryUrl>
-	        <publishUrl>/juddiv3/UDDIPublicationService</publishUrl>
-	        <securityUrl>/juddiv3/UDDISecurityService</securityUrl>
-			<subscriptionUrl>/juddiv3/UDDISubscriptionService</subscriptionUrl>
-			<subscriptionListenerUrl>/juddiv3/UDDISubscriptionListenerService</subscriptionListenerUrl>
-			<juddiApiUrl>/juddiv3/JUDDIApiService</juddiApiUrl>
-			<javaNamingFactoryInitial>org.jnp.interfaces.NamingContextFactory</javaNamingFactoryInitial>
-			<javaNamingFactoryUrlPkgs>org.jboss.naming</javaNamingFactoryUrlPkgs>
-			<javaNamingProviderUrl>jnp://${serverName}:${rmiPort}</javaNamingProviderUrl>
-			-->
-		</node>
-		<node>
-			<name>med</name>
-			<properties>
-				<property name="serverName" value="med"/>
-				<property name="serverPort" value="8080"/>
-			</properties>
-			<description>jUDDI node in other Department</description>
-			<proxyTransport>org.apache.juddi.v3.client.transport.JAXWSTransport</proxyTransport>
-			<custodyTransferUrl>http://${serverName}:${serverPort}/juddiv3/services/custody-transfer?wsdl</custodyTransferUrl>
-			<inquiryUrl>http://${serverName}:${serverPort}/juddiv3/services/inquiry?wsdl</inquiryUrl>
-	        <publishUrl>http://${serverName}:${serverPort}/juddiv3/services/publish?wsdl</publishUrl>
-	        <securityUrl>http://${serverName}:${serverPort}/juddiv3/services/security?wsdl</securityUrl>
-			<subscriptionUrl>http://${serverName}:${serverPort}/juddiv3/services/subscription?wsdl</subscriptionUrl>
-			<subscriptionListenerUrl>http://${serverName}:${serverPort}/juddiv3/services/subscription-listener?wsdl</subscriptionListenerUrl>
-			<juddiApiUrl>http://${serverName}:${serverPort}/juddiv3/services/juddi-api?wsdl</juddiApiUrl>
-		</node>
-	</nodes>
-	<clerks>
-	   <clerk name="default" node="default" publisher="root" password="root"/>
-       <clerk name="medroot" node="med"     publisher="root" password="root"/>
-       <xregister>
-	       <service bindingKey="uddi:juddi.apache.org:servicebindings-subscriptionlistener-ws"
fromClerk="default" toClerk="medroot"/>
-	   </xregister>
-   </clerks> 
+    <manager name="uddi-portlet-man">
+		<nodes>
+			<node>
+				<name>default</name>
+				<properties>
+					<property name="serverName" value="localhost"/>
+					<property name="serverPort" value="8080"/>
+					<property name="rmiPort" value="1099"/>
+				</properties>
+				<description>Main jUDDI node</description>
+				<!-- JAX-WS Transport -->
+				<proxyTransport>org.apache.juddi.v3.client.transport.JAXWSTransport</proxyTransport>
+				<custodyTransferUrl>http://${serverName}:${serverPort}/juddiv3/services/custody-transfer?wsdl</custodyTransferUrl>
+				<inquiryUrl>http://${serverName}:${serverPort}/juddiv3/services/inquiry?wsdl</inquiryUrl>
+		        <publishUrl>http://${serverName}:${serverPort}/juddiv3/services/publish?wsdl</publishUrl>
+		        <securityUrl>http://${serverName}:${serverPort}/juddiv3/services/security?wsdl</securityUrl>
+				<subscriptionUrl>http://${serverName}:${serverPort}/juddiv3/services/subscription?wsdl</subscriptionUrl>
+				<subscriptionListenerUrl>http://${serverName}:${serverPort}/juddiv3/services/subscription-listener?wsdl</subscriptionListenerUrl>
+				<juddiApiUrl>http://${serverName}:${serverPort}/juddiv3/services/juddi-api?wsdl</juddiApiUrl>
+				<!-- In VM Transport Settings 
+				<proxyTransport>org.apache.juddi.v3.client.transport.InVMTransport</proxyTransport>
+				<custodyTransferUrl>org.apache.juddi.api.impl.UDDICustodyTransferImpl</custodyTransferUrl>
+				<inquiryUrl>org.apache.juddi.api.impl.UDDIInquiryImpl</inquiryUrl>
+		        <publishUrl>org.apache.juddi.api.impl.UDDIPublicationImpl</publishUrl>
+		        <securityUrl>org.apache.juddi.api.impl.UDDISecurityImpl</securityUrl>
+				<subscriptionUrl>org.apache.juddi.api.impl.UDDISubscriptionImpl</subscriptionUrl>
+				<subscriptionListenerUrl>org.apache.juddi.api.impl.UDDISubscriptionListenerImpl</subscriptionListenerUrl>
+				<juddiApiUrl>org.apache.juddi.api.impl.JUDDIApiImpl</juddiApiUrl>
+				-->
+				<!-- RMI Transport Settings 
+				<proxyTransport>org.apache.juddi.v3.client.transport.RMITransport</proxyTransport>
+				<custodyTransferUrl>/juddiv3/UDDICustodyTransferService</custodyTransferUrl>
+				<inquiryUrl>/juddiv3/UDDIInquiryService</inquiryUrl>
+		        <publishUrl>/juddiv3/UDDIPublicationService</publishUrl>
+		        <securityUrl>/juddiv3/UDDISecurityService</securityUrl>
+				<subscriptionUrl>/juddiv3/UDDISubscriptionService</subscriptionUrl>
+				<subscriptionListenerUrl>/juddiv3/UDDISubscriptionListenerService</subscriptionListenerUrl>
+				<juddiApiUrl>/juddiv3/JUDDIApiService</juddiApiUrl>
+				<javaNamingFactoryInitial>org.jnp.interfaces.NamingContextFactory</javaNamingFactoryInitial>
+				<javaNamingFactoryUrlPkgs>org.jboss.naming</javaNamingFactoryUrlPkgs>
+				<javaNamingProviderUrl>jnp://${serverName}:${rmiPort}</javaNamingProviderUrl>
+				-->
+			</node>
+			<node>
+				<name>med</name>
+				<properties>
+					<property name="serverName" value="med"/>
+					<property name="serverPort" value="8080"/>
+				</properties>
+				<description>jUDDI node in other Department</description>
+				<proxyTransport>org.apache.juddi.v3.client.transport.JAXWSTransport</proxyTransport>
+				<custodyTransferUrl>http://${serverName}:${serverPort}/juddiv3/services/custody-transfer?wsdl</custodyTransferUrl>
+				<inquiryUrl>http://${serverName}:${serverPort}/juddiv3/services/inquiry?wsdl</inquiryUrl>
+		        <publishUrl>http://${serverName}:${serverPort}/juddiv3/services/publish?wsdl</publishUrl>
+		        <securityUrl>http://${serverName}:${serverPort}/juddiv3/services/security?wsdl</securityUrl>
+				<subscriptionUrl>http://${serverName}:${serverPort}/juddiv3/services/subscription?wsdl</subscriptionUrl>
+				<subscriptionListenerUrl>http://${serverName}:${serverPort}/juddiv3/services/subscription-listener?wsdl</subscriptionListenerUrl>
+				<juddiApiUrl>http://${serverName}:${serverPort}/juddiv3/services/juddi-api?wsdl</juddiApiUrl>
+			</node>
+		</nodes>
+		<clerks>
+		   <clerk name="default" node="default" publisher="root" password="root"/>
+	       <clerk name="medroot" node="med"     publisher="root" password="root"/>
+	       <xregister>
+		       <service bindingKey="uddi:juddi.apache.org:servicebindings-subscriptionlistener-ws"
fromClerk="default" toClerk="medroot"/>
+		   </xregister>
+	   </clerks>
+	</manager> 
    
-	
-	
-	
-	
 </uddi>
\ No newline at end of file



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


Mime
View raw message