dev@glassfish.java.net

appserv-tests/config/common.xml startDerby / stopDerby

From: Cheng Fang <cheng.fang_at_oracle.com>
Date: Tue, 28 Dec 2010 10:38:15 -0500

I'm trying to replace the hard-coded derby port numbers in
appserv-tests/config/common.xml to the props in
appserv-tests/config/derby.properties. I noticed the startDerby and
stopDerby tasks in common.xml starts/stops 2 derby processes, on port
1527 and 1528 respectively.

Any particular reason why we need 2 derby processes?

If we do need 2, how about adding a db.port.2 prop in derby.properties?

<target name="startDerbyNonMac" depends="init-common" unless="darwin">
<echo message="StaRTing Derby DB servers in the Network Mode"/>
<parallel>
<java classname="org.apache.derby.drda.NetworkServerControl"
       classpath="${db.classpath}" fork="true" spawn="true">
<arg line="-h localhost -p 1527 start"/>
</java>
<java classname="org.apache.derby.drda.NetworkServerControl"
       classpath="${db.classpath}" fork="true" spawn="true">
<arg line="-h localhost -p 1528 start"/>
</java>
</parallel>
</target>

Thanks,
-cheng