|
From: <jue...@we...> - 2003-10-09 16:35:24
|
Not yet. Maybe Mike can comment on a timeframe, although Jason might be =
the one that actually works on it. Note that this plan is not fixed at =
all; currently, XWork has its own enable-interface-centric simple IoC =
support. I'm just "consulting" on this issue; Mike, Jason, and the other =
XWork guys will have to decide on what to adopt in the end.
Juergen
-----Original Message-----
From: Matthew E. Porter [mailto:ma...@me...]
Sent: Thursday, October 09, 2003 6:31 PM
To: j=FCrgen h=F6ller [werk3AT]
Cc: spr...@li...;
spr...@li...
Subject: Re: [Springframework-user] Introduction and Hibernate-Spring
queries
Has any work (i.e. code) been done on this?
Cheers,
matthew
On Thursday, October 9, 2003, at 11:15 AM, j=FCrgen h=F6ller [werk3AT]=20
wrote:
> Matthew, everybody,
>
> My XWork/Spring integration proposal is no secret -- here it is, cut=20
> from a recent mail to Jason and Mike. We've been discussing IoC=20
> options for XWork/Conductor for quite a while, mainly in terms of=20
> PicoContainer vs Spring.
>
> <quote>
>
> As far as I see, the XWork config file supports setting bean=20
> properties as parameters on actions like this:
>
> <action name=3D"Bar" class=3D"com.opensymphony.xwork.SimpleAction">
> <param name=3D"foo">17</param>
> <param name=3D"bar">23</param>
> </action>
>
> This is obviously pretty similar to a Spring bean definition, just=20
> specific for a WebWork action. A significant difference is that the=20
> Spring property tag can tag either a value tag or a ref tag within,=20
> i.e. either specify a parameter value or a=B4dependency on another =
bean.
>
> Currently, I see the easiest way of accessing a Spring context from=20
> XWork via a tag that resolves an external component reference, a la:
>
> <action name=3D"Bar" class=3D"com.opensymphony.xwork.SimpleAction">
> <param name=3D"foo">17</param>
> <external-ref name=3D"bar">myDataSource</external-ref>
> </action>
>
> XWork could fetch the Spring context then, look up the bean named=20
> "myDataSource", and set the reference into the "bar" bean property of=20
> the "Bar" action. This would be intuitive, as it works analogously to=20
> setting a parameter value, and flexible, as it allows to reference any =
> specific instance. Effectively, you would be accessing beans in a=20
> Spring middle tier context rather than letting Spring touch your=20
> action instances - but that's not a disadvantage, rather a clean=20
> separation of responsibilities.
>
> Of course, the Spring support for such external references can be=20
> pluggable in XWork, potentially replacing the current ComponentManager =
> mechanism with its enabler interfaces. Any such resolver for external=20
> references would simply need to return an object for the given=20
> symbolic name. The interface could look like this:
>
> public interface ExternalReferenceResolver {
> Object resolveReference(String name);
> }
>
> A Spring implementation would grab a reference to the Spring=20
> application context and call getBean with the given name. The=20
> application context itself could get initialized on XWork startup,=20
> initializing its singletons upfront. I consider such an XWork/Spring=20
> integration as pretty simple but very powerful: no enabler interfaces, =
> just bean properties with component types, and an external-ref tag in=20
> addition to the param tag.
>
> </quote>
>
> Juergen
>
>
> -----Original Message-----
> From: Matthew E. Porter [mailto:ma...@me...]
> Sent: Thursday, October 09, 2003 4:16 PM
> To: j=FCrgen h=F6ller [werk3AT]
> Subject: Re: [Springframework-user] Introduction and Hibernate-Spring
> queries
>
>
>>
>> Throwing in Spring as middle tier glue is a good idea, of course :-)
>> Have you already thought about my proposal regarding XWork/Spring
>> integration from some days ago? Finally, we're of course open for any
>> suggestions and enhancement requests on the Spring side of things!
>>
>
> I this proposal in the public space. I would also like to see
> XW/WW2-Spring integration in the near term future.
>
>
> Cheers,
> matthew
>
|