Yes, I totally agree that the current official way of checking for App Engine presence is not great for third party libraries which don't even necessarily run in a servlet container. We've been putting together a solution for this and hope to make it available soon.
On Thu, Dec 3, 2009 at 1:15 PM, Jeff Schnitzer <lhori...@gmail.com> wrote: > Why isn't there a system property that can be used to detect if a > program is running on appengine? > > This is really a glaring oversight. I would expect something like > System.getProperty("google.appengine") to be "development" or > "production" (or of course null). > > Before someone says "check the servlet context", realize that this is > grossly inadequate - library writers do not have access to the servlet > context. > > I'm trying to get the Hessian RPC library working on appengine so we > have an easy-to-use web services protocol. One of the first things > the hessian java client does is teardown any keepalive connections by > making a quick request expired at 10ms. This terminates with a caught > IOException in the normal world, but produces an > ApiDeadlineExceededException in appengine. > > I'd like to simply short-circuit this unnecessary behavior when > running on appengine. I found the SecurityManager check but that > seems unreliable. Why isn't there a nice easy system property? > > Thanks, > Jeff > > -- > > 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.