|
From: Leif M. <lei...@ta...> - 2011-08-25 14:51:57
|
Francesco, As you noticed, the Wrapper does not allow you to combine multiple arguments into the same property like that. It will work on Windows, but not UNIX because of the way processes are spawned. Newer versions of the Wrapper all allow you to have discontinuous 'X' values in the properties however so this should be easy to do. For your include file, use a range of values 100-199 or something and then they will all be added correctly when the Wrapper builds the final command line. To do this, you need to set: wrapper.ignore_sequence_gaps=TRUE http://wrapper.tanukisoftware.com/doc/english/prop-ignore-sequence-gaps.html Your include file would now look like this: sub.conf --- wrapper.java.additional.100=-Dsun.lang.ClassLoader.allowArraySyntax=true wrapper.java.additional.101=-Dit.cineca.sia.peaf.managed=true wrapper.java.additional.102=-Dit.cineca.sia.development=false wrapper.java.additional.103=-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=8018 --- Then in your main wrapper.conf --- #include ../conf/sub.conf --- See the following to learn more about include files. http://wrapper.tanukisoftware.com/doc/english/props-cascading.html It is also possible to specify properties on the wrapper command line if you need to pass them in from the script: http://wrapper.tanukisoftware.com/doc/english/props-command-line.html Please let me know if you have any issues getting it working. Cheers, Leif On Thu, Aug 25, 2011 at 10:44 PM, Francesco Sordillo <f.s...@ci...> wrote: > Hello. > > I have many services managed with Java Service Wrapper (JSW) on JBoss > EAP 5.1. I configured JSW wrapper.conf file to be able to manage all > this applications (es.: wrapper.app.parameter.X). > > Anyway, any application needs custom additional parameters that are > different from another one. So I tried to "source" a file with my custom > additional parameters (run.conf) before to execute "testwrapper" script. > > When I run init script, testwrapper script is executed than "source" my > run.conf and starts my application. > > run.conf looks like this. > > ------------------ > ADDITIONAL="-Dsun.lang.ClassLoader.allowArraySyntax=true" > ADDITIONAL="$ADDITIONAL -Dit.cineca.sia.peaf.managed=true" > ADDITIONAL="$ADDITIONAL -Dit.cineca.sia.development=false" > ADDITIONAL="$ADDITIONAL > -agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=8018" > export ADDITIONAL > ------------------ > > So, in wrapper.conf I added "wrapper.java.additional.19=%ADDITIONAL%". > But this is useless. This is my wrapper log. > > ------------ > [...] > INFO | wrapper | 2011/08/25 14:53:12 | Command[0] : > /usr/java/jdk1.6.0_18/bin/java > INFO | wrapper | 2011/08/25 14:53:12 | Command[1] : -Dfile.encoding=UTF-8 > INFO | wrapper | 2011/08/25 14:53:12 | Command[2] : -server > INFO | wrapper | 2011/08/25 14:53:12 | Command[3] : -XX:MaxPermSize=512m > INFO | wrapper | 2011/08/25 14:53:12 | Command[4] : -Dprogram.name=run.sh > INFO | wrapper | 2011/08/25 14:53:12 | Command[5] : > -Djava.endorsed.dirs=/ugov/jboss/jboss-eap-5.1/jboss-as/lib/endorsed > INFO | wrapper | 2011/08/25 14:53:12 | Command[6] : > -Dorg.jboss.resolver.warning=true > INFO | wrapper | 2011/08/25 14:53:12 | Command[7] : > -Dsun.rmi.dgc.client.gcInterval=3600000 > INFO | wrapper | 2011/08/25 14:53:12 | Command[8] : > -Dsun.rmi.dgc.server.gcInterval=3600000 > INFO | wrapper | 2011/08/25 14:53:12 | Command[9] : > -Djava.net.preferIPv4Stack=true > INFO | wrapper | 2011/08/25 14:53:12 | Command[10] : > -Dcineca.web.jvm.route=jvm_ugov_dsetlab04 > INFO | wrapper | 2011/08/25 14:53:12 | Command[11] : -Dhostname=dsetlab04 > INFO | wrapper | 2011/08/25 14:53:12 | Command[12] : > -Djboss.port.offset=0 > INFO | wrapper | 2011/08/25 14:53:12 | Command[13] : > -Djboss.bind.address=10.254.8.66 > INFO | wrapper | 2011/08/25 14:53:12 | Command[14] : > -Dcineca.binding.ports.offset=0 > INFO | wrapper | 2011/08/25 14:53:12 | Command[15] : > -Djava.rmi.server.hostname=dsetlab04.private.cineca.it > INFO | wrapper | 2011/08/25 14:53:12 | Command[16] : > -Dcom.sun.management.jmxremote.port=11000 > INFO | wrapper | 2011/08/25 14:53:12 | Command[17] : > -Dcom.sun.management.jmxremote.authenticate=false > INFO | wrapper | 2011/08/25 14:53:12 | Command[18] : > -Dcom.sun.management.jmxremote.ssl=false > INFO | wrapper | 2011/08/25 14:53:12 | Command[19] : > -Dsun.lang.ClassLoader.allowArraySyntax=true > -Dit.cineca.sia.peaf.managed=true -Dit.cineca.sia.development=false > -agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=8018 > INFO | wrapper | 2011/08/25 14:53:12 | Command[20] : -Xms512m > INFO | wrapper | 2011/08/25 14:53:12 | Command[21] : -Xmx1024m > INFO | wrapper | 2011/08/25 14:53:12 | Command[22] : > -Djava.library.path=/usr/lib64/java-service-wrapper > INFO | wrapper | 2011/08/25 14:53:12 | Command[23] : -classpath > [...] > ----------------------- > > As you can see, additional parameters are "sourced" but it seems like > that JSW dislikes space for additional parameters. For example, 8018 > port is closed! I tried also to add "\\s" between additional parameters > but vainly. > > Some of you may help me? > Thanks in advance. > > Francesco. |