[jboss-user] [JBoss Seam] - Re: POJO with conversational scope

joris77 do-not-reply at jboss.com
Thu Mar 29 03:36:47 EDT 2007


Thanks for your reply. I am sorry. I think I haven't been quite clear. 

There is one method with a @Begin anotation (doSomething)  and two methods with an @End annotation. After the @Begin method is called and has returned to the client, the client does a postback (with a h:commandButton) to a method (doAnotherThing) on the bean. The  instance variable person (annotated as an entity) has the value of null in doAnotherThing while it had been set to a non null value in the @Begin annotated method (doSomething).

Like this

  | @Name("depot")
  | @Scope(ScopeType.CONVERSATION)
  | public class Depot {
  | 	@Logger
  | 	private Log log;
  | 	private Person person;
  | ....
  |        @Begin
  |        public void doSomething(){
  |            person = ...;
  |        }
  |        public String doAnotherThing(){
  |            ... = person; // here the value of person is null
  |        }
  |        @End
  |        public void ......
  | ...

This is is logical when I compare this to the logging I get because the POJO is destroyed and recreated. But it doesn't meet my expectations for a conversation scoped component. I expect the component to be stored somewhere over requests.

My most important question is are my expectations correct?


View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4032643#4032643

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4032643

More information about the jboss-user mailing list