I could not see anything in the logs because the default logging for
datanucleus is raised.
Now i have a exception to handle... (below) tnks
Can i use a ThreadLocal to keep the PM for the whole request and close
it in the end, or are there any threading concerns i must be aware of?
INFO: Failed to start reference finalizer thread. Reference cleanup
will only occur when new references are created.
java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke
(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke
(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at com.google.appengine.tools.development.agent.runtime.Runtime.invoke
(Runtime.java:100)
at
com.google.appengine.repackaged.com.google.common.base.FinalizableReferenceQueue.<init>
(FinalizableReferenceQueue.java:124)
at
com.google.appengine.repackaged.com.google.common.labs.misc.InterningPools
$WeakInterningPool.<clinit>(InterningPools.java:104)
at
com.google.appengine.repackaged.com.google.common.labs.misc.InterningPools.newWeakInterningPool
(InterningPools.java:48)
at
com.google.appengine.repackaged.com.google.io.protocol.ProtocolSupport.<clinit>
(ProtocolSupport.java:55)
at com.google.apphosting.api.DatastorePb$Query.<init>
(DatastorePb.java:1072)
at com.google.apphosting.api.DatastorePb$Query$1.<init>
(DatastorePb.java:2355)
at com.google.apphosting.api.DatastorePb$Query.<clinit>
(DatastorePb.java:2355)
at com.google.appengine.api.datastore.QueryTranslator.convertToPb
(QueryTranslator.java:28)
at com.google.appengine.api.datastore.DatastoreServiceImpl
$PreparedQueryImpl.convertToPb(DatastoreServiceImpl.java:382)
at com.google.appengine.api.datastore.DatastoreServiceImpl
$PreparedQueryImpl.runQuery(DatastoreServiceImpl.java:342)
at com.google.appengine.api.datastore.DatastoreServiceImpl
$PreparedQueryImpl.access$100(DatastoreServiceImpl.java:272)
at com.google.appengine.api.datastore.DatastoreServiceImpl
$PreparedQueryImpl$1.iterator(DatastoreServiceImpl.java:306)
at
org.datanucleus.store.appengine.query.RuntimeExceptionWrappingIterable.iterator
(RuntimeExceptionWrappingIterable.java:42)
at org.datanucleus.store.appengine.query.StreamingQueryResult.<init>
(StreamingQueryResult.java:77)
at
org.datanucleus.store.appengine.query.DatastoreQuery.newStreamingQueryResultForEntities
(DatastoreQuery.java:324)
at
org.datanucleus.store.appengine.query.DatastoreQuery.fulfillEntityQuery
(DatastoreQuery.java:310)
at org.datanucleus.store.appengine.query.DatastoreQuery.performExecute
(DatastoreQuery.java:242)
at org.datanucleus.store.appengine.query.JDOQLQuery.performExecute
(JDOQLQuery.java:84)
at org.datanucleus.store.query.Query.executeQuery(Query.java:1489)
at org.datanucleus.store.query.Query.executeWithArray(Query.java:
1371)
at org.datanucleus.jdo.JDOQuery.execute(JDOQuery.java:243)
at br.com.ximp.vike.server.DM.findGame(DM.java:120)
at br.com.ximp.vike.server.DM.process(DM.java:42)
at br.com.ximp.vike.server.MailHandler.process(MailHandler.java:101)
at br.com.ximp.vike.server.MailHandler.doPost(MailHandler.java:70)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:713)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:806)
at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:
487)
at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter
(ServletHandler.java:1093)
at
com.google.apphosting.utils.servlet.TransactionCleanupFilter.doFilter
(TransactionCleanupFilter.java:43)
at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter
(ServletHandler.java:1084)
at com.google.appengine.tools.development.StaticFileFilter.doFilter
(StaticFileFilter.java:121)
at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter
(ServletHandler.java:1084)
at org.mortbay.jetty.servlet.ServletHandler.handle
(ServletHandler.java:360)
at org.mortbay.jetty.security.SecurityHandler.handle
(SecurityHandler.java:216)
at org.mortbay.jetty.servlet.SessionHandler.handle
(SessionHandler.java:181)
at org.mortbay.jetty.handler.ContextHandler.handle
(ContextHandler.java:712)
at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:
405)
at com.google.apphosting.utils.jetty.DevAppEngineWebAppContext.handle
(DevAppEngineWebAppContext.java:54)
at org.mortbay.jetty.handler.HandlerWrapper.handle
(HandlerWrapper.java:139)
at com.google.appengine.tools.development.JettyContainerService
$ApiProxyHandler.handle(JettyContainerService.java:342)
at org.mortbay.jetty.handler.HandlerWrapper.handle
(HandlerWrapper.java:139)
at org.mortbay.jetty.Server.handle(Server.java:313)
at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:
506)
at org.mortbay.jetty.HttpConnection$RequestHandler.content
(HttpConnection.java:844)
at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:644)
at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:211)
at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:381)
at org.mortbay.io.nio.SelectChannelEndPoint.run
(SelectChannelEndPoint.java:396)
at org.mortbay.thread.BoundedThreadPool$PoolThread.run
(BoundedThreadPool.java:442)
Caused by: java.security.AccessControlException: access denied
(java.lang.RuntimePermission modifyThreadGroup)
at java.security.AccessControlContext.checkPermission
(AccessControlContext.java:323)
at java.security.AccessController.checkPermission
(AccessController.java:546)
at java.lang.SecurityManager.checkPermission(SecurityManager.java:
532)
at com.google.appengine.tools.development.DevAppServerFactory
$CustomSecurityManager.checkPermission(DevAppServerFactory.java:151)
at com.google.appengine.tools.development.DevAppServerFactory
$CustomSecurityManager.checkAccess(DevAppServerFactory.java:176)
at java.lang.ThreadGroup.checkAccess(ThreadGroup.java:288)
at java.lang.Thread.init(Thread.java:332)
at java.lang.Thread.<init>(Thread.java:429)
at
com.google.appengine.repackaged.com.google.common.base.internal.Finalizer.<init>
(Finalizer.java:96)
at
com.google.appengine.repackaged.com.google.common.base.internal.Finalizer.startFinalizer
(Finalizer.java:82)
... 55 more
On Oct 30, 11:08 am, datanucleus <[email protected]> wrote:
> > it either saves or silently does nothing. I would like to know if there are
> > any patterns for:
>
> Define "does nothing". The log tells what it does. Why not post it
> here for the operation in question ...
>
> > 1) Creating / closing the PersistenceManager: Should i reuse the
> > PersistenceManager for the whole request? Can i use ThreadLocal to
> > make it available for the request?
>
> A typical pattern for a web-tier is PM per request. Creation of PM is
> not expensive either FWIW
>
> > 2) What influences the JDO? Can i use as many nested objects, methods
> > (instance and static), try catches, as my design wishes?
>
> JDO imposes very little on your code (doesnt persist static/final
> fields but thats all), aka transparent persistence
>
> > 3) Is JDO "usable" at all? Or should i go low-level ?
>
> JDO is obviously usable since there are articles by people using it,
> and articles by Google on their blog about how to handle particular
> features. Depending on what you're doing governs which API you use.
--~--~---------~--~----~------------~-------~--~----~
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 [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/google-appengine-java?hl=en
-~----------~----~----~----~------~----~------~--~---