Passing System Property To An Activatable RMI Service
0 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Michael_Duffy
Posted On:   Wednesday, May 1, 2002 05:58 AM

I've written an RMI service that uses the Activatable API. It requires two System properties. I've successfully started the registry and the daemon and registered the service. However, when I run the client I get a NullPointerException, because the System properties my service depends on aren't set. (I didn't provide a default value in getProperty()). I've supplied the properties to the rmid using -J-D notation - didn't work. I've written a policy file that grants ExecOptionPermission to both properties that I use to start the RMI daemon, like this: permission java.util.PropertyPermission "*", "read"; permission com.sun.rmi.rmid.ExecOptionPermission "-Dservice.   More>>


I've written an RMI service that uses the Activatable API. It requires two System properties. I've successfully started the registry and the daemon and registered the service. However, when I run the client I get a NullPointerException, because the System properties my service depends on aren't set. (I didn't provide a default value in getProperty()).




I've supplied the properties to the rmid using -J-D notation - didn't work. I've written a policy file that grants ExecOptionPermission to both properties that I use to start the RMI daemon, like this:



			
permission java.util.PropertyPermission "*", "read";

permission com.sun.rmi.rmid.ExecOptionPermission "-Dservice.path=*";
permission com.sun.rmi.rmid.ExecOptionPermission "-Dservice.temp=*";



STILL didn't work.




What is the proper way to supply System properties to an activatable RMI service? - MOD

   <<Less
About | Sitemap | Contact