[jboss-svn-commits] JBL Code SVN: r7730 - in labs/jbossesb/trunk/product/core/services/src/org/jboss: internal/soa/esb/services/registry soa/esb/services/registry
jboss-svn-commits at lists.jboss.org
jboss-svn-commits at lists.jboss.org
Mon Nov 20 16:11:10 EST 2006
Author: tfennelly
Date: 2006-11-20 16:11:06 -0500 (Mon, 20 Nov 2006)
New Revision: 7730
Modified:
labs/jbossesb/trunk/product/core/services/src/org/jboss/internal/soa/esb/services/registry/JAXRRegistryImpl.java
labs/jbossesb/trunk/product/core/services/src/org/jboss/soa/esb/services/registry/Registry.java
Log:
Registry modifications made by Kurt on Tom's account :-)
Modified: labs/jbossesb/trunk/product/core/services/src/org/jboss/internal/soa/esb/services/registry/JAXRRegistryImpl.java
===================================================================
--- labs/jbossesb/trunk/product/core/services/src/org/jboss/internal/soa/esb/services/registry/JAXRRegistryImpl.java 2006-11-20 21:09:56 UTC (rev 7729)
+++ labs/jbossesb/trunk/product/core/services/src/org/jboss/internal/soa/esb/services/registry/JAXRRegistryImpl.java 2006-11-20 21:11:06 UTC (rev 7730)
@@ -327,6 +327,34 @@
return eprs;
}
/**
+ *
+ * @param service
+ * @return
+ */
+ public EPR findEPR(String category, String serviceName) throws RegistryException
+ {
+ EPR epr = null;
+ Connection connection = JAXRRegistryImpl.getConnection();
+ try {
+ Service service = findService(category, serviceName);
+ if (service==null){
+ throw new RegistryException("Could not find service with category=" + category + " and serviceName=" + serviceName);
+ }
+ // Get registry service and business query manager
+ Collection<ServiceBinding> serviceBindings = findServiceBindings(service);
+ if (serviceBindings.iterator().hasNext()) {
+ ServiceBinding serviceBinding = (ServiceBinding) serviceBindings.iterator().next();
+ String eprXML = URLDecoder.decode(serviceBinding.getAccessURI(),"UTF-8");
+ epr = EPRHelper.fromXMLString(eprXML);
+ }
+ } catch (Exception je) {
+ throw new RegistryException(je.getLocalizedMessage(), je);
+ } finally {
+ closeConnection(connection);
+ }
+ return epr;
+ }
+ /**
* Find all Organizations with a name mathing the queryString parameter.
*
* @param organizationName used to match with the name of the organization.
Modified: labs/jbossesb/trunk/product/core/services/src/org/jboss/soa/esb/services/registry/Registry.java
===================================================================
--- labs/jbossesb/trunk/product/core/services/src/org/jboss/soa/esb/services/registry/Registry.java 2006-11-20 21:09:56 UTC (rev 7729)
+++ labs/jbossesb/trunk/product/core/services/src/org/jboss/soa/esb/services/registry/Registry.java 2006-11-20 21:11:06 UTC (rev 7730)
@@ -84,4 +84,13 @@
* @throws RegistryException
*/
public Collection<EPR> findEPRs(String serviceCategoryName, String serviceName) throws RegistryException;
+ /**
+ * Returns the first EPR in the list that belong to a specific category and service combination.
+ *
+ * @param category - name of the category to which the service belongs.
+ * @param serviceName - name of the service to which the EPS belongs.
+ * @return EPR.
+ * @throws RegistryException
+ */
+ public EPR findEPR(String serviceCategoryName, String serviceName) throws RegistryException;
}
More information about the jboss-svn-commits
mailing list