[jboss-svn-commits] JBL Code SVN: r26575 - in labs/jbossesb/branches/JBESB_4_4_GA_CP: product/rosetta/aop/resources/META-INF and 1 other directories.
jboss-svn-commits at lists.jboss.org
jboss-svn-commits at lists.jboss.org
Sat May 16 06:03:34 EDT 2009
Author: kevin.conner at jboss.com
Date: 2009-05-16 06:03:33 -0400 (Sat, 16 May 2009)
New Revision: 26575
Modified:
labs/jbossesb/branches/JBESB_4_4_GA_CP/product/rosetta/aop/java/org/jboss/internal/soa/esb/services/registry/aspect/ScoutAspect.java
labs/jbossesb/branches/JBESB_4_4_GA_CP/product/rosetta/aop/resources/META-INF/jboss-aop.xml
labs/jbossesb/branches/JBESB_4_4_GA_CP/qa/junit/src/org/jboss/soa/esb/server/aop/AOPServer.java
labs/jbossesb/branches/JBESB_4_4_GA_CP/qa/junit/src/org/jboss/soa/esb/server/aop/AOPServerMBean.java
labs/jbossesb/branches/JBESB_4_4_GA_CP/qa/junit/src/org/jboss/soa/esb/server/aop/AOPUnitTest.java
Log:
Disable pulling of organization from registry: JBESB-2549
Modified: labs/jbossesb/branches/JBESB_4_4_GA_CP/product/rosetta/aop/java/org/jboss/internal/soa/esb/services/registry/aspect/ScoutAspect.java
===================================================================
--- labs/jbossesb/branches/JBESB_4_4_GA_CP/product/rosetta/aop/java/org/jboss/internal/soa/esb/services/registry/aspect/ScoutAspect.java 2009-05-16 10:01:24 UTC (rev 26574)
+++ labs/jbossesb/branches/JBESB_4_4_GA_CP/product/rosetta/aop/java/org/jboss/internal/soa/esb/services/registry/aspect/ScoutAspect.java 2009-05-16 10:03:33 UTC (rev 26575)
@@ -22,9 +22,11 @@
package org.jboss.internal.soa.esb.services.registry.aspect;
import javax.xml.registry.LifeCycleManager;
+import javax.xml.registry.infomodel.Organization;
import javax.xml.registry.infomodel.Service;
import org.apache.ws.scout.registry.BusinessQueryManagerImpl;
+import org.apache.ws.scout.registry.infomodel.OrganizationImpl;
import org.apache.ws.scout.registry.infomodel.ServiceImpl;
import org.jboss.aop.joinpoint.MethodCalledByMethodInvocation;
@@ -32,6 +34,9 @@
* Aspect used to prevent scout from loading the complete service
* graph for the registry just to return a binding.
*
+ * Updated to intercept calls for the organizational information when
+ * querying a specific service.
+ *
* @author <a href='mailto:Kevin.Conner at jboss.com'>Kevin Conner</a>
*/
public class ScoutAspect
@@ -51,6 +56,13 @@
service.setKey(lcm.createKey(id));
return service ;
}
+ else if (LifeCycleManager.ORGANIZATION.equals(objectType))
+ {
+ final LifeCycleManager lcm = bqmImpl.getRegistryService().getBusinessLifeCycleManager() ;
+ final Organization organization = new OrganizationImpl(lcm) ;
+ organization.setKey(lcm.createKey(id)) ;
+ return organization ;
+ }
else
{
return invocation.invokeNext() ;
Modified: labs/jbossesb/branches/JBESB_4_4_GA_CP/product/rosetta/aop/resources/META-INF/jboss-aop.xml
===================================================================
--- labs/jbossesb/branches/JBESB_4_4_GA_CP/product/rosetta/aop/resources/META-INF/jboss-aop.xml 2009-05-16 10:01:24 UTC (rev 26574)
+++ labs/jbossesb/branches/JBESB_4_4_GA_CP/product/rosetta/aop/resources/META-INF/jboss-aop.xml 2009-05-16 10:03:33 UTC (rev 26575)
@@ -11,6 +11,10 @@
<advice name="getRegistryObject" aspect="org.jboss.internal.soa.esb.services.registry.aspect.ScoutAspect"/>
</bind>
+ <bind pointcut="withincode(* org.apache.ws.scout.registry.BusinessQueryManagerImpl->getServiceFromBusinessService(..)) AND call(* org.apache.ws.scout.registry.BusinessQueryManagerImpl->getRegistryObject(..))">
+ <advice name="getRegistryObject" aspect="org.jboss.internal.soa.esb.services.registry.aspect.ScoutAspect"/>
+ </bind>
+
<bind pointcut="execution(* org.apache.juddi.util.xml.XMLUtils->getText(..))">
<advice name="getText" aspect="org.jboss.internal.soa.esb.services.registry.aspect.JUDDIAspect"/>
</bind>
Modified: labs/jbossesb/branches/JBESB_4_4_GA_CP/qa/junit/src/org/jboss/soa/esb/server/aop/AOPServer.java
===================================================================
--- labs/jbossesb/branches/JBESB_4_4_GA_CP/qa/junit/src/org/jboss/soa/esb/server/aop/AOPServer.java 2009-05-16 10:01:24 UTC (rev 26574)
+++ labs/jbossesb/branches/JBESB_4_4_GA_CP/qa/junit/src/org/jboss/soa/esb/server/aop/AOPServer.java 2009-05-16 10:03:33 UTC (rev 26575)
@@ -29,7 +29,9 @@
import javax.xml.registry.Connection;
import javax.xml.registry.JAXRException;
import javax.xml.registry.JAXRResponse;
+import javax.xml.registry.LifeCycleManager;
import javax.xml.registry.RegistryService;
+import javax.xml.registry.infomodel.InternationalString;
import javax.xml.registry.infomodel.Organization;
import javax.xml.registry.infomodel.Service;
import javax.xml.registry.infomodel.ServiceBinding;
@@ -64,6 +66,12 @@
return new TestScoutRegistryImpl().checkService() ;
}
+ public String verifyScoutPerformanceIssue2()
+ throws JAXRException, ConfigurationException
+ {
+ return new TestScoutRegistryImpl().checkServiceFromBusinessService() ;
+ }
+
public String verifyJUDDICDataIssue()
throws RegistryException, MarshalException, ServiceNotFoundException
{
@@ -205,6 +213,61 @@
scoutConnectionFactory.closeConnection(connection) ;
}
}
+
+ public String checkServiceFromBusinessService()
+ throws JAXRException, ConfigurationException
+ {
+ final String serviceKey ;
+ {
+ final Service service = findService("JBossESB-Internal", "DeadLetterService") ;
+
+ if (service == null)
+ {
+ return "Service not found" ;
+ }
+ serviceKey = service.getKey().getId() ;
+ }
+
+ final ScoutConnectionFactory scoutConnectionFactory = new ScoutConnectionFactory() ;
+ final Connection connection = scoutConnectionFactory.getConnection();
+ try
+ {
+ final RegistryService rs = connection.getRegistryService();
+ final BusinessQueryManager bqm = rs.getBusinessQueryManager();
+ final Service registryService = (Service)bqm.getRegistryObject(serviceKey, LifeCycleManager.SERVICE) ;
+ if (registryService == null)
+ {
+ return "Failed to obtain service as registry object" ;
+ }
+
+ final Organization organization = registryService.getProvidingOrganization() ;
+ if (organization == null)
+ {
+ return "No Organization returned with service" ;
+ }
+
+ if (organization.getKey() == null)
+ {
+ return "Organization key not populated" ;
+ }
+
+ final InternationalString name = organization.getName();
+ if (name != null)
+ {
+ final Collection localizedStrings = name.getLocalizedStrings();
+ if ((localizedStrings != null) && (localizedStrings.size() > 0))
+ {
+ return "Organization returned from database rather than aspect" ;
+ }
+ }
+
+ return null ;
+ }
+ finally
+ {
+ scoutConnectionFactory.closeConnection(connection) ;
+ }
+ }
}
private static class ScoutConnectionFactory extends JAXRConnectionFactory
Modified: labs/jbossesb/branches/JBESB_4_4_GA_CP/qa/junit/src/org/jboss/soa/esb/server/aop/AOPServerMBean.java
===================================================================
--- labs/jbossesb/branches/JBESB_4_4_GA_CP/qa/junit/src/org/jboss/soa/esb/server/aop/AOPServerMBean.java 2009-05-16 10:01:24 UTC (rev 26574)
+++ labs/jbossesb/branches/JBESB_4_4_GA_CP/qa/junit/src/org/jboss/soa/esb/server/aop/AOPServerMBean.java 2009-05-16 10:03:33 UTC (rev 26575)
@@ -38,6 +38,9 @@
public String verifyScoutPerformanceIssue()
throws JAXRException, ConfigurationException ;
+ public String verifyScoutPerformanceIssue2()
+ throws JAXRException, ConfigurationException ;
+
public String verifyJUDDICDataIssue()
throws RegistryException, MarshalException, ServiceNotFoundException ;
Modified: labs/jbossesb/branches/JBESB_4_4_GA_CP/qa/junit/src/org/jboss/soa/esb/server/aop/AOPUnitTest.java
===================================================================
--- labs/jbossesb/branches/JBESB_4_4_GA_CP/qa/junit/src/org/jboss/soa/esb/server/aop/AOPUnitTest.java 2009-05-16 10:01:24 UTC (rev 26574)
+++ labs/jbossesb/branches/JBESB_4_4_GA_CP/qa/junit/src/org/jboss/soa/esb/server/aop/AOPUnitTest.java 2009-05-16 10:03:33 UTC (rev 26575)
@@ -61,6 +61,20 @@
}
/**
+ * Test for second scout performance issue.
+ * @throws Exception For any failures.
+ */
+ public void testScoutPerformanceIssue2()
+ throws Exception
+ {
+ final String result = (String)execute("verifyScoutPerformanceIssue2", null, null) ;
+ if (result != null)
+ {
+ fail(result) ;
+ }
+ }
+
+ /**
* Test for juddi CDATA issue..
* @throws Exception For any failures.
*/
More information about the jboss-svn-commits
mailing list