From: Guijarro, J. <jul...@hp...> - 2007-08-16 14:02:32
|
Hi Gary, Welcome to the list. What I get from your question is that you are trying to pass some java properties to a program that is deployed using sfStart. If my understanding is correct then what you need to do is to have a daemon that either was started with those parameters included on the command line or you will need your component to use something like system properties to get those parameters to your other program. sfStart is used to parse a description and verify that everything is correct and then to pass that description to the daemon. Then, the daemon is the one that deploys the components that will load your application. To start a daemon with special parameters you can use -J . For example: rem JVMARGS are declared using -J token=20 rem e.g. -J "-Djava.library.path=3D/libs -Xmx400M" rem e.g. -J "-Djava.library.path=3D/libs" -J -Xmx400M If you use SmartFrog with security on you will find that SmartFrog uses the Java Security Manager and also needs a java security policy file. This file is set in the script setSFSecurityProperties. For both to work together, you should merge all the security policies in one file. If you only need that policy file because or RMI, and you don't care about its restrictions, then you could enable the "all permitted" policy file that we have for dynamic classloading with no security by just removing the comment (#) in # export SFDYNAMICCLASSLOADING_ON=3DENABLED I haven't tried it but to hard code a security policy in a java program you could try this: String myFile=3D"...."; System.setProperty("java.security.policy",myFile); System.setSecurityManager(new SecurityManager()); Julio > -----Original Message----- > From: sma...@li... [mailto:smartfrog- > sup...@li...] On Behalf Of Robinson, Gary > Sent: 16 August 2007 11:29 > To: sma...@li... > Subject: [Smartfrog-support] sfStart and program arguments >=20 > Hi all, hopefully someone here can help me. >=20 > Is there a way to pass Java program arguments into the sfStart command? >=20 > I have deployed a description that loads a Java RMI server application. > And > for the the server application to work it needs to bind itself with an > RMI > registry and therefore needs to have a java security policy file > associated > with it passed in as an argument. >=20 > Also, does anyone have any information about how i can hard code a java > secuirty policy into a Java program? >=20 > Many thanks, > Gary >=20 > ------------------------------------------------------------------------ - > This SF.net email is sponsored by: Splunk Inc. > Still grepping through log files to find problems? Stop. > Now Search log events and configuration files using AJAX and a browser. > Download your FREE copy of Splunk now >> http://get.splunk.com/ > _______________________________________________ > Smartfrog-support mailing list > Sma...@li... > https://lists.sourceforge.net/lists/listinfo/smartfrog-support |