This week's book giveaway is in the Agile and Other Processes forum.
We're giving away four copies of The Little Book of Impediments (e-book only) and have Tom Perry on-line!
See this thread for details.
Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Applet security problem

 
Xander Uiterlinden
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I wrote an applet which listens for UDP messages and which sends UDP messages as well. I signed the applet in order to make it work when downloaded from a web server.
The applet lauches 2 threads:
- a thread for listening for datagram messages
- a thread which functions as a heartbeat by sending datagram messages

The problem is that the thread which functions as a heartbeat seems to be the only one which is allowed to use sockets. When I try to call a function on the Applet's thread which should send a message I get an error:

>Error: access denied (java.net.SocketPermission 192.168.3.9:5455 >connect,resolve)

>java.security.AccessControlException: access denied (java.net.SocketPermission 192.168.3.9:5455 connect,resolve)

Which is strange because the other thread is allowed to do the exact same thing.

The applet runs on java 1.2.4_02.

To me it appears the 'heartbeat' thread obtained privileged access to the SocketPermission, but I can't find out why.

Anyone ?

Thanks,

Xander
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic