[jboss-cvs] JBoss Messaging SVN: r7130 - in trunk: examples/common/src/org/jboss/common/example and 1 other directories.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Fri May 29 08:02:54 EDT 2009


Author: ataylor
Date: 2009-05-29 08:02:53 -0400 (Fri, 29 May 2009)
New Revision: 7130

Modified:
   trunk/build-messaging.xml
   trunk/examples/common/src/org/jboss/common/example/JBMExample.java
   trunk/examples/common/src/org/jboss/common/example/SpawnedVMSupport.java
   trunk/examples/core/embedded-remote/build.xml
Log:
fixes for examples on windows

Modified: trunk/build-messaging.xml
===================================================================
--- trunk/build-messaging.xml	2009-05-29 10:40:30 UTC (rev 7129)
+++ trunk/build-messaging.xml	2009-05-29 12:02:53 UTC (rev 7130)
@@ -1393,6 +1393,7 @@
    <!-- ======================================================================================== -->
 
    <target name="runServer" depends="jar">
+      <mkdir dir="logs"/>
       <java classname="org.jboss.messaging.integration.bootstrap.JBMBootstrapServer" fork="true">
          <jvmarg value="-XX:+UseParallelGC"/>
          <jvmarg value="-Xms512M"/>
@@ -1410,6 +1411,7 @@
    </target>
 
    <target name="runClusteredServer" depends="jar">
+      <mkdir dir="logs"/>
       <java classname="org.jboss.messaging.integration.bootstrap.JBMBootstrapServer" fork="true">
          <jvmarg value="-XX:+UseParallelGC"/>
          <jvmarg value="-Xms512M"/>

Modified: trunk/examples/common/src/org/jboss/common/example/JBMExample.java
===================================================================
--- trunk/examples/common/src/org/jboss/common/example/JBMExample.java	2009-05-29 10:40:30 UTC (rev 7129)
+++ trunk/examples/common/src/org/jboss/common/example/JBMExample.java	2009-05-29 12:02:53 UTC (rev 7130)
@@ -82,6 +82,7 @@
          {
             failure = true;
          }
+          System.out.println("example complete");
       }
       catch (Throwable e)
       {
@@ -188,17 +189,20 @@
          stopServer(server);
       }
    }
-   
+
    private void stopServer(Process server) throws Exception
    {
-      if (server.getInputStream() != null)
+      if (!System.getProperty("os.name").contains("Windows"))
       {
-         server.getInputStream().close();
+         if (server.getInputStream() != null)
+         {
+            server.getInputStream().close();
+         }
+         if (server.getErrorStream() != null)
+         {
+            server.getErrorStream().close();
+         }
       }
-      if (server.getErrorStream() != null)
-      {
-         server.getErrorStream().close();
-      }
       server.destroy();
    }
 

Modified: trunk/examples/common/src/org/jboss/common/example/SpawnedVMSupport.java
===================================================================
--- trunk/examples/common/src/org/jboss/common/example/SpawnedVMSupport.java	2009-05-29 10:40:30 UTC (rev 7129)
+++ trunk/examples/common/src/org/jboss/common/example/SpawnedVMSupport.java	2009-05-29 12:02:53 UTC (rev 7130)
@@ -99,7 +99,7 @@
 
       log.info("command line: " + commandLine);
 
-      Process process = Runtime.getRuntime().exec(commandLine, new String[]{}, new File(configDir));
+      Process process = Runtime.getRuntime().exec(commandLine, null, new File(configDir));
 
       log.trace("process: " + process);
 

Modified: trunk/examples/core/embedded-remote/build.xml
===================================================================
--- trunk/examples/core/embedded-remote/build.xml	2009-05-29 10:40:30 UTC (rev 7129)
+++ trunk/examples/core/embedded-remote/build.xml	2009-05-29 12:02:53 UTC (rev 7130)
@@ -55,6 +55,7 @@
 	      <jvmarg value="-Xms50M"/>      
 	      <jvmarg value="-Xmx50M"/>
 	   	  <sysproperty key="remote-classpath" value="${remote-classpath}"/>
+          <sysproperty key="java.library.path" value="${java.library.path}${path.separator}${aio.library.path}"/>
 	      <classpath refid="client.classpath"/>
 	   </java>
        <fail message="EmbeddedRemoteExample failed">




More information about the jboss-cvs-commits mailing list