5 Replies Latest reply on Aug 4, 2009 6:47 AM by Tim Fox

    JBM in an applet

    Yong Hao Gao Master

      I need some advice on the steps to make a JBM applet work. Here is my steps:

      1. write an applet that can do connection/disconnection, producer/consumer creation, messaging sending/receiving.
      2. collect all necessary jars that the applet depends on (like log4j, aop, javassist etc).
      3. Sign those jars as well as the applet jar.
      4. deploy the applet along with those dependencies (signed) to the web server.
      5. open a browser, visit the applet's url. Let the applet run the above operations.

      I read the link Tim gave me, http://www.wutka.com/hackingjava/ch3.htm, it says if the applet is signed and much of the permissions is allowed.

      But when I tried my applet, the browser ask me to allow the signed applet to be running. Then when I click on the applet's button to do connection/sending/receiving job, it get various permission exceptions along the way. To sum up, those permissions are :

      permission java.lang.RuntimePermission "getClassLoader";
      permission java.lang.RuntimePermission "accessDeclaredMembers";
      permission java.lang.RuntimePermission "setContextClassLoader";
      permission java.lang.RuntimePermission "createClassLoader";

      permission java.net.SocketPermission "localhost:0-", "listen,connect,resolve,accept"; //default policy only allow port above 1024.
      permission java.util.PropertyPermission "jboss.aop.*", "read";
      permission java.util.PropertyPermission "user.home", "read";
      permission java.util.PropertyPermission "org.jboss.remoting.*", "read";
      permission java.util.PropertyPermission "jboss.remoting.*", "read";
      permission java.util.PropertyPermission "jboss.remoting.*", "write";
      permission java.util.PropertyPermission "legacyParsing", "read";
      permission java.util.PropertyPermission "support.bytesId", "read";

      permission java.lang.reflect.ReflectPermission "suppressAccessChecks";


      Where did I missing something?