This section outlines the steps needed to prepare our project to use MyFaces Orchestra. This involves changing the structure of our application, adding and configuring the Spring framework, and adding the Orchestra libraries.
Orchestra runs in the web application container (the WAR file). To be able to manage transactions in the persistence framework, Orchestra must have access to the persistence classes. (Obviously, this isn’t necessary if we don’t want to use Orchestra’s persistence support.) This means that we can’t put our persistence classes into a separate EJB container. Fortunately, as Orchestra uses Spring, we don’t need an EJB container because Spring is capable of performing the tasks that are typically done by an EJB container. Also, using both Spring and a separate EJB container would make things overly complex.
Of course, putting the persistence and presentation layer in the same container has some down-sides too. For very...