I have to correct myself on the HelloWorld-Project. It does throw an
exception as expected, I think I had some mistake in my test case the first
time I tried. However, I think i located the problem now:
The sandbox restrictions don't seem to apply while Guice initializes itself
and any servlets. If I have my servlets controlled by Guice and put code
that should normally throw an AccessControlException inside the guice
module's configureServlets() method, or within any of my servlets'
init()-method, it is executed fine. If I bind the servlet using web.xml, the
same init() method throws an exception.
Inside the doPost or doGet-methods of the servlets, the test code always
throws an AccessControlException, regardless of the servlet being set up by
Guice or web.xml.
I think the Guice module code (and the configured servlet's init()-methods)
are executed within the scope of a ServletContextListener, and somehow the
sandbox restrictions are not applied there?
Here's the code I used to check for exceptions - it should normally fail
within the AppEngine sandbox:
new Thread() {
{
run();
}
};
File f;
try {
f = File.createTempFile("foo", "tmp");
f.createNewFile();
f.delete();
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
Should I open a bug report for this? Is it a Guice or an AppEngine-problem?
I can provide my test-case project if needed.
Regards,
Tobias
--
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.