I've executed the program and now is right!!!. However now I have another
problem if I executed this source code, the system tells me that the
transaction is still active, for the second getUser. I'm using Junit perhaps
is for this?.

public void test3UserFindById() {

        try {
            UserInfo user =
com.admin.waves.persistence.businesstier.UserService
                    .getUser(userID);
            assertNotNull(user);

        } catch (ServiceException e) {
            fail(e.getMessage());
        }


        try {
            UserInfo user =
com.admin.waves.persistence.businesstier.UserService
                    .getUser(userID);
            assertNotNull(user);

        } catch (ServiceException e) {
            fail(e.getMessage());
        }
    }

Thanks.

2010/7/12 boustanihani <boustanih...@googlemail.com>

> Yes indeed, here is the error ... the PersistenceManagerFactory should
> be the singleton not the PersistenceManager. Managers should be
> created and ended each time data-access is needed!
>
> After u close a PersistenceManager u may not reuse it again ... and
> this is what was happening because your PersistenceManagerHelper was
> always returning the same instance! Let it always return a new
> PersistenceManager and your code will work!
>
> See =>
>
> http://db.apache.org/jdo/api22/apidocs/javax/jdo/PersistenceManager.html#close()<http://db.apache.org/jdo/api22/apidocs/javax/jdo/PersistenceManager.html#close%28%29>
>
> regards
> Hani
>
> --
> You received this message because you are subscribed to the Google Groups
> "Google App Engine for Java" group.
> To post to this group, send email to
> google-appengine-j...@googlegroups.com.
> To unsubscribe from this group, send email to
> google-appengine-java+unsubscr...@googlegroups.com<google-appengine-java%2bunsubscr...@googlegroups.com>
> .
> For more options, visit this group at
> http://groups.google.com/group/google-appengine-java?hl=en.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine for Java" group.
To post to this group, send email to google-appengine-j...@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine-java+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en.

Reply via email to