- Timestamp:
- 2015-06-22T19:42:38+12:00 (9 years ago)
- Location:
- main/trunk/greenstone3
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
main/trunk/greenstone3/build.xml
r29977 r29988 787 787 <target name="get-default-servlet-url"> 788 788 <echo>http://${tomcat.server}:${tomcat.port}${app.path}${server.default.servlet}</echo> 789 </target> 790 791 <target name="start-derby-java"> 792 <echo>Launching derby on ${derby.server}:${derby.server.port}...</echo> 793 <java classname="org.apache.derby.drda.NetworkServerControl" fork="true" spawn="true" clonevm="true"> 794 <arg value="start"/> 795 <classpath refid="derby.server.classpath"/> 796 </java> 789 </target> 790 791 <target name="check-derbyserver-running"> 792 <condition property="derby.isrunning" value="true" else="false"> 793 <!--<socket server="jdbc:derby://${derby.server}" port="${derby.server.port}"/>--> 794 <socket server="${derby.server}" port="${derby.server.port}"/><!-- like telnet machine port --> 795 </condition> 796 <echo>Derby is running: ${derby.isrunning}</echo> 797 </target> 798 799 <target name="start-derby-java" depends="check-derbyserver-running"> 800 <if><bool><not><istrue value="${derby.isrunning}"/></not></bool> 801 <echo>Launching derby on ${derby.server}:${derby.server.port}...</echo> 802 <java classname="org.apache.derby.drda.NetworkServerControl" fork="true" spawn="true" clonevm="true"> 803 <arg value="start"/> 804 <classpath refid="derby.server.classpath"/> 805 </java> 806 <else> 807 <echo>Derby server ALREADY RUNNING on ${derby.server}:${derby.server.port}</echo> 808 </else> 809 </if> 797 810 </target> 798 811 799 812 <!-- Using derby 10.1.2.1 800 813 See db-derby-10.1.2.1-bin/docs/html/adminguide/index.html --> 801 <target name="start-derby"> 802 <echo>About to launch derby on ${derby.server}:${derby.server.port}</echo> 803 <property name="derby.server.classpath.prop" refid="derby.server.classpath" /> 804 805 <exec executable="java" spawn="true"><!-- failonerror="true"--> 806 <env key="CLASSPATH" path="${derby.server.classpath.prop}"/> 807 <arg value="org.apache.derby.drda.NetworkServerControl"/> 808 <arg value="start"/> 809 <arg value="-p"/> 810 <arg value="${derby.server.port}"/> 811 </exec> 812 </target> 813 814 <target name="stop-derby"> 814 <target name="start-derby" depends="check-derbyserver-running"> 815 <if><bool><not><istrue value="${derby.isrunning}"/></not></bool> 816 <echo>About to launch derby on ${derby.server}:${derby.server.port}</echo> 817 <property name="derby.server.classpath.prop" refid="derby.server.classpath" /> 818 819 <exec executable="java" spawn="true"><!-- failonerror="true"--> 820 <env key="CLASSPATH" path="${derby.server.classpath.prop}"/> 821 <arg value="org.apache.derby.drda.NetworkServerControl"/> 822 <arg value="start"/> 823 <arg value="-p"/> 824 <arg value="${derby.server.port}"/> 825 </exec> 826 <else> 827 <echo>Derby networked server ALREADY RUNNING on ${derby.server}:${derby.server.port}</echo> 828 </else> 829 </if> 830 </target> 831 832 <target name="force-stop-derby"> 815 833 <java classname="org.apache.derby.drda.NetworkServerControl"> 816 834 <arg value="shutdown"/> 817 835 <classpath refid="derby.server.classpath"/> 818 836 </java> 837 </target> 838 839 <target name="stop-derby" description="Shutdown derby server only if running" depends="check-derbyserver-running"><!-- if="${derby.isrunning}" checks if true or false only from ant 1.8 on --> 840 <if><bool><istrue value="${derby.isrunning}"/></bool> 841 <!--<echo>Derby is |${derby.isrunning}| running</echo>--> 842 <antcall target="force-stop-derby"/> 843 <else> 844 <echo>Derby is not running</echo> 845 </else> 846 </if> 819 847 </target> 820 848 … … 1488 1516 1489 1517 <!-- Another way: http://ptrthomas.wordpress.com/2006/03/25/how-to-start-and-stop-tomcat-from-ant/ --> 1490 <target name="start-tomcat" description="Startup only Tomcat" depends="init" if="tomcat.islocal"> 1518 <target name="start-tomcat" description="Startup only Tomcat" depends="init,check-tomcat-running" if="tomcat.islocal"> 1519 <if><bool><istrue value="${tomcat.isrunning}"/></bool> 1520 <echo>**************************************</echo> 1521 <echo>A TOMCAT IS ALREADY RUNNING ON http://${tomcat.server}:${tomcat.port}. NOT STARTING.</echo> 1522 <echo>**************************************</echo> 1523 <else> 1491 1524 <property name="tomcat.classpath" refid="local.tomcat.classpath"/> 1492 1525 <property name="tomcat.path" refid="local.tomcat.path"/> … … 1537 1570 </and> 1538 1571 </waitfor> 1572 1573 </else> 1574 </if> 1539 1575 </target> 1540 1576 -
main/trunk/greenstone3/src/java/org/greenstone/server/Server3.java
r29923 r29988 30 30 RESTART_CMD = "restart"; 31 31 CONFIGURE_CMD = "configure"; 32 STOP_CMD = "force-stop-tomcat stop-derby";32 STOP_CMD = "force-stop-tomcat force-stop-derby"; 33 33 34 34 String is_read_only = System.getProperty("gsdl3home.isreadonly","false");
Note:
See TracChangeset
for help on using the changeset viewer.