You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tuscany.apache.org by "Raymond Feng (JIRA)" <tu...@ws.apache.org> on 2006/05/22 22:08:30 UTC
[jira] Updated: (TUSCANY-415) Add a Spring container to Tuscany so
that Spring beans can be used as an implementation for SCA components
[ http://issues.apache.org/jira/browse/TUSCANY-415?page=all ]
Raymond Feng updated TUSCANY-415:
---------------------------------
Attachment: tuscany-container-spring.zip
Here's a prototype which allows Tuscany consumes components implemented as a Spring bean.
> Add a Spring container to Tuscany so that Spring beans can be used as an implementation for SCA components
> ----------------------------------------------------------------------------------------------------------
>
> Key: TUSCANY-415
> URL: http://issues.apache.org/jira/browse/TUSCANY-415
> Project: Tuscany
> Type: New Feature
> Versions: Java-Mx
> Reporter: Raymond Feng
> Assignee: Raymond Feng
> Fix For: Java-Mx
> Attachments: tuscany-container-spring.zip
>
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-dev-help@ws.apache.org
Re: [jira] Updated: (TUSCANY-415) Add a Spring container to Tuscany so that Spring beans can be used as an implementation for SCA components
Posted by Raymond Feng <en...@gmail.com>.
Hi, Jim.
Thank you for the quick response. You pretty much caught all the fuzzy
things in the prototype:-). Please see my comments below.
Raymond
----- Original Message -----
From: "Jim Marino" <jm...@myromatours.com>
To: <tu...@ws.apache.org>
Sent: Monday, May 22, 2006 2:01 PM
Subject: Re: [jira] Updated: (TUSCANY-415) Add a Spring container to Tuscany
so that Spring beans can be used as an implementation for SCA components
> Hi Raymond,
>
> I took a look at the implementation and have a few observations:
>
> - It appears that a Spring application context is created for each method
> on a bean. Was this intentional, since I would have thought that a Spring
> application context would be created per composite? In other words, for a
> module, there would be one Spring application context with many Spring
> beans in it. This approach would allow an application developer to use
> Spring to wire their beans together. The per method approach won't allow
> for this type of wiring.
>
> - The above also leads to operations being dispatched to different bean
> instances, which complicates Spring semantics since it also has the
> concept of singleton, request and session scopes where operations are
> routed to particular instances.
>
It was NOT intentional. I haven't figured out how Spring utilize the
context/scope by reading the reference document and that's why the prototype
only deals with singleton or per request.
> - I'm not sure we need a component type file (or at least it shouldn't be
> required). I believe most assembly information can be introspected from
> the Spring ApplicationContext, BeanContext, and BeanWrapper.
>
You're right. I copied some code from the Javascript container and wanted to
see the 1st Spring bean to be invoked from Tuscany. The componentType should
be able to introspect from the Spring metadata. One interesting
question: It seems that Spring doesn't require the POJO to have an
interface. Do we want to attach (or dynamically generate) one?
> In the spec group we have started to discuss Spring integration and have
> taken the approach of having a Spring application context modeled as a
> composite. Perhaps we could align around that? I'm happy to help out so
> if you want to commit it to the sandbox we can look at together.
>
Yes, agree.
Meanwhile, I understand you and Jeremy have efforts going on in the sandbox
to define the SPI layer. I think it would be a good excercise to refactor
the prototype on top of the new contract. The prototype can serve as a base
to attract people to make it mature.
> Jim
>
> On May 22, 2006, at 1:08 PM, Raymond Feng (JIRA) wrote:
>
>> [ http://issues.apache.org/jira/browse/TUSCANY-415?page=all ]
>>
>> Raymond Feng updated TUSCANY-415:
>> ---------------------------------
>>
>> Attachment: tuscany-container-spring.zip
>>
>> Here's a prototype which allows Tuscany consumes components implemented
>> as a Spring bean.
>>
>>
>>> Add a Spring container to Tuscany so that Spring beans can be used as
>>> an implementation for SCA components
>>> ---------------------------------------------------------------------
>>> -------------------------------------
>>>
>>> Key: TUSCANY-415
>>> URL: http://issues.apache.org/jira/browse/TUSCANY-415
>>> Project: Tuscany
>>> Type: New Feature
>>>
>>
>>
>>> Versions: Java-Mx
>>> Reporter: Raymond Feng
>>> Assignee: Raymond Feng
>>> Fix For: Java-Mx
>>> Attachments: tuscany-container-spring.zip
>>>
>>>
>>
>>
>> --
>> This message is automatically generated by JIRA.
>> -
>> If you think it was sent incorrectly contact one of the administrators:
>> http://issues.apache.org/jira/secure/Administrators.jspa
>> -
>> For more information on JIRA, see:
>> http://www.atlassian.com/software/jira
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: tuscany-dev-unsubscribe@ws.apache.org
>> For additional commands, e-mail: tuscany-dev-help@ws.apache.org
>>
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tuscany-dev-unsubscribe@ws.apache.org
> For additional commands, e-mail: tuscany-dev-help@ws.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-dev-help@ws.apache.org
Re: [jira] Updated: (TUSCANY-415) Add a Spring container to Tuscany so that Spring beans can be used as an implementation for SCA components
Posted by Jim Marino <jm...@myromatours.com>.
I think we want to target 2.0. Spring 1.0 also supports request-
scoped components - I think you need to look at the TargetSource
implementations for that.
Jim
On May 22, 2006, at 2:27 PM, Raymond Feng wrote:
> Here's an addtional point about the Spring scoping:
>
> In Spring 1.x, it only supports singleton or prototype.
>
> Moving in to 2.0 (not released yet), there're new scopes as quoted
> below.
> ========================================================
> 3.2.3. New bean scopes
> Previous versions of Spring had IoC container level support for
> exactly two distinct bean scopes (singleton and prototype). Spring
> 2.0 improves on this by not only providing a number of additional
> scopes depending on the environment in which Spring is being
> deployed (for example, request and session scoped beans in a web
> environment), but also by providing 'hooks' (for want of a better
> word) so that Spring users can integrate their own scopes with
> (hopefully) a minimum of effort.
>
> It should be noted that although the underlying (and internal)
> implementation for singleton- and prototype-scoped beans has been
> changed, said change is totally transparent to the end user... no
> existing configuration needs to change, and no existing
> configuration will break.
>
> ========================================================
>
> Thanks,
>
> Raymond
>
> ----- Original Message ----- From: "Jim Marino"
> <jm...@myromatours.com>
> To: <tu...@ws.apache.org>
> Sent: Monday, May 22, 2006 2:01 PM
> Subject: Re: [jira] Updated: (TUSCANY-415) Add a Spring container
> to Tuscany so that Spring beans can be used as an implementation
> for SCA components
>
>
>
>> Hi Raymond,
>>
>> I took a look at the implementation and have a few observations:
>>
>> - It appears that a Spring application context is created for
>> each method on a bean. Was this intentional, since I would have
>> thought that a Spring application context would be created per
>> composite? In other words, for a module, there would be one
>> Spring application context with many Spring beans in it. This
>> approach would allow an application developer to use Spring to
>> wire their beans together. The per method approach won't allow
>> for this type of wiring.
>>
>> - The above also leads to operations being dispatched to
>> different bean instances, which complicates Spring semantics
>> since it also has the concept of singleton, request and session
>> scopes where operations are routed to particular instances.
>>
>> - I'm not sure we need a component type file (or at least it
>> shouldn't be required). I believe most assembly information can
>> be introspected from the Spring ApplicationContext, BeanContext,
>> and BeanWrapper.
>>
>> In the spec group we have started to discuss Spring integration
>> and have taken the approach of having a Spring application
>> context modeled as a composite. Perhaps we could align around
>> that? I'm happy to help out so if you want to commit it to the
>> sandbox we can look at together.
>>
>> Jim
>>
>> On May 22, 2006, at 1:08 PM, Raymond Feng (JIRA) wrote:
>>
>>
>>> [ http://issues.apache.org/jira/browse/TUSCANY-415?page=all ]
>>>
>>> Raymond Feng updated TUSCANY-415:
>>> ---------------------------------
>>>
>>> Attachment: tuscany-container-spring.zip
>>>
>>> Here's a prototype which allows Tuscany consumes components
>>> implemented as a Spring bean.
>>>
>>>
>>>
>>>> Add a Spring container to Tuscany so that Spring beans can be
>>>> used as an implementation for SCA components
>>>> -------------------------------------------------------------------
>>>> -- -------------------------------------
>>>>
>>>> Key: TUSCANY-415
>>>> URL: http://issues.apache.org/jira/browse/TUSCANY-415
>>>> Project: Tuscany
>>>> Type: New Feature
>>>>
>>>>
>>>
>>>
>>>
>>>> Versions: Java-Mx
>>>> Reporter: Raymond Feng
>>>> Assignee: Raymond Feng
>>>> Fix For: Java-Mx
>>>> Attachments: tuscany-container-spring.zip
>>>>
>>>>
>>>>
>>>
>>>
>>> --
>>> This message is automatically generated by JIRA.
>>> -
>>> If you think it was sent incorrectly contact one of the
>>> administrators:
>>> http://issues.apache.org/jira/secure/Administrators.jspa
>>> -
>>> For more information on JIRA, see:
>>> http://www.atlassian.com/software/jira
>>>
>>>
>>> --------------------------------------------------------------------
>>> -
>>> To unsubscribe, e-mail: tuscany-dev-unsubscribe@ws.apache.org
>>> For additional commands, e-mail: tuscany-dev-help@ws.apache.org
>>>
>>>
>>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: tuscany-dev-unsubscribe@ws.apache.org
>> For additional commands, e-mail: tuscany-dev-help@ws.apache.org
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tuscany-dev-unsubscribe@ws.apache.org
> For additional commands, e-mail: tuscany-dev-help@ws.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-dev-help@ws.apache.org
Re: [jira] Updated: (TUSCANY-415) Add a Spring container to Tuscany so that Spring beans can be used as an implementation for SCA components
Posted by Raymond Feng <en...@gmail.com>.
Here's an addtional point about the Spring scoping:
In Spring 1.x, it only supports singleton or prototype.
Moving in to 2.0 (not released yet), there're new scopes as quoted below.
========================================================
3.2.3. New bean scopes
Previous versions of Spring had IoC container level support for exactly two
distinct bean scopes (singleton and prototype). Spring 2.0 improves on this
by not only providing a number of additional scopes depending on the
environment in which Spring is being deployed (for example, request and
session scoped beans in a web environment), but also by providing 'hooks'
(for want of a better word) so that Spring users can integrate their own
scopes with (hopefully) a minimum of effort.
It should be noted that although the underlying (and internal)
implementation for singleton- and prototype-scoped beans has been changed,
said change is totally transparent to the end user... no existing
configuration needs to change, and no existing configuration will break.
========================================================
Thanks,
Raymond
----- Original Message -----
From: "Jim Marino" <jm...@myromatours.com>
To: <tu...@ws.apache.org>
Sent: Monday, May 22, 2006 2:01 PM
Subject: Re: [jira] Updated: (TUSCANY-415) Add a Spring container to Tuscany
so that Spring beans can be used as an implementation for SCA components
> Hi Raymond,
>
> I took a look at the implementation and have a few observations:
>
> - It appears that a Spring application context is created for each method
> on a bean. Was this intentional, since I would have thought that a Spring
> application context would be created per composite? In other words, for a
> module, there would be one Spring application context with many Spring
> beans in it. This approach would allow an application developer to use
> Spring to wire their beans together. The per method approach won't allow
> for this type of wiring.
>
> - The above also leads to operations being dispatched to different bean
> instances, which complicates Spring semantics since it also has the
> concept of singleton, request and session scopes where operations are
> routed to particular instances.
>
> - I'm not sure we need a component type file (or at least it shouldn't be
> required). I believe most assembly information can be introspected from
> the Spring ApplicationContext, BeanContext, and BeanWrapper.
>
> In the spec group we have started to discuss Spring integration and have
> taken the approach of having a Spring application context modeled as a
> composite. Perhaps we could align around that? I'm happy to help out so
> if you want to commit it to the sandbox we can look at together.
>
> Jim
>
> On May 22, 2006, at 1:08 PM, Raymond Feng (JIRA) wrote:
>
>> [ http://issues.apache.org/jira/browse/TUSCANY-415?page=all ]
>>
>> Raymond Feng updated TUSCANY-415:
>> ---------------------------------
>>
>> Attachment: tuscany-container-spring.zip
>>
>> Here's a prototype which allows Tuscany consumes components implemented
>> as a Spring bean.
>>
>>
>>> Add a Spring container to Tuscany so that Spring beans can be used as
>>> an implementation for SCA components
>>> ---------------------------------------------------------------------
>>> -------------------------------------
>>>
>>> Key: TUSCANY-415
>>> URL: http://issues.apache.org/jira/browse/TUSCANY-415
>>> Project: Tuscany
>>> Type: New Feature
>>>
>>
>>
>>> Versions: Java-Mx
>>> Reporter: Raymond Feng
>>> Assignee: Raymond Feng
>>> Fix For: Java-Mx
>>> Attachments: tuscany-container-spring.zip
>>>
>>>
>>
>>
>> --
>> This message is automatically generated by JIRA.
>> -
>> If you think it was sent incorrectly contact one of the administrators:
>> http://issues.apache.org/jira/secure/Administrators.jspa
>> -
>> For more information on JIRA, see:
>> http://www.atlassian.com/software/jira
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: tuscany-dev-unsubscribe@ws.apache.org
>> For additional commands, e-mail: tuscany-dev-help@ws.apache.org
>>
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tuscany-dev-unsubscribe@ws.apache.org
> For additional commands, e-mail: tuscany-dev-help@ws.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-dev-help@ws.apache.org
Re: [jira] Updated: (TUSCANY-415) Add a Spring container to Tuscany so that Spring beans can be used as an implementation for SCA components
Posted by Jim Marino <jm...@myromatours.com>.
Hi Raymond,
I took a look at the implementation and have a few observations:
- It appears that a Spring application context is created for each
method on a bean. Was this intentional, since I would have thought
that a Spring application context would be created per composite? In
other words, for a module, there would be one Spring application
context with many Spring beans in it. This approach would allow an
application developer to use Spring to wire their beans together. The
per method approach won't allow for this type of wiring.
- The above also leads to operations being dispatched to different
bean instances, which complicates Spring semantics since it also has
the concept of singleton, request and session scopes where operations
are routed to particular instances.
- I'm not sure we need a component type file (or at least it
shouldn't be required). I believe most assembly information can be
introspected from the Spring ApplicationContext, BeanContext, and
BeanWrapper.
In the spec group we have started to discuss Spring integration and
have taken the approach of having a Spring application context
modeled as a composite. Perhaps we could align around that? I'm happy
to help out so if you want to commit it to the sandbox we can look at
together.
Jim
On May 22, 2006, at 1:08 PM, Raymond Feng (JIRA) wrote:
> [ http://issues.apache.org/jira/browse/TUSCANY-415?page=all ]
>
> Raymond Feng updated TUSCANY-415:
> ---------------------------------
>
> Attachment: tuscany-container-spring.zip
>
> Here's a prototype which allows Tuscany consumes components
> implemented as a Spring bean.
>
>
>> Add a Spring container to Tuscany so that Spring beans can be used
>> as an implementation for SCA components
>> ---------------------------------------------------------------------
>> -------------------------------------
>>
>> Key: TUSCANY-415
>> URL: http://issues.apache.org/jira/browse/TUSCANY-415
>> Project: Tuscany
>> Type: New Feature
>>
>
>
>> Versions: Java-Mx
>> Reporter: Raymond Feng
>> Assignee: Raymond Feng
>> Fix For: Java-Mx
>> Attachments: tuscany-container-spring.zip
>>
>>
>
>
> --
> This message is automatically generated by JIRA.
> -
> If you think it was sent incorrectly contact one of the
> administrators:
> http://issues.apache.org/jira/secure/Administrators.jspa
> -
> For more information on JIRA, see:
> http://www.atlassian.com/software/jira
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tuscany-dev-unsubscribe@ws.apache.org
> For additional commands, e-mail: tuscany-dev-help@ws.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-dev-help@ws.apache.org