Kito D. Mann schrieb:
Hey, can anyone tell me how Orchestra compares to Spring-Annotations JSF
module (http://sannotations.sourceforge.net/jsf.html)?
Yes I can...
I was looking into Spring annotations before I began my Orchestra project.
(I am Marios testing guinea pig for orchestra btw...)
Spring annotations is a nice project, which I have high hopes in, and I
would love to see it combined in the long run with orchestra, but it is
somewhat different.
Spring annotations provides annotations for beans, and two custom scopes.
Orchestra does not provide annotations but a custom scope, but that
scope goes way further than what spring annotations currently has.
Spring annotations currently has a scoping system along the lines
of shale dialog.
Orchestra has one which also adds transactional control. Which means,
you can have automatically an Entity manager assigned to your
conversation (via @PersistenceContext or Spring configuration)
and this EM is active as long as the conversation endures.
That means that every object loaded via this entity manager is assigned
to it as long as the scope is active. Connectors currently are provided
for Hibernate and Standard JPA.
Additionally to that Mario recently added code which keeps the number of
connections down on the database side of things. He added a custom
connection proxy which basically tells the orm layer that the connection
is open, but in fact it already is shifted to the pool, once the orm
mapper wants the connection again, it is recoverted. Therefore long
running conversations do not open a lot more connections than classical
crud/request/opensessioninview patterns.
I dont know if this stuff has made it in.
Also AFAIR Mario was working on a flash scope system a while ago it
already should be in (I admit I have never used it so far)
So to sum it up, orchestra is more along the lines of a low level scope
provider with orm control which can be hooked via the spring
conversation systems into higher levels.
Spring conversations just adds long running scopes without any control
on the orm level, but its main area of concern is annotation based
configuration. I would love to see orchestra being used by it, this
would be a match made in heaven.
Werner