Currently Tuscany Spring Implementation does not seem to support the
<custructor-arg/> element in the application context XML file.
Here the issue is, Tuscany fails to identify this tag and ignores the
configuration done from these tags.
Spring uses <constructor-arg> element for the following configuration.....
<bean id="beanRefFactory" class="org.springframework.
context.support.ClassPathXmlApplicationContext">
<constructor-arg><list>
<value>Organization-spring-context.xml</value>
</list></constructor-arg>
</bean>
In this instance, it tries to load the SCA aware Spring application context
using ClassPathXmlApplicationContext.
<bean id="orderService" class="com.lizjason.spring.OrderService<javascript:;>
">
<property name="companyName">
<value>lizjason</value>
</property>
<constructor-arg>
<ref bean="orderDAO">
</constructor-arg>
</bean>
I have opened TUSCANY-
On Thu, Sep 11, 2008 at 2:14 PM, Ramkumar R <[EMAIL PROTECTED]> wrote:
> Fixes to TUSCANY-2585 is now available.
>
> Also patches for TUSCANY-2573 is been updated with the latest changes done
> by Mike Edwards for the schema location.
> With this changes, all the schema location for spring sca namespace will
> now be http://www.osoa.org/xmlns/sca/1.0/spring-sca.xsd.
>
>
> On Mon, Sep 8, 2008 at 10:46 PM, Ramkumar R <[EMAIL PROTECTED]> wrote:
>
>> Hi Simon,
>> Thanks for raising this question, I forgot to post the details about it.
>>
>> Well, the issue here is that the current implementation just reads the
>> bean definitions available from the parent application context (in our
>> example bean1 and bean2) and ignores
>> all the bean definitions available from any imported application context
>> using <import/> element.
>>
>>
>> On Mon, Sep 8, 2008 at 5:26 PM, Simon Laws <[EMAIL PROTECTED]>wrote:
>>
>>>
>>>
>>> On Mon, Sep 8, 2008 at 7:29 AM, Ramkumar R <[EMAIL PROTECTED]>wrote:
>>>
>>>> Current Spring Implementation in Tuscany does not seem to support using
>>>> <import/> tag in the application context XML file.
>>>>
>>>> In Spring <import/> element is generally used to load bean definitions
>>>> from another file (or files) as shown below.
>>>>
>>>> <beans>
>>>>
>>>> <import resource="services.xml"/>
>>>> <import resource="resources/messageSource.xml"/>
>>>>
>>>>
>>>>
>>>>
>>>> <import resource="/resources/themeSource.xml"/>
>>>>
>>>> <bean id="bean1" class="..."/>
>>>> <bean id="bean2" class="..."/>
>>>>
>>>> </beans>
>>>>
>>>>
>>>>
>>>> I have raised a JIRA, TUSCANY-2585 to take care of this.
>>>>
>>>>
>>>> On Fri, Sep 5, 2008 at 3:47 PM, Ramkumar R <[EMAIL PROTECTED]>wrote:
>>>>
>>>>> Hi All,
>>>>> Here I like to post the recent improvements/changes happening in Spring
>>>>> Implementation Module.
>>>>>
>>>>> While working with one of the Spring user requirement it was identified
>>>>> that the sca namespace within the spring application context XML file does
>>>>> not get resolved, while the user tries to loads the application context on
>>>>> his own.
>>>>> This issue is being raised as *TUSCANY-2573*.
>>>>>
>>>>> This JIRA is now fixed with the following comments:
>>>>>
>>>>> *For Spring Namespace Issue: *
>>>>> The custom XML tags like <sca:service>, <sca:reference> and
>>>>> <sca:property> and the sca namespace will be supported only when the
>>>>> registered Namespace Handlers are available.
>>>>> Tuscany provides these handlers to resolve the namespace. Hence the
>>>>> current namespace is valid in this scenario.
>>>>>
>>>>> A detailed article on how you would go about writing your own custom
>>>>> XML bean definition parsers and integrating such parsers into the Spring
>>>>> IoC
>>>>> container can be found here....
>>>>>
>>>>> http://static.springframework.org/spring/docs/2.5.x/reference/extensible-xml.html
>>>>>
>>>>> These Namespace Handler were already part of the Tuscany code, and seem
>>>>> to be working only with Tuscany's Custom SCAApplicationContext. But fails
>>>>> to
>>>>> work when the default application context is used to load the XML file.
>>>>> Identified that the issue was with registration of handlers with
>>>>> Spring, the same is now fixed as part of TUSCANY-2573.
>>>>>
>>>>> *For Accessing the Application Context:*
>>>>> A workaround to this problem, which demostrates how the runtime
>>>>> instance of the application context can be accessed and also get access to
>>>>> the beans as shown here.....
>>>>>
>>>>> http://blog.jdevelop.eu/2008/07/06/access-the-spring-applicationcontext-from-everywhere-in-your-application/
>>>>> This solution returns the SCAApplicationContext instance which resolves
>>>>> the namespace for you. The same is demostrated with
>>>>> Spring-bigbank-stockquote sample.
>>>>>
>>>>> --
>>>>> Thanks & Regards,
>>>>> Ramkumar Ramalingam
>>>>>
>>>>
>>>>
>>>>
>>>> --
>>>> Thanks & Regards,
>>>> Ramkumar Ramalingam
>>>>
>>>
>>> Hi,
>>>
>>> When you say that it doesn't support it, what happens when you try to use
>>> <import/> ?
>>>
>>> Simon
>>>
>>
>>
>>
>> --
>> Thanks & Regards,
>> Ramkumar Ramalingam
>>
>
>
>
> --
> Thanks & Regards,
> Ramkumar Ramalingam
>
--
Thanks & Regards,
Ramkumar Ramalingam