On Thu, 2009-02-12 at 12:39 -0800, Guillaume Bilodeau wrote: > Hi guys, > > I have just started playing with Apache Orchestra and am struggling to find > extensive documentation on the project. Are there any good tutorials out > there? The main web site does give some information but it feels too > general for now since I don't yet have a good understanding of the > framework.
There is a book available ("Myfaces and Facelets") which has a chapter on Orchestra. But there is no online tutorial as far as I know. I'm sorry the intro pages on the Orchestra website don't give you the overview you need. These pages were intended to do that: http://myfaces.apache.org/orchestra/myfaces-orchestra-core/introduction.html http://myfaces.apache.org/orchestra/myfaces-orchestra-core/conversation.html Feel free to ask questions, and when you do figure Orchestra out, please let us know what we should add there! There is an example webapp that demonstrates how to use orchestra. The example apps are a bit rough (not everything works) but the basics are demonstrated. You can download it from svn here: http://svn.apache.org/viewvc/myfaces/orchestra/trunk/examples/ > > Otherwise, I have setup Orchestra to run in my web application and I'm > wondering how to verify if things are working correctly. The first thing I > noticed is that without even declaring any beans of scope conversation.*, > the application URL now has a conversationContext parameter appended to it. > Does this mean that a conversation has been opened or is it just for > internal usage? A context is a "container" for conversations, mainly meant to allow different browser windows to work independently (a real problem with normal JSF). But initially, this "container" is empty, ie no conversations yet exist. > > I have also declared a simple Credentials bean of scope conversation.access > which is bound to a login form and then used by a LoginController bean. > Within the LoginController.login() method, the Credentials bean is correctly > injected and has the right information, but calling > Conversation.getCurrentInstance() returns null. Wasn't a conversation > started when the first lookup to Credentials was done? That call to getCurrentInstance will only work from *within* the Credentials bean. The call returns "the conversation that the caller is in". With Spring or Seam conversations, a request has a conversation. With Orchestra, a *bean* can belong to a conversation. So asking "what is the current conversation" returns null except from within a bean that is of conversation scope. Internally, AOP interceptors are used to set up "the current conversation" when methods on that bean are invoked, and unset it when the method call returns. See the docs on the orchestra website for further details. Regards, Simon