Author: heiko.braun(a)jboss.com
Date: 2008-03-18 09:43:42 -0400 (Tue, 18 Mar 2008)
New Revision: 5997
Modified:
framework/trunk/src/main/etc/wsconsume.sh
framework/trunk/src/main/etc/wsprovide.sh
Log:
Dynamic classpath depends on the deployed stack
Modified: framework/trunk/src/main/etc/wsconsume.sh
===================================================================
--- framework/trunk/src/main/etc/wsconsume.sh 2008-03-18 11:03:23 UTC (rev 5996)
+++ framework/trunk/src/main/etc/wsconsume.sh 2008-03-18 13:43:42 UTC (rev 5997)
@@ -65,6 +65,17 @@
LIBDIR=$PARENT/lib
fi
+# is it a JBossWS-native or SunRI installation?
+if [ -a $LIBDIR/jbossws-client.jar ]; then
+ JBOSSWS_NATIVE="true"
+fi
+
+###
+# Setup the wsprovide classpath
+# The classpath is dynamically build depending on the stack that
+# is deployed. See $JBOSSWS_NATIVE above.
+###
+
# shared libs
WSCONSUME_CLASSPATH="$WSCONSUME_CLASSPATH:$JAVA_HOME/lib/tools.jar"
WSCONSUME_CLASSPATH="$WSCONSUME_CLASSPATH:$LIBDIR/activation.jar"
@@ -85,16 +96,24 @@
WSCONSUME_CLASSPATH="$WSCONSUME_CLASSPATH:$LIBDIR/streambuffer.jar"
WSCONSUME_CLASSPATH="$WSCONSUME_CLASSPATH:$LIBDIR/stax-ex.jar"
-# JBossWS-Metro stack libraries
-WSCONSUME_CLASSPATH="$WSCONSUME_CLASSPATH:$LIBDIR/jbossws-metro-client.jar"
+###
+# Stack specific dependencies
+###
-# JBossWS-Native stack libraries
-WSCONSUME_CLASSPATH="$WSCONSUME_CLASSPATH:$LIBDIR/javassist.jar"
-WSCONSUME_CLASSPATH="$WSCONSUME_CLASSPATH:$LIBDIR/jboss-xml-binding.jar"
-WSCONSUME_CLASSPATH="$WSCONSUME_CLASSPATH:$LIBDIR/jbossws-client.jar"
-WSCONSUME_CLASSPATH="$WSCONSUME_CLASSPATH:$LIBDIR/jboss-jaxws.jar"
-WSCONSUME_CLASSPATH="$WSCONSUME_CLASSPATH:$LIBDIR/jboss-jaxrpc.jar"
-WSCONSUME_CLASSPATH="$WSCONSUME_CLASSPATH:$LIBDIR/jboss-saaj.jar"
+if [ "x$JBOSSWS_NATIVE" = "x" ]; then
+ # JBossWS-Metro stack libraries
+ echo "JBossWS-Metro stack deployed"
+ WSCONSUME_CLASSPATH="$WSCONSUME_CLASSPATH:$LIBDIR/jbossws-metro-client.jar"
+else
+ # JBossWS-Native stack libraries
+ echo "JBossWS-Native stack deployed"
+ WSCONSUME_CLASSPATH="$WSCONSUME_CLASSPATH:$LIBDIR/javassist.jar"
+ WSCONSUME_CLASSPATH="$WSCONSUME_CLASSPATH:$LIBDIR/jboss-xml-binding.jar"
+ WSCONSUME_CLASSPATH="$WSCONSUME_CLASSPATH:$LIBDIR/jbossws-client.jar"
+ WSCONSUME_CLASSPATH="$WSCONSUME_CLASSPATH:$LIBDIR/jboss-jaxws.jar"
+ WSCONSUME_CLASSPATH="$WSCONSUME_CLASSPATH:$LIBDIR/jboss-jaxrpc.jar"
+ WSCONSUME_CLASSPATH="$WSCONSUME_CLASSPATH:$LIBDIR/jboss-saaj.jar"
+fi
###
# Execute the JVM
Modified: framework/trunk/src/main/etc/wsprovide.sh
===================================================================
--- framework/trunk/src/main/etc/wsprovide.sh 2008-03-18 11:03:23 UTC (rev 5996)
+++ framework/trunk/src/main/etc/wsprovide.sh 2008-03-18 13:43:42 UTC (rev 5997)
@@ -65,6 +65,17 @@
LIBDIR=$PARENT/lib
fi
+# is it a JBossWS-native or SunRI installation?
+if [ -a $LIBDIR/jbossws-client.jar ]; then
+ JBOSSWS_NATIVE="true"
+fi
+
+###
+# Setup the wsprovide classpath
+# The classpath is dynamically build depending on the stack that
+# is deployed. See $JBOSSWS_NATIVE above.
+###
+
# shared libs
WSPROVIDE_CLASSPATH="$WSPROVIDE_CLASSPATH:$JAVA_HOME/lib/tools.jar"
WSPROVIDE_CLASSPATH="$WSPROVIDE_CLASSPATH:$LIBDIR/jbossws-spi.jar"
@@ -83,23 +94,31 @@
WSPROVIDE_CLASSPATH="$WSPROVIDE_CLASSPATH:$LIBDIR/streambuffer.jar"
WSPROVIDE_CLASSPATH="$WSPROVIDE_CLASSPATH:$LIBDIR/stax-ex.jar"
-# JBossWS-Metro stack libraries
-WSPROVIDE_CLASSPATH="$WSPROVIDE_CLASSPATH:$LIBDIR/jbossws-metro-client.jar"
-WSPROVIDE_CLASSPATH="$WSPROVIDE_CLASSPATH:$LIBDIR/jaxws-api.jar"
-WSPROVIDE_CLASSPATH="$WSPROVIDE_CLASSPATH:$LIBDIR/jsr181-api.jar"
-WSPROVIDE_CLASSPATH="$WSPROVIDE_CLASSPATH:$LIBDIR/saaj-api.jar"
-WSPROVIDE_CLASSPATH="$WSPROVIDE_CLASSPATH:$LIBDIR/saaj-impl.jar"
+###
+# stack specific dependencies
+###
-# JBossWS-Native stack libraries
-WSPROVIDE_CLASSPATH="$WSPROVIDE_CLASSPATH:$LIBDIR/jboss-xml-binding.jar"
-WSPROVIDE_CLASSPATH="$WSPROVIDE_CLASSPATH:$LIBDIR/javassist.jar"
-WSPROVIDE_CLASSPATH="$WSPROVIDE_CLASSPATH:$LIBDIR/jbossall-client.jar"
-WSPROVIDE_CLASSPATH="$WSPROVIDE_CLASSPATH:$LIBDIR/jbossws-client.jar"
-WSPROVIDE_CLASSPATH="$WSPROVIDE_CLASSPATH:$LIBDIR/jboss-jaxws.jar"
-WSPROVIDE_CLASSPATH="$WSPROVIDE_CLASSPATH:$LIBDIR/jboss-jaxrpc.jar"
-WSPROVIDE_CLASSPATH="$WSPROVIDE_CLASSPATH:$LIBDIR/jboss-saaj.jar"
-WSPROVIDE_CLASSPATH="$WSPROVIDE_CLASSPATH:$LIBDIR/policy.jar"
-WSPROVIDE_CLASSPATH="$WSPROVIDE_CLASSPATH:$LIBDIR/wsdl4j.jar"
+if [ "x$JBOSSWS_NATIVE" = "x" ]; then
+ # JBossWS-Metro stack libraries
+ echo "JBossWS-Metro stack deployed"
+ WSPROVIDE_CLASSPATH="$WSPROVIDE_CLASSPATH:$LIBDIR/jbossws-metro-client.jar"
+ WSPROVIDE_CLASSPATH="$WSPROVIDE_CLASSPATH:$LIBDIR/jaxws-api.jar"
+ WSPROVIDE_CLASSPATH="$WSPROVIDE_CLASSPATH:$LIBDIR/jsr181-api.jar"
+ WSPROVIDE_CLASSPATH="$WSPROVIDE_CLASSPATH:$LIBDIR/saaj-api.jar"
+ WSPROVIDE_CLASSPATH="$WSPROVIDE_CLASSPATH:$LIBDIR/saaj-impl.jar"
+else
+ # JBossWS-Native stack libraries
+ echo "JBossWS-Native stack deployed"
+ WSPROVIDE_CLASSPATH="$WSPROVIDE_CLASSPATH:$LIBDIR/jboss-xml-binding.jar"
+ WSPROVIDE_CLASSPATH="$WSPROVIDE_CLASSPATH:$LIBDIR/javassist.jar"
+ WSPROVIDE_CLASSPATH="$WSPROVIDE_CLASSPATH:$LIBDIR/jbossall-client.jar"
+ WSPROVIDE_CLASSPATH="$WSPROVIDE_CLASSPATH:$LIBDIR/jbossws-client.jar"
+ WSPROVIDE_CLASSPATH="$WSPROVIDE_CLASSPATH:$LIBDIR/jboss-jaxws.jar"
+ WSPROVIDE_CLASSPATH="$WSPROVIDE_CLASSPATH:$LIBDIR/jboss-jaxrpc.jar"
+ WSPROVIDE_CLASSPATH="$WSPROVIDE_CLASSPATH:$LIBDIR/jboss-saaj.jar"
+ WSPROVIDE_CLASSPATH="$WSPROVIDE_CLASSPATH:$LIBDIR/policy.jar"
+ WSPROVIDE_CLASSPATH="$WSPROVIDE_CLASSPATH:$LIBDIR/wsdl4j.jar"
+fi
###
# Execute the JVM