Announcing Apache Orchestra, JSF conversation scope without Seam
Apache Orchestra was released Oct. 2007 without much fanfare. The announcement simply stated: "Apache MyFaces Orchestra is a library which introduce a new scope called 'conversation scope' to your web based application which will help you alot (sic) building applications using ORM by avoiding exceptions like LazyInitializationException."
Orchestra builds on top of Spring's support for scopes to build the new conversation scope. It seems you can create an extended persistence context to avoid LazyInitializationException and such. According to the site, Orchestra works with TopLink and OpenJPA as well. There is a small code example here.
There are some who find JBoss Seam a bit much to swallow and use Apache Orchestra to fill in some of the gaps. For others Orchestra builds on top of their investment in JSF and Spring without including yet another framework.
Last March we were deciding whether or not to use JSF and Seam for a project. The head architect decided on JPA, JSF and Spring, but decided to only use Seam later if we really needed it as we already had a lot to digest.
Now we have a few use cases where we could really use a conversation scope. Shortly, we have to decide on whether we should use Orchestra or Seam. We already use JSF, Spring, and JPA. Any suggestions?
What has been your experience with Apache Orchestra? When would Apache Orchestra not fit and the project need the full power of Seam? When could you get away with just Apache Orchestra? Does Seam make sense for a Spring shop?
Related post:
Seam 2.0.1 released, Is Seam or Spring the best way to write JSF/JPA based applications?
| rick hightower | cto of arcMind | blog |
- Login or register to post comments
- 3234 reads
- Flag as offensive
- Email this Story
- Printer-friendly version
(Note: Opinions expressed in this article and its replies are the opinions of their respective authors and not those of DZone, Inc.)








Comments
Rainer Eschen replied on Wed, 2008/02/20 - 5:44pm
Using your Crank in a BO/DAO context we also get LazyInitializationException from time to time. We already have workarounds for this through explicit loading of POJOs.
Having a look at the example at the Orchestra homepage for me this is a lift up of the transactions from the BOs into the presentation layer. I wonder if this is really an advantage or merely a violation of "separation of concerns"?
Jeremy Grelle replied on Thu, 2008/02/21 - 11:53am
While I do think Orchestra is a nice implementation of the extended persistence context pattern for Spring + JSF, I would like to point out another candidate to the list of alternatives to Seam for developers who are more comfortable with Spring.
We (the Spring team) actually feel that Spring Web Flow 2.0, with its upcoming RC1 release, is the optimal solution for using the extended persistence context pattern with JSF, and for Spring + JSF development in general, especially with the addition in SWF 2.0 of the Spring Faces module. SWF 2.0 has support for a flow-managed persistence context using either standard JPA (not using any Hibernate-specific extensions) or native Hibernate. SWF 2.0 does also provide custom Spring 2.x scopes so that Spring beans can be defined with the SWF-specific flash, flow, and conversation scopes. Spring Faces started as a completely fresh take on the integration between SWF and JSF, and has further evolved to include a large number of additional features to make JSF development in a Spring environment feel easier and more natural. Keep an eye out for the RC1 release as there will be a lot more information to follow.
Rick Hightower replied on Thu, 2008/02/21 - 1:56pm
in response to: jeremyg484
Shay Shmeltzer replied on Thu, 2008/02/21 - 2:10pm
One more option that will let you achieve a process type of scope is to use the Apache Trinidad components (or the Oracla ADF Faces components).
While Trinidad is mostly knows for the fact that it offers over a 100 JSF components, it also comes with some core framework capabilities. And one of those is the process scope which is called pageFlowScope in Trinidad.
See the documentation here - part of the Trinidad Developer Guide.
Jim Hazen replied on Thu, 2008/02/21 - 10:58pm
Seam doesn't have the following limitation.
Just browsing the Orchestra docs briefly...
Seam appears to support a few more things Orchestra doesn't:
And of course there are more reasons to try Seam than just conversations. With Seam's transparent Spring support you don't have to choose Seam or Spring. If you've already started with Spring, try rolling in some Seam. If you want to use Orchestra or SWF later on you're free to mix those in as well.
Rick Hightower replied on Sat, 2008/02/23 - 3:40am
in response to: jimhazen2000
As always Jim... it is good to hear from a good friend. Thanks for the info on Seam. Seams seems to have quite a lot of features. There is a lot to learn. How easy is it to work with Seam and Spring? In your opinion....
Seam adoption is a bit weaker than I would imagine. Do you suppose it is becuase... early on Seam hitched their wagon to EJB3 and was sort of billed as the anit-Spring? It seems at first it did not have much support for Spring.
Seam is a little long in the tooth not to get more job demand. In fact, you can almost attribute its real growth to when is added support for Spring. (Just an opinion...) So now that it has support for Spring.... I guess there is nothing holding me back...
I am glad it has solid integration with Spring. I know we are running into some use cases where Seam, Orchestra or possibly SWF could help out. My brain is already full with JSF, JPA and Spring... one more framework and it will implode.... just another thin mint.
Rick Hightower replied on Sat, 2008/02/23 - 3:47am
in response to: rainwebs