mobilesfeatures / gwtupload

Automatically exported from code.google.com/p/gwtupload
Other
0 stars 0 forks source link

AppEngine detection fails when using Guice #86

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Use one of the gwtupload-gae servlets
2. Bind them to an address using Guice
3. Run in AppEngine development mode

What is the expected output? What do you see instead?
It should detect that it's running on AppEngine, but it does not.
BLOB-STORE-SERVLET: init: maxSize=52428800, slowUploads=0, isAppEngine=false, 
useBlobstore=false

What version of the product are you using? On what operating system?
gwtupload-0.6.3.jar
Google AppEngine 1.4.0
GWT 2.1.1

Please provide any additional information below.
It seems that the AppEngine security restrictions are not properly enforced 
when Guice sets up the servlets. However, gwtupload checks if it can create 
threads and write files to detect AppEngine. Both of these tests succeed when 
the servlets are bound, so it assumes it's not running on AppEngine.

See also https://groups.google.com/d/topic/gwtupload/0xRrdTpnlWc/discussion

Until the problem in AppEngine is resolved, I'd recommend to make AppEngine 
mode configurable by a servlet init parameter.
Another option would be to check for one of environment variables that 
AppEngine sets, as described here:
http://code.google.com/appengine/docs/java/runtime.html#The_Environment

Original issue reported on code.google.com by thaberm...@gmail.com on 3 Jan 2011 at 1:13

GoogleCodeExporter commented 8 years ago

Original comment by manuel.carrasco.m on 7 Feb 2011 at 6:20

GoogleCodeExporter commented 8 years ago

Original comment by manuel.carrasco.m on 7 Feb 2011 at 6:30

GoogleCodeExporter commented 8 years ago
Fixed in r875

Thanks for reporting
- Manolo

Original comment by manuel.carrasco.m on 22 Mar 2011 at 10:40