I see, yes, that could explain it as Spring is creating proxies all over the
place to make some of the annotations work. However I am not doing anything
in the constructors, but for instance, if I set a property on a backing bean
(conversation.access scope), when I click on a button that value seems to
have been lost, as if I was accessing another object... probably something
to do with proxies as well and orchestra?

Thanks!

Bruno

On 1 July 2010 13:22, Mark Struberg <strub...@yahoo.de> wrote:

> Hi Bruno!
>
> > First, could someone explain me why the
> > beans constructor
> is called multiple times?
>
> What you see might  be an effect of proxies.
> Usually if a subclassing proxy gets initialised, the constructor of the
> proxied class gets called.
> This is the reason why it's not suggested to use constructors for
> initialisations at all but instead use
> @PostConstruct (resp @PreDestroy instead of finalize)
>
> LieGrue,
> strub
>
>
> ----- Original Message ----
> > From: brunoaranda <brunoara...@gmail.com>
> > To: MyFaces Discussion <users@myfaces.apache.org>
> > Sent: Thu, July 1, 2010 12:55:30 PM
> > Subject: Problems with orchestra and JSF 2
> >
> > Hi,
>
> I am having some troubles with orchestra maintaining some beans
> > in
> "conversation access" scope. First, could someone explain me why the
> > beans
> constructor is called multiple times? In my app I have multiple beans
> > with
> the same conversation name and when I access one of the other beans from
> > my
> bean, it seems as it is picking a new instance. The same scenario works
> > fine
> using "session" beans, but of course then I lose all the nice
> > transaction
> management from Orchestra. Anyone with an idea where I can I
> > look? How is
> people dealing with JPA and transactions scoping multiple
> > requests in JSF 2?
>
> I am having another issue as well. Even if I have one
> > bean, the data seems
> not to be in the model when I click on a button that
> > invokes a method in
> that bean. For this specific case, I have a
> > <f:metadata> section with a
> viewParam. I can see the param being set in
> > the update model phase, but the
> bean's existing data seems to be lost? For
> > sure, I must be doing something
> wrong but I am unable to see
> > what.
>
> Thanks!
>
> Bruno
>
>
>
>

Reply via email to