You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tuscany.apache.org by "Ramkumar Ramalingam (JIRA)" <de...@tuscany.apache.org> on 2009/03/03 07:58:56 UTC

[jira] Updated: (TUSCANY-2875) Unannotated spring context's are not interpreted correctly w.r.t references vs properties.

     [ https://issues.apache.org/jira/browse/TUSCANY-2875?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Ramkumar Ramalingam updated TUSCANY-2875:
-----------------------------------------

    Attachment: TUSCANY-2875.patch

> Unannotated spring context's are not interpreted correctly w.r.t references vs properties. 
> -------------------------------------------------------------------------------------------
>
>                 Key: TUSCANY-2875
>                 URL: https://issues.apache.org/jira/browse/TUSCANY-2875
>             Project: Tuscany
>          Issue Type: Bug
>          Components: Java SCA Spring Implementation Extension
>    Affects Versions: Java-SCA-Next
>         Environment: All
>            Reporter: Simon Laws
>            Assignee: Ramkumar Ramalingam
>         Attachments: TUSCANY-2875.patch
>
>
> From this thread (http://www.mail-archive.com/dev@tuscany.apache.org/msg05518.html)
> I'm looking at a Spring based payment component in the travel sample in the sandbox [1] and am having problems in the case where the Spring context and the implementations it references are unannotated.
> I have a bean...
> public class PaymentImpl implements Payment {
>     private CreditCardPayment creditCardPayment;
>     private EmailGateway emailGateway;
>    
>     public void setCreditCardPayment(CreditCardPayment creditCardPayment) {
>         this.creditCardPayment = creditCardPayment;
>     }
>    
>     public void setEmailGateway(EmailGateway emailGateway) {
>         this.emailGateway = emailGateway;
>     }
> a context...
> <beans xmlns="http://www.springframework.org/schema/beans"
>        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>        xmlns:sca="http://www.springframework.org/schema/sca"
>        xsi:schemaLocation="http://www.springframework.org/schema/beans
>                            http://www.springframework.org/schema/beans/spring-beans.xsd">
>     <bean id="Payment" class="payment.PaymentImpl">
>         <property name="creditCardPayment" ref="creditCardPaymentReference"/>
>         <property name="emailGateway" ref="EmailGateway"/>
>     </bean>
>     <bean id="EmailGateway" class="scatours.emailgateway.EmailGatewayImpl">
>     </bean>
>  
> </beans>
> and a composite component...
>     <component name="PaymentComponent">
>         <implementation.spring location="Payment-context.xml"/>
>         <service name="Payment">
>             <interface.wsdl interface="http://www.tuscanyscatours.com/Payment/#wsdl.interface(Payment)" />
>             <binding.ws uri="http://localhost:8080/Payment" wsdlElement="http://www.tuscanyscatours.com/Payment/#wsdl.service(PaymentService)"/>
>         </service>
>         <reference name="creditCardPaymentReference">
>             <binding.ws uri="http://localhost:8081/CreditCardPayment"/>
>         </reference>   
>     </component> 
> Now the introspection that goes on inside SpringXMLComponentTypeLoader [2] struggles as it doesn't have access to the information from the SCDL. It introspects the bean to try and decide which fields shoulf be references and which should be properties and it can't tell the difference. What I think should be happing is that it should be looking back at the component in the SCDL to see what has actually been defined as a reference and what has been defined as a service and using this information to build the component type. However there is a lot of code here so I'm loooking for someone familiar with the implementation.spring code to tell me what I've missed.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.