Administrator
|
Tomorrow a little tweak will be necessary on trunk demo, I will do...
Jacques From: <[hidden email]> > Author: jleroux > Date: Wed Apr 11 20:32:35 2012 > New Revision: 1324989 > > URL: http://svn.apache.org/viewvc?rev=1324989&view=rev > Log: > A patch from Francis ANDRE "unify admin port and key setting: single point of definition in start.properties" > https://issues.apache.org/jira/browse/OFBIZ-4793 > > If someone wants to change the admin password or port, he would have to change currently many files (-- build.xml, various .bat > and .sh --). In order to avoid this error-prone pratice, I suggest to centralize the definition of the admin kay and port at 2 > single points: the framework/start/src/org/ofbiz/base/start/start.properties and the > framework/start/src/org/ofbiz/base/start/jetty.properties > > jleroux: in start.java I also changed > String adminPortStr = getProp(props, "ofbiz.admin.port", "0"); > adminKey = getProp(props, "ofbiz.admin.key", "NA"); > to > String adminPortStr = getProp(props, "ofbiz.admin.port", "10523"); > adminKey = getProp(props, "ofbiz.admin.key", "so3du5kasd5dn"); > > Modified: > ofbiz/trunk/build.xml > ofbiz/trunk/framework/entity/src/org/ofbiz/entity/GenericEntity.java > ofbiz/trunk/framework/start/src/org/ofbiz/base/start/jetty.properties > ofbiz/trunk/framework/start/src/org/ofbiz/base/start/start.properties > ofbiz/trunk/startofbiz.sh > ofbiz/trunk/stopofbiz.sh > ofbiz/trunk/tools/startofbiz.sh > ofbiz/trunk/tools/stopofbiz.sh > > Modified: ofbiz/trunk/build.xml > URL: http://svn.apache.org/viewvc/ofbiz/trunk/build.xml?rev=1324989&r1=1324988&r2=1324989&view=diff > ============================================================================== > --- ofbiz/trunk/build.xml (original) > +++ ofbiz/trunk/build.xml Wed Apr 11 20:32:35 2012 > @@ -24,8 +24,6 @@ under the License. > > <import file="macros.xml"/> > <property name="site.dir" value="../site"/> > - <property name="ofbiz.admin.port" value="10523"/> > - <property name="ofbiz.admin.key" value="so3du5kasd5dn"/> > <property name="memory.initial.param" value="-Xms128M"/> > <property name="memory.max.param" value="-Xmx512M"/> > <property name="pos.memory.max.param" value="-Xmx512M"/> > @@ -386,8 +384,6 @@ under the License. > <jvmarg value="${memory.initial.param}"/> > <jvmarg value="${pos.memory.max.param}"/> > <jvmarg value="${memory.maxpermsize.param}"/> > - <sysproperty key="ofbiz.admin.port" value="${ofbiz.admin.port}"/> > - <sysproperty key="ofbiz.admin.key" value="${ofbiz.admin.key}"/> > </java> > </target> > <target name="start-batch" > @@ -396,8 +392,6 @@ under the License. > <jvmarg value="${memory.initial.param}"/> > <jvmarg value="${pos.memory.max.param}"/> > <jvmarg value="${memory.maxpermsize.param}"/> > - <sysproperty key="ofbiz.admin.port" value="${ofbiz.admin.port}"/> > - <sysproperty key="ofbiz.admin.key" value="${ofbiz.admin.key}"/> > </java> > </target> > <target name="start-debug" depends="build" > @@ -410,8 +404,6 @@ under the License. > <jvmarg value="-Djava.compiler=NONE"/> > <jvmarg value="-Xdebug"/> > <jvmarg value="-Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=8091"/> > - <sysproperty key="ofbiz.admin.port" value="${ofbiz.admin.port}"/> > - <sysproperty key="ofbiz.admin.key" value="${ofbiz.admin.key}"/> > </java> > </target> > <target name="start-pos" > @@ -426,16 +418,12 @@ under the License. > <target name="stop" > description="Stop OFBiz"> > <java jar="ofbiz.jar" fork="true"> > - <sysproperty key="ofbiz.admin.port" value="${ofbiz.admin.port}"/> > - <sysproperty key="ofbiz.admin.key" value="${ofbiz.admin.key}"/> > <arg value="-shutdown"/> > </java> > </target> > <target name="status" > description="Display status of OFBiz"> > <java jar="ofbiz.jar" fork="true"> > - <sysproperty key="ofbiz.admin.port" value="${ofbiz.admin.port}"/> > - <sysproperty key="ofbiz.admin.key" value="${ofbiz.admin.key}"/> > <arg value="-status"/> > </java> > </target> > > Modified: ofbiz/trunk/framework/entity/src/org/ofbiz/entity/GenericEntity.java > URL: > http://svn.apache.org/viewvc/ofbiz/trunk/framework/entity/src/org/ofbiz/entity/GenericEntity.java?rev=1324989&r1=1324988&r2=1324989&view=diff > ============================================================================== > --- ofbiz/trunk/framework/entity/src/org/ofbiz/entity/GenericEntity.java (original) > +++ ofbiz/trunk/framework/entity/src/org/ofbiz/entity/GenericEntity.java Wed Apr 11 20:32:35 2012 > @@ -461,7 +461,7 @@ public class GenericEntity extends Obser > } > > boolean isNullString = false; > - if ("null".equals(value) || "[null-field]".equals(value)) { > + if ("null".equals(value) || "[null-field]".equals(value)) { // keep [null-field] here but not sure it' used now > // count this as a null too, but only for numbers and stuff, not for Strings > isNullString = true; > } > @@ -1079,7 +1079,12 @@ public class GenericEntity extends Obser > element.setAttribute(name, value); > } > } else { > - element.setAttribute(name, GenericEntity.NULL_FIELD.toString()); > + element.setAttribute(name, "null"); > + element.setAttribute("xsi:nil", "true"); > + // I tried to put the schema in the envelope header (in createAndSendSOAPResponse) > + // resEnv.declareNamespace("http://www.w3.org/2001/XMLSchema-instance", null); > + // But it gets prefixed and that does not work. So adding in each instance > + element.setAttribute("xmlns:xsi", "http://www.w3.org/2001/XMLSchema-instance"); > } > } > > > Modified: ofbiz/trunk/framework/start/src/org/ofbiz/base/start/jetty.properties > URL: > http://svn.apache.org/viewvc/ofbiz/trunk/framework/start/src/org/ofbiz/base/start/jetty.properties?rev=1324989&r1=1324988&r2=1324989&view=diff > ============================================================================== > --- ofbiz/trunk/framework/start/src/org/ofbiz/base/start/jetty.properties (original) > +++ ofbiz/trunk/framework/start/src/org/ofbiz/base/start/jetty.properties Wed Apr 11 20:32:35 2012 > @@ -28,9 +28,9 @@ java.tools.jar.required=true > #ofbiz.home= > > # --- Set these for shutting down when running as background process > -#ofbiz.admin.host=127.0.0.1 > -#ofbiz.admin.port=10523 > -#ofbiz.admin.key=so3du5kasd5dn > +ofbiz.admin.host=127.0.0.1 > +ofbiz.admin.port=10523 > +ofbiz.admin.key=so3du5kasd5dn > > # --- External Base configuration files (relative to ofbiz.home) > #ofbiz.base.config=framework/base/config > > Modified: ofbiz/trunk/framework/start/src/org/ofbiz/base/start/start.properties > URL: > http://svn.apache.org/viewvc/ofbiz/trunk/framework/start/src/org/ofbiz/base/start/start.properties?rev=1324989&r1=1324988&r2=1324989&view=diff > ============================================================================== > --- ofbiz/trunk/framework/start/src/org/ofbiz/base/start/start.properties (original) > +++ ofbiz/trunk/framework/start/src/org/ofbiz/base/start/start.properties Wed Apr 11 20:32:35 2012 > @@ -28,9 +28,9 @@ > #ofbiz.home= > > # --- Set these for shutting down when running as background process > -#ofbiz.admin.host=127.0.0.1 > -#ofbiz.admin.port=10523 > -#ofbiz.admin.key=so3du5kasd5dn > +ofbiz.admin.host=127.0.0.1 > +ofbiz.admin.port=10523 > +ofbiz.admin.key=so3du5kasd5dn > > # --- External Base configuration files (relative to ofbiz.home) > #ofbiz.base.config=framework/base/config > > Modified: ofbiz/trunk/startofbiz.sh > URL: http://svn.apache.org/viewvc/ofbiz/trunk/startofbiz.sh?rev=1324989&r1=1324988&r2=1324989&view=diff > ============================================================================== > --- ofbiz/trunk/startofbiz.sh (original) > +++ ofbiz/trunk/startofbiz.sh Wed Apr 11 20:32:35 2012 > @@ -18,10 +18,6 @@ > # under the License. > ##################################################################### > > -# shutdown settings > -ADMIN_PORT=10523 > -ADMIN_KEY=so3du5kasd5dn > - > # console log file > OFBIZ_LOG=runtime/logs/console.log > > @@ -29,7 +25,6 @@ OFBIZ_LOG=runtime/logs/console.log > rm -f $OFBIZ_LOG > > # VM args > -ADMIN="-Dofbiz.admin.port=$ADMIN_PORT -Dofbiz.admin.key=$ADMIN_KEY" > #DEBUG="-Dsun.rmi.server.exceptionTrace=true" > #DEBUG="-Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=8091" > #automatic IP address for linux > @@ -38,7 +33,7 @@ ADMIN="-Dofbiz.admin.port=$ADMIN_PORT -D > MEMIF="-Xms128M -Xmx512M -XX:MaxPermSize=512m" > #JMX="-Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.port=33333 -Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.authenticate=false" > #MISC="-Duser.language=en" > -VMARGS="$MEMIF $MISC $JMX $DEBUG $RMIIF $ADMIN" > +VMARGS="$MEMIF $MISC $JMX $DEBUG $RMIIF" > > # Worldpay Config > #VMARGS="-Xbootclasspath/p:applications/accounting/lib/cryptix.jar $VMARGS" > > Modified: ofbiz/trunk/stopofbiz.sh > URL: http://svn.apache.org/viewvc/ofbiz/trunk/stopofbiz.sh?rev=1324989&r1=1324988&r2=1324989&view=diff > ============================================================================== > --- ofbiz/trunk/stopofbiz.sh (original) > +++ ofbiz/trunk/stopofbiz.sh Wed Apr 11 20:32:35 2012 > @@ -28,9 +28,5 @@ else > JAVA=java > fi > > -# shutdown settings > -ADMIN_PORT=10523 > -ADMIN_KEY=so3du5kasd5dn > - > -$JAVA -Dofbiz.admin.port=$ADMIN_PORT -Dofbiz.admin.key=$ADMIN_KEY -jar ofbiz.jar -shutdown > +$JAVA -jar ofbiz.jar -shutdown > > > Modified: ofbiz/trunk/tools/startofbiz.sh > URL: http://svn.apache.org/viewvc/ofbiz/trunk/tools/startofbiz.sh?rev=1324989&r1=1324988&r2=1324989&view=diff > ============================================================================== > --- ofbiz/trunk/tools/startofbiz.sh (original) > +++ ofbiz/trunk/tools/startofbiz.sh Wed Apr 11 20:32:35 2012 > @@ -18,10 +18,6 @@ > # under the License. > ##################################################################### > > -# shutdown settings > -ADMIN_PORT=10523 > -ADMIN_KEY=so3du5kasd5dn > - > # set the parent directory as OFBiz Home > OFBIZ_HOME="$( cd -P "$( dirname "$0" )" && pwd )"/.. > > @@ -32,7 +28,6 @@ OFBIZ_LOG=runtime/logs/console.log > rm -f $OFBIZ_LOG > > # VM args > -ADMIN="-Dofbiz.admin.port=$ADMIN_PORT -Dofbiz.admin.key=$ADMIN_KEY" > #DEBUG="-Dsun.rmi.server.exceptionTrace=true" > #DEBUG="-Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=8091" > #automatic IP address for linux > @@ -41,7 +36,7 @@ ADMIN="-Dofbiz.admin.port=$ADMIN_PORT -D > MEMIF="-Xms128M -Xmx512M -XX:MaxPermSize=512m" > #JMX="-Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.port=33333 -Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.authenticate=false" > #MISC="-Duser.language=en" > -VMARGS="$MEMIF $MISC $JMX $DEBUG $RMIIF $ADMIN" > +VMARGS="$MEMIF $MISC $JMX $DEBUG $RMIIF" > > # Worldpay Config > #VMARGS="-Xbootclasspath/p:applications/accounting/lib/cryptix.jar $VMARGS" > > Modified: ofbiz/trunk/tools/stopofbiz.sh > URL: http://svn.apache.org/viewvc/ofbiz/trunk/tools/stopofbiz.sh?rev=1324989&r1=1324988&r2=1324989&view=diff > ============================================================================== > --- ofbiz/trunk/tools/stopofbiz.sh (original) > +++ ofbiz/trunk/tools/stopofbiz.sh Wed Apr 11 20:32:35 2012 > @@ -17,10 +17,6 @@ > # specific language governing permissions and limitations > # under the License. > ##################################################################### > -#### > -# ofbiz.admin.key and ofbiz.admin.port must match that which OFBIZ was started with > -#### > - > OFBIZ_HOME="$( cd -P "$( dirname "$0" )" && pwd )"/.. > > # location of java executable > @@ -30,9 +26,6 @@ else > JAVA=java > fi > > -# shutdown settings > -ADMIN_PORT=10523 > -ADMIN_KEY=so3du5kasd5dn > > -(cd "$OFBIZ_HOME" && $JAVA -Dofbiz.admin.port=$ADMIN_PORT -Dofbiz.admin.key=$ADMIN_KEY -jar ofbiz.jar -shutdown) > +(cd "$OFBIZ_HOME" && $JAVA -jar ofbiz.jar -shutdown) > > > |
Free forum by Nabble | Edit this page |