Google App Engine modifyThreadGroup problem
Posted
by Frank
on Stack Overflow
See other posts from Stack Overflow
or by Frank
Published on 2010-04-25T15:54:55Z
Indexed on
2010/04/25
16:03 UTC
Read the original article
Hit count: 334
google-app-engine
|modifythreadgroup
I'm using Google App Engine to process Paypal IPN messages, when my servlet starts I use the following lines to start another process to process massages :
public class PayPal_Monitor_Servlet extends HttpServlet
{
PayPal_Message_To_License_File_Worker PayPal_message_to_license_file_worker;
public void init(ServletConfig config) throws ServletException // Initializes the servlet.
{
super.init(config);
PayPal_message_to_license_file_worker=new PayPal_Message_To_License_File_Worker();
}
public void doGet(HttpServletRequest request,HttpServletResponse response) throws IOException
{
}
...
}
public class PayPal_Message_To_License_File_Worker implements Runnable
{
static Thread PayPal_Message_To_License_File_Thread;
...
PayPal_Message_To_License_File_Worker()
{
start();
}
void start()
{
if (PayPal_Message_To_License_File_Thread==null)
{
PayPal_Message_To_License_File_Thread=new Thread(this);
PayPal_Message_To_License_File_Thread.setPriority(Thread.MIN_PRIORITY);
PayPal_Message_To_License_File_Thread.start();
}
...
}
But "PayPal_Message_To_License_File_Thread=new Thread(this);" is causing the following error :
javax.servlet.ServletContext log: unavailable
java.security.AccessControlException: access denied (java.lang.RuntimePermission modifyThreadGroup)
at java.security.AccessControlContext.checkPermission(AccessControlContext.java:355)
at java.security.AccessController.checkPermission(AccessController.java:567)
Why, how to fix it ?
Frank
© Stack Overflow or respective owner