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/09 11:31:50 UTC
[jira] Updated: (TUSCANY-2911) Non supported implicit references in
Spring application context
[ https://issues.apache.org/jira/browse/TUSCANY-2911?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Ramkumar Ramalingam updated TUSCANY-2911:
-----------------------------------------
Description:
Here are few scenarios where the implicit references/properties does not work in Tuscany.....
Scenario 1: (For contructor-arg elements whose type attribute is absent)
<constructor-arg><ref bean="savingsAccountService"/></constructor-arg>
<constructor-arg><ref bean="stockAccountService"/></constructor-arg>
Scenario 2: (Injection through Collections)
<bean id="moreComplexObject" class="example.ComplexObject">
<!-- results in a setAdminEmails(java.util.Properties) call -->
<property name="adminEmails">
<props>
<prop key="administrator">administrator@example.org</prop>
<prop key="support">support@example.org</prop>
<prop key="development">development@example.org</prop>
</props>
</property>
<!-- results in a setSomeList(java.util.List) call -->
<property name="someList">
<list>
<value>a list element followed by a reference</value>
<ref bean="myDataSource" />
</list>
</property>
<!-- results in a setSomeMap(java.util.Map) call -->
<property name="someMap">
<map>
<entry>
<key>
<value>an entry</value>
</key>
<value>just some string</value>
</entry>
<entry>
<key>
<value>a ref</value>
</key>
<ref bean="myDataSource" />
</entry>
</map>
</property>
<!-- results in a setSomeSet(java.util.Set) call -->
<property name="someSet">
<set>
<value>just some string</value>
<ref bean="myDataSource" />
</set>
</property>
</bean>
was:
As of today, references/properties for constructor-arg elements are supported only when the sca references/propertues are explicitly
specified using <sca:reference/> OR <sca:property/> tags.
Needs support for mapping references and properties of constructor-arg element in the absence of explicit <sca:reference/> OR <sca:property/> tags,
but with the help of type attribute declared in constructor-arg element as shown below...
<constructor-arg type="bigbank.account.savings.SavingsAccountService"><ref bean="savingsAccountService"/></constructor-arg>
<constructor-arg type="bigbank.account.stock.StockAccountService"><ref bean="stockAccountService"/></constructor-arg>
Summary: Non supported implicit references in Spring application context (was: Mapping references with constructor-arg type attribute)
> Non supported implicit references in Spring application context
> ---------------------------------------------------------------
>
> Key: TUSCANY-2911
> URL: https://issues.apache.org/jira/browse/TUSCANY-2911
> Project: Tuscany
> Issue Type: Bug
> Components: Java SCA Spring Implementation Extension
> Affects Versions: Java-SCA-Next
> Environment: Windows XP, SP2, IBM JDK 1.5
> Reporter: Ramkumar Ramalingam
> Assignee: Ramkumar Ramalingam
> Fix For: Java-SCA-Next
>
>
> Here are few scenarios where the implicit references/properties does not work in Tuscany.....
> Scenario 1: (For contructor-arg elements whose type attribute is absent)
> <constructor-arg><ref bean="savingsAccountService"/></constructor-arg>
> <constructor-arg><ref bean="stockAccountService"/></constructor-arg>
> Scenario 2: (Injection through Collections)
> <bean id="moreComplexObject" class="example.ComplexObject">
> <!-- results in a setAdminEmails(java.util.Properties) call -->
> <property name="adminEmails">
> <props>
> <prop key="administrator">administrator@example.org</prop>
> <prop key="support">support@example.org</prop>
> <prop key="development">development@example.org</prop>
> </props>
> </property>
> <!-- results in a setSomeList(java.util.List) call -->
> <property name="someList">
> <list>
> <value>a list element followed by a reference</value>
> <ref bean="myDataSource" />
> </list>
> </property>
> <!-- results in a setSomeMap(java.util.Map) call -->
> <property name="someMap">
> <map>
> <entry>
> <key>
> <value>an entry</value>
> </key>
> <value>just some string</value>
> </entry>
> <entry>
> <key>
> <value>a ref</value>
> </key>
> <ref bean="myDataSource" />
> </entry>
> </map>
> </property>
> <!-- results in a setSomeSet(java.util.Set) call -->
> <property name="someSet">
> <set>
> <value>just some string</value>
> <ref bean="myDataSource" />
> </set>
> </property>
> </bean>
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.