persistence@glassfish.java.net

Re: JPA error

From: measwel <marek_karczewski_at_yahoo.com.au>
Date: Sat, 22 Aug 2009 10:12:22 -0700 (PDT)

What is actually happening is this:

In the jsp page I have this for the command button to add a favorite:

        <h:commandButton id="submit"
                         value="Create Favorite"
                         rendered="#{true}"
                         action="#{FavoriteC.addFavorite}">
          <f:setPropertyActionListener target="#{FavoriteC.movie}"
value="#{MovieC.movie}" />
        </h:commandButton>

FavoriteC is the Favorite Controller, MovieC is the movie Controller. It
turns out that MovieC.movie returns null, so he can not set the movie for
the Favorite. Somehow the movie Controller does no longer return the correct
movie. Perhaps it became detached?

Note: the Movie Controller bean is set to session scope, so it should be
there as long as the users session is still active.

If so then:

1) why / when do persistent objects become detached? Is there some kind of
time limit?

Regards,
Marek
-- 
View this message in context: http://www.nabble.com/JPA-error-tp25092854p25095709.html
Sent from the java.net - glassfish persistence mailing list archive at Nabble.com.