[appengine-java] Re: Object manager has been closed (GAE with Spring)

2009-08-24 Thread objectuser

For a general solution (that will work it tests and outside of
tests ... and you might want to verify that the
OpenPersistenceManagerInViewFilter will work on the GAE host), you'll
likely need to look into "fetch groups".

On Aug 24, 12:50 pm, randal  wrote:
> On Aug 25, 1:44 am, objectuser  wrote:
>
> > +1 to Wagner for a better way of determining the issue. :)
>
> Yeah, that pretty much says it. If I'm not mistaken, JdoTemplate takes
> the persistence manager from the OpenPersistenceManagerInViewFilter,
> or any existing transaction. I'll check on this.
--~--~-~--~~~---~--~~
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-java@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
-~--~~~~--~~--~--~---



[appengine-java] Re: Object manager has been closed (GAE with Spring)

2009-08-24 Thread randal

On Aug 25, 1:44 am, objectuser  wrote:
> +1 to Wagner for a better way of determining the issue. :)

Yeah, that pretty much says it. If I'm not mistaken, JdoTemplate takes
the persistence manager from the OpenPersistenceManagerInViewFilter,
or any existing transaction. I'll check on this.
--~--~-~--~~~---~--~~
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-java@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
-~--~~~~--~~--~--~---



[appengine-java] Re: Object manager has been closed (GAE with Spring)

2009-08-24 Thread objectuser

+1 to Wagner for a better way of determining the issue. :)

On Aug 24, 12:25 pm, Wagner Aioffi  wrote:
> Hi,
>
> I got the same exception using the persistence manager (jpa) outside a
> spring transaction.
> Is it your case?
>
> W.
>
> 2009/8/24 randal 
>
>
>
> > On Aug 24, 4:44 am, objectuser  wrote:
> > > Do you get it when you're trying to walk the graph on an object?  If
> > > you add that property to the defaultFetchGroup does it fix it?
>
> > I'm not sure I got that. What I do with the test, I call on a DAO
> > object that uses JdoTemplate to accomplish its task. Then, I invoke a
> > JdoTemplate from within my test case built around the same
> > PersistenceManagerFactory to help me check on the side effects of the
> > data access method I'm testing--asserting states, etc.
--~--~-~--~~~---~--~~
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-java@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
-~--~~~~--~~--~--~---



[appengine-java] Re: Object manager has been closed (GAE with Spring)

2009-08-24 Thread Wagner Aioffi
Hi,

I got the same exception using the persistence manager (jpa) outside a
spring transaction.
Is it your case?

W.


2009/8/24 randal 

>
> On Aug 24, 4:44 am, objectuser  wrote:
> > Do you get it when you're trying to walk the graph on an object?  If
> > you add that property to the defaultFetchGroup does it fix it?
>
> I'm not sure I got that. What I do with the test, I call on a DAO
> object that uses JdoTemplate to accomplish its task. Then, I invoke a
> JdoTemplate from within my test case built around the same
> PersistenceManagerFactory to help me check on the side effects of the
> data access method I'm testing--asserting states, etc.
> >
>

--~--~-~--~~~---~--~~
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-java@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
-~--~~~~--~~--~--~---



[appengine-java] Re: Object manager has been closed (GAE with Spring)

2009-08-24 Thread randal

On Aug 24, 4:44 am, objectuser  wrote:
> Do you get it when you're trying to walk the graph on an object?  If
> you add that property to the defaultFetchGroup does it fix it?

I'm not sure I got that. What I do with the test, I call on a DAO
object that uses JdoTemplate to accomplish its task. Then, I invoke a
JdoTemplate from within my test case built around the same
PersistenceManagerFactory to help me check on the side effects of the
data access method I'm testing--asserting states, etc.
--~--~-~--~~~---~--~~
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-java@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
-~--~~~~--~~--~--~---



[appengine-java] Re: Object manager has been closed (GAE with Spring)

2009-08-23 Thread objectuser

Do you get it when you're trying to walk the graph on an object?  If
you add that property to the defaultFetchGroup does it fix it?

On Aug 22, 11:37 pm, randal  wrote:
> Hello.
>
> I'm using Spring's JDO support. My data access classes are
> JdoDaoSupport classes. I've encountered the exception that says
> 'object manager has been closed' a couple of times now. Once when I
> was trying to run my app on GAE. Since it's a JEE Web app, I just used
> the OpenPersistenceManagerInViewFilter and then everything went fine.
> I'm not really sure why it's happening but I can only guess that the
> JdoTemplate may be doing something with the persistence manager.
>
> Now, I'm trying to create tests for my DAO classes following the
> updates for GAE 1.2.2 and every time I run my tests, I get the said
> exception. Since the tests won't be running in a JEE Web app
> environment, I won't be able to use the filter that leaves the 'object
> manager'--whatever it is--open.
>
> Can anyone explain why this is happening and how I'd be able to make
> my tests work?
>
> Thanks.
--~--~-~--~~~---~--~~
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-java@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
-~--~~~~--~~--~--~---