diff options
author | ramkumar <ramkumar@13f79535-47bb-0310-9956-ffa450edef68> | 2009-03-09 10:00:30 +0000 |
---|---|---|
committer | ramkumar <ramkumar@13f79535-47bb-0310-9956-ffa450edef68> | 2009-03-09 10:00:30 +0000 |
commit | ff6d646fcbd9f06f013cf934fcdde66c213c7db2 (patch) | |
tree | 26653413a72aade32663a7478c4260ac89b7e2c8 /branches/sca-java-1.x/modules/implementation-spring/src/main/java/org/apache/tuscany/sca/implementation/spring/xml/SpringBeanIntrospector.java | |
parent | 8075c532ce67243ebdbc82d7f36a055f3e0ea4a2 (diff) |
Fixes for TUSCANY-2642, 2909, 2910
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@751642 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'branches/sca-java-1.x/modules/implementation-spring/src/main/java/org/apache/tuscany/sca/implementation/spring/xml/SpringBeanIntrospector.java')
-rw-r--r-- | branches/sca-java-1.x/modules/implementation-spring/src/main/java/org/apache/tuscany/sca/implementation/spring/xml/SpringBeanIntrospector.java | 27 |
1 files changed, 9 insertions, 18 deletions
diff --git a/branches/sca-java-1.x/modules/implementation-spring/src/main/java/org/apache/tuscany/sca/implementation/spring/xml/SpringBeanIntrospector.java b/branches/sca-java-1.x/modules/implementation-spring/src/main/java/org/apache/tuscany/sca/implementation/spring/xml/SpringBeanIntrospector.java index 3e526cd20e..df85e4f302 100644 --- a/branches/sca-java-1.x/modules/implementation-spring/src/main/java/org/apache/tuscany/sca/implementation/spring/xml/SpringBeanIntrospector.java +++ b/branches/sca-java-1.x/modules/implementation-spring/src/main/java/org/apache/tuscany/sca/implementation/spring/xml/SpringBeanIntrospector.java @@ -18,8 +18,6 @@ */ package org.apache.tuscany.sca.implementation.spring.xml; -import java.util.Map; - import org.apache.tuscany.sca.assembly.AssemblyFactory; import org.apache.tuscany.sca.assembly.ComponentType; import org.apache.tuscany.sca.contribution.service.ContributionResolveException; @@ -27,7 +25,6 @@ import org.apache.tuscany.sca.implementation.java.DefaultJavaImplementationFacto import org.apache.tuscany.sca.implementation.java.IntrospectionException; import org.apache.tuscany.sca.implementation.java.JavaImplementation; import org.apache.tuscany.sca.implementation.java.JavaImplementationFactory; -import org.apache.tuscany.sca.implementation.java.impl.JavaElementImpl; import org.apache.tuscany.sca.implementation.java.introspect.JavaClassVisitor; import org.apache.tuscany.sca.implementation.java.introspect.impl.AllowsPassByReferenceProcessor; import org.apache.tuscany.sca.implementation.java.introspect.impl.BaseJavaClassVisitor; @@ -47,7 +44,6 @@ import org.apache.tuscany.sca.implementation.java.introspect.impl.ScopeProcessor import org.apache.tuscany.sca.implementation.java.introspect.impl.ServiceProcessor; import org.apache.tuscany.sca.interfacedef.java.JavaInterfaceFactory; import org.apache.tuscany.sca.policy.PolicyFactory; -import org.apache.tuscany.sca.implementation.spring.SpringImplementation; /** * Provides introspection functions for Spring beans @@ -89,7 +85,7 @@ public class SpringBeanIntrospector { new ResourceProcessor(assemblyFactory), new ScopeProcessor(assemblyFactory), new ServiceProcessor(assemblyFactory, javaFactory), - new HeuristicPojoProcessor(assemblyFactory, javaFactory), + new SpringBeanPojoProcessor(assemblyFactory, javaFactory), new PolicyProcessor(assemblyFactory, policyFactory)}; for (JavaClassVisitor extension : extensions) { javaImplementationFactory.addClassVisitor(extension); @@ -107,8 +103,7 @@ public class SpringBeanIntrospector { * Spring Bean or its componentType * */ - public Map<String, JavaElementImpl> introspectBean(Class<?> beanClass, ComponentType componentType, - SpringImplementation springImplementation) throws ContributionResolveException + public JavaImplementation introspectBean(Class<?> beanClass, ComponentType componentType) throws ContributionResolveException { if (componentType == null) throw new ContributionResolveException("Introspect Spring bean: supplied componentType is null"); @@ -126,21 +121,17 @@ public class SpringBeanIntrospector { componentType.getReferences().addAll(javaImplementation.getReferences()); componentType.getProperties().addAll(javaImplementation.getProperties()); - springImplementation.setInitMethod(javaImplementation.getInitMethod()); - springImplementation.setDestroyMethod(javaImplementation.getDestroyMethod()); - springImplementation.setConstructor(javaImplementation.getConstructor()); - } catch (IntrospectionException e) { throw new ContributionResolveException(e); } // end try - //List<Service> services = javaImplementation.getServices(); - //for (Service service : services) { - //String name = service.getName(); - //System.out.println("Spring Bean: found service with name: " + name); - //} // end for - - return javaImplementation.getPropertyMembers(); + /* List<Service> services = javaImplementation.getServices(); + for (Service service : services) { + String name = service.getName(); + System.out.println("Spring Bean: found service with name: " + name); + } // end for */ + + return javaImplementation; } // end method introspectBean |