---- Mario Ivankovits <[EMAIL PROTECTED]> schrieb:
> Hi!
> > Are there any plans about migration over Spring 2.5 in Orchestra?
> Orchestra itself is compatible with Spring 2.5. We use this combination
> in our projects.
> 
> > I'd like to see if Spring 2.5 can simplify orchestra configuration and
> > if we can now completely declare bean throught annotations.
> What enhancement of Spring 2.5 do you mean that might allow this? I even
> didn't have the time to look at the annotations for bean definitions
> (Simon?), though, as far as I know the Spring framework I am pretty sure
> they implemented it in a way that the scope provider do not even know if
> the bean has been configured using the xml config or annotations.
>  

I presume you mean marking beans with something like
 @Conversation(lifetime="access", name="myConversation")
or
 @Scope(scope="conversation.access", name="myConversation")

Yes that would be cool.

It's debatable whether the annotation should be in the Spring framework or in 
Orchestra. 

The first example is the sort of thing that might belong in Orchestra. Support 
would then need to be implemented within orchestra for each DI framework that 
Orchestra supports - assuming the framework provides sufficient hooks to do 
that.

The second example is more spring-specific, as it is tied to the fact that in 
the Orchestra Spring binding, a conversation scope is actually a bean which has 
a name eg "conversation.access".

BTW, we really do need to sort out the problem of defining the 
conversation-name and the lifetime at the same point. It is very convenient for 
the basic case, but when multiple beans are in the same conversation then they 
must declare the same lifetime values which is inelegant (data duplication).

> > And do you think it is possible to have proxy scoped bean using
> > annotation?
> If you use the latest Orchestra snapshot you do not have to use the
> aop:scoped-proxy anymore. This will be done automatically by Orchestra.
> For other proxy scoped beans, Simon tried something in this area, and as
> far as I remember with success. Even though Spring should provide such a
> annotation on their own, we probably can share our code if wanted. It is
> not part of Orchestra.

Yep, marking conversation-scoped beans with the aop:scoped-proxy tag is no 
longer needed in orchestra-1.1-SNAPSHOT. We do have some old code for doing 
that with annotations, though: it is about 20 lines.

Currently the code is in com.ops.OPSJ.spring.ScopedProxy; we could share that 
if needed although I don't think there is much point in making it part of 
Orchestra.

Regards,
Simon

Reply via email to