You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@servicemix.apache.org by gn...@apache.org on 2007/12/11 17:27:57 UTC
svn commit: r603290 - in /servicemix/smx4/runtime/trunk: ./
assembly/src/main/distribution/text/etc/
assembly/src/main/distribution/unix-shell/bin/
assembly/src/main/distribution/unix-shell/bin/linux/
assembly/src/main/distribution/unix-shell/bin/macos...
Author: gnodet
Date: Tue Dec 11 08:27:56 2007
New Revision: 603290
URL: http://svn.apache.org/viewvc?rev=603290&view=rev
Log:
Fix JSW scripts and other things
Modified:
servicemix/smx4/runtime/trunk/assembly/src/main/distribution/text/etc/login.conf (props changed)
servicemix/smx4/runtime/trunk/assembly/src/main/distribution/text/etc/org.apache.servicemix.management.cfg (contents, props changed)
servicemix/smx4/runtime/trunk/assembly/src/main/distribution/text/etc/org.apache.servicemix.shell.cfg (contents, props changed)
servicemix/smx4/runtime/trunk/assembly/src/main/distribution/text/etc/org.ops4j.pax.logging.cfg (props changed)
servicemix/smx4/runtime/trunk/assembly/src/main/distribution/unix-shell/bin/linux/servicemix-service
servicemix/smx4/runtime/trunk/assembly/src/main/distribution/unix-shell/bin/macosx/servicemix-service
servicemix/smx4/runtime/trunk/assembly/src/main/distribution/unix-shell/bin/servicemix
servicemix/smx4/runtime/trunk/assembly/src/main/distribution/unix-text/bin/linux/wrapper.conf (contents, props changed)
servicemix/smx4/runtime/trunk/assembly/src/main/distribution/unix-text/bin/macosx/wrapper.conf (contents, props changed)
servicemix/smx4/runtime/trunk/assembly/src/main/distribution/windows-text/bin/win32/wrapper.conf (contents, props changed)
servicemix/smx4/runtime/trunk/filemonitor/pom.xml
servicemix/smx4/runtime/trunk/filemonitor/src/main/java/org/apache/servicemix/runtime/filemonitor/FileMonitorActivator.java
servicemix/smx4/runtime/trunk/gshell/gshell-core/src/main/java/org/apache/geronimo/gshell/spring/GShell.java
servicemix/smx4/runtime/trunk/pom.xml
Propchange: servicemix/smx4/runtime/trunk/assembly/src/main/distribution/text/etc/login.conf
------------------------------------------------------------------------------
svn:eol-style = native
Modified: servicemix/smx4/runtime/trunk/assembly/src/main/distribution/text/etc/org.apache.servicemix.management.cfg
URL: http://svn.apache.org/viewvc/servicemix/smx4/runtime/trunk/assembly/src/main/distribution/text/etc/org.apache.servicemix.management.cfg?rev=603290&r1=603289&r2=603290&view=diff
==============================================================================
--- servicemix/smx4/runtime/trunk/assembly/src/main/distribution/text/etc/org.apache.servicemix.management.cfg (original)
+++ servicemix/smx4/runtime/trunk/assembly/src/main/distribution/text/etc/org.apache.servicemix.management.cfg Tue Dec 11 08:27:56 2007
@@ -1,27 +1,27 @@
-################################################################################
-#
-# Licensed to the Apache Software Foundation (ASF) under one or more
-# contributor license agreements. See the NOTICE file distributed with
-# this work for additional information regarding copyright ownership.
-# The ASF licenses this file to You under the Apache License, Version 2.0
-# (the "License"); you may not use this file except in compliance with
-# the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-################################################################################
-
-#
-rmiRegistryPort = 1099
-jmxLogin = smx
-jmxPassword = smx
-serviceUrl = service:jmx:rmi:///jndi/rmi://localhost:1099/jmxrmi
-daemon = true
-threaded = true
-objectName = connector:name=rmi
+################################################################################
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+################################################################################
+
+#
+rmiRegistryPort = 1099
+jmxLogin = smx
+jmxPassword = smx
+serviceUrl = service:jmx:rmi:///jndi/rmi://localhost:1099/jmxrmi
+daemon = true
+threaded = true
+objectName = connector:name=rmi
Propchange: servicemix/smx4/runtime/trunk/assembly/src/main/distribution/text/etc/org.apache.servicemix.management.cfg
------------------------------------------------------------------------------
svn:eol-style = native
Modified: servicemix/smx4/runtime/trunk/assembly/src/main/distribution/text/etc/org.apache.servicemix.shell.cfg
URL: http://svn.apache.org/viewvc/servicemix/smx4/runtime/trunk/assembly/src/main/distribution/text/etc/org.apache.servicemix.shell.cfg?rev=603290&r1=603289&r2=603290&view=diff
==============================================================================
--- servicemix/smx4/runtime/trunk/assembly/src/main/distribution/text/etc/org.apache.servicemix.shell.cfg (original)
+++ servicemix/smx4/runtime/trunk/assembly/src/main/distribution/text/etc/org.apache.servicemix.shell.cfg Tue Dec 11 08:27:56 2007
@@ -18,6 +18,6 @@
################################################################################
#
-startLocalConsole=true
-startRemoteShell=true
+startLocalConsole=${servicemix.startLocalConsole}
+startRemoteShell=${servicemix.startRemoteShell}
remoteShellLocation=tcp://0.0.0.0:8101/
Propchange: servicemix/smx4/runtime/trunk/assembly/src/main/distribution/text/etc/org.apache.servicemix.shell.cfg
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: servicemix/smx4/runtime/trunk/assembly/src/main/distribution/text/etc/org.ops4j.pax.logging.cfg
------------------------------------------------------------------------------
svn:eol-style = native
Modified: servicemix/smx4/runtime/trunk/assembly/src/main/distribution/unix-shell/bin/linux/servicemix-service
URL: http://svn.apache.org/viewvc/servicemix/smx4/runtime/trunk/assembly/src/main/distribution/unix-shell/bin/linux/servicemix-service?rev=603290&r1=603289&r2=603290&view=diff
==============================================================================
--- servicemix/smx4/runtime/trunk/assembly/src/main/distribution/unix-shell/bin/linux/servicemix-service (original)
+++ servicemix/smx4/runtime/trunk/assembly/src/main/distribution/unix-shell/bin/linux/servicemix-service Tue Dec 11 08:27:56 2007
@@ -7,9 +7,9 @@
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License. You may obtain a copy of the License at
-#
+#
# http://www.apache.org/licenses/LICENSE-2.0
-#
+#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -20,7 +20,6 @@
# Application
APP_NAME="ServiceMix"
APP_LONG_NAME="ServiceMix Server"
-ACTIVEMQ_HOME="../.."
# Wrapper
WRAPPER_CMD="wrapper"
@@ -244,7 +243,7 @@
fi
fi
fi
-
+
# Build the nice clause
if [ "X$PRIORITY" = "X" ]
then
@@ -287,7 +286,7 @@
exit 1
fi
fi
-
+
if [ "`$IDEXE -u -n`" = "$RUN_AS_USER" ]
then
# Already running as the configured user. Avoid password prompts by not calling su.
@@ -304,7 +303,7 @@
then
if [ "X$2" != "X" ]
then
- # Resolve the primary group
+ # Resolve the primary group
RUN_AS_GROUP=`groups $RUN_AS_USER | awk '{print $3}' | tail -1`
if [ "X$RUN_AS_GROUP" = "X" ]
then
@@ -350,7 +349,7 @@
# common is during system startup after an unclean shutdown.
# The ps statement below looks for the specific wrapper command running as
# the pid. If it is not found then the pid file is considered to be stale.
- pidtest=`$PSEXE -p $pid -o args | grep $WRAPPER_CMD | tail -1`
+ pidtest=`$PSEXE -p $pid -o command | grep $WRAPPER_CMD | tail -1`
if [ "X$pidtest" = "X" ]
then
# This is a stale pid file.
@@ -388,12 +387,18 @@
exit 1
fi
}
-
+
start() {
echo "Starting $APP_LONG_NAME..."
getpid
if [ "X$pid" = "X" ]
then
+ if [ ! -d ../../data ]; then
+ mkdir ../../data
+ fi
+ if [ ! -d ../../data/log ]; then
+ mkdir ../../data/log
+ fi
COMMAND_LINE="$CMDNICE $WRAPPER_CMD $WRAPPER_CONF wrapper.syslog.ident=$APP_NAME wrapper.pidfile=$PIDFILE wrapper.daemonize=TRUE $ANCHORPROP $IGNOREPROP $LOCKPROP"
exec $COMMAND_LINE
else
@@ -401,7 +406,7 @@
exit 1
fi
}
-
+
stopit() {
echo "Stopping $APP_LONG_NAME..."
getpid
Modified: servicemix/smx4/runtime/trunk/assembly/src/main/distribution/unix-shell/bin/macosx/servicemix-service
URL: http://svn.apache.org/viewvc/servicemix/smx4/runtime/trunk/assembly/src/main/distribution/unix-shell/bin/macosx/servicemix-service?rev=603290&r1=603289&r2=603290&view=diff
==============================================================================
--- servicemix/smx4/runtime/trunk/assembly/src/main/distribution/unix-shell/bin/macosx/servicemix-service (original)
+++ servicemix/smx4/runtime/trunk/assembly/src/main/distribution/unix-shell/bin/macosx/servicemix-service Tue Dec 11 08:27:56 2007
@@ -7,9 +7,9 @@
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License. You may obtain a copy of the License at
-#
+#
# http://www.apache.org/licenses/LICENSE-2.0
-#
+#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -243,7 +243,7 @@
fi
fi
fi
-
+
# Build the nice clause
if [ "X$PRIORITY" = "X" ]
then
@@ -286,7 +286,7 @@
exit 1
fi
fi
-
+
if [ "`$IDEXE -u -n`" = "$RUN_AS_USER" ]
then
# Already running as the configured user. Avoid password prompts by not calling su.
@@ -303,7 +303,7 @@
then
if [ "X$2" != "X" ]
then
- # Resolve the primary group
+ # Resolve the primary group
RUN_AS_GROUP=`groups $RUN_AS_USER | awk '{print $3}' | tail -1`
if [ "X$RUN_AS_GROUP" = "X" ]
then
@@ -349,7 +349,7 @@
# common is during system startup after an unclean shutdown.
# The ps statement below looks for the specific wrapper command running as
# the pid. If it is not found then the pid file is considered to be stale.
- pidtest=`$PSEXE -p $pid -o args | grep $WRAPPER_CMD | tail -1`
+ pidtest=`$PSEXE -p $pid -o command | grep $WRAPPER_CMD | tail -1`
if [ "X$pidtest" = "X" ]
then
# This is a stale pid file.
@@ -387,12 +387,18 @@
exit 1
fi
}
-
+
start() {
echo "Starting $APP_LONG_NAME..."
getpid
if [ "X$pid" = "X" ]
then
+ if [ ! -d ../../data ]; then
+ mkdir ../../data
+ fi
+ if [ ! -d ../../data/log ]; then
+ mkdir ../../data/log
+ fi
COMMAND_LINE="$CMDNICE $WRAPPER_CMD $WRAPPER_CONF wrapper.syslog.ident=$APP_NAME wrapper.pidfile=$PIDFILE wrapper.daemonize=TRUE $ANCHORPROP $IGNOREPROP $LOCKPROP"
exec $COMMAND_LINE
else
@@ -400,7 +406,7 @@
exit 1
fi
}
-
+
stopit() {
echo "Stopping $APP_LONG_NAME..."
getpid
Modified: servicemix/smx4/runtime/trunk/assembly/src/main/distribution/unix-shell/bin/servicemix
URL: http://svn.apache.org/viewvc/servicemix/smx4/runtime/trunk/assembly/src/main/distribution/unix-shell/bin/servicemix?rev=603290&r1=603289&r2=603290&view=diff
==============================================================================
--- servicemix/smx4/runtime/trunk/assembly/src/main/distribution/unix-shell/bin/servicemix (original)
+++ servicemix/smx4/runtime/trunk/assembly/src/main/distribution/unix-shell/bin/servicemix Tue Dec 11 08:27:56 2007
@@ -75,7 +75,7 @@
if $aix; then
export LDR_CNTRL=MAXDATA=0xB0000000@DSA
export IBM_JAVA_HEAPDUMP_TEXT=true
- echo $LDR_CNTRL
+ echo $LDR_CNTRL
fi
}
@@ -84,7 +84,7 @@
if [ "x$MAX_FD" = "x" ]; then
MAX_FD="maximum"
fi
-
+
# Increase the maximum file descriptors if we can
if [ "$os400" = "false" ] && [ "$cygwin" = "false" ]; then
MAX_FD_LIMIT=`ulimit -H -n`
@@ -93,7 +93,7 @@
# use the system max
MAX_FD="$MAX_FD_LIMIT"
fi
-
+
ulimit -n $MAX_FD
# echo "ulimit -n" `ulimit -n`
if [ $? -ne 0 ]; then
@@ -109,7 +109,7 @@
if [ "x$SERVICEMIX_HOME" != "x" ]; then
warn "Ignoring predefined value for SERVICEMIX_HOME"
fi
-
+
SERVICEMIX_HOME=`cd $DIRNAME/..; pwd`
if [ ! -d "$SERVICEMIX_HOME" ]; then
die "SERVICEMIX_HOME is not valid: $SERVICEMIX_HOME"
@@ -129,7 +129,7 @@
setupNativePath() {
# Support for loading native libraries
LD_LIBRARY_PATH="${LD_LIBRARY_PATH}:$SERVICEMIX_BASE/lib:$SERVICEMIX_HOME/lib"
-
+
# For Cygwin, set PATH from LD_LIBRARY_PATH
if $cygwin; then
LD_LIBRARY_PATH=`cygpath --path --windows "$LD_LIBRARY_PATH"`
@@ -164,7 +164,7 @@
detectJVM() {
#echo "`$JAVA -version`"
- # This service should call `java -version`,
+ # This service should call `java -version`,
# read stdout, and look for hints
if $JAVA -version 2>&1 | grep "^IBM" ; then
JVM_VENDOR="IBM"
@@ -182,14 +182,14 @@
JAVA_OPTS="$DEFAULT_JAVA_OPTS"
fi
export JAVA_OPTS
-
+
# Set Debug options if enabled
if [ "x$SERVICEMIX_DEBUG" != "x" ]; then
# Use the defaults if JAVA_DEBUG_OPTS was not set
if [ "x$JAVA_DEBUG_OPTS" = "x" ]; then
JAVA_DEBUG_OPTS="$DEFAULT_JAVA_DEBUG_OPTS"
fi
-
+
JAVA_OPTS="$JAVA_DEBUG_OPTS $JAVA_OPTS"
warn "Enabling Java debug options: $JAVA_DEBUG_OPTS"
fi
@@ -214,7 +214,7 @@
# Add the conf directory so it picks up the Log4J config
CLASSPATH="$CLASSPATH:$SERVICEMIX_BASE/conf"
DEFAULT_JAVA_DEBUG_OPTS="-Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=5005"
-
+
##
## TODO: Move to conf/profiler/yourkit.{sh|cmd}
##
@@ -225,40 +225,55 @@
init() {
# Determine if there is special OS handling we must perform
detectOS
-
+
# Unlimit the number of file descriptors if possible
unlimitFD
-
+
# Locate the ServiceMix home directory
locateHome
# Locate the ServiceMix base directory
locateBase
-
+
# Setup the native library path
setupNativePath
-
+
# Locate the Java VM to execute
locateJava
-
+
# Determine the JVM vendor
detectJVM
-
+
# Setup default options
setupDefaults
-
+
# Install debug options
setupDebugOptions
-
+
}
run() {
+ OPTS="-Dservicemix.startLocalConsole=true -Dservicemix.startRemoteShell=true"
+ case "$1" in
+ 'console')
+ shift
+ ;;
+ 'server')
+ OPTS="-Dservicemix.startLocalConsole=false -Dservicemix.startRemoteShell=true"
+ shift
+ ;;
+ 'client')
+ OPTS="-Dservicemix.startLocalConsole=true -Dservicemix.startRemoteShell=false"
+ shift
+ ;;
+ esac
+
JAR=$SERVICEMIX_HOME/bin/servicemix.jar
if $cygwin; then
SERVICEMIX_HOME=`cygpath --path --windows "$SERVICEMIX_HOME"`
SERVICEMIX_BASE=`cygpath --path --windows "$SERVICEMIX_BASE"`
fi
- exec $JAVA $JAVA_OPTS -Dservicemix.home="$SERVICEMIX_HOME" -Dservicemix.base="$SERVICEMIX_BASE" -jar "$JAR" $*
+ exec $JAVA $JAVA_OPTS -Dservicemix.home="$SERVICEMIX_HOME" -Dservicemix.base="$SERVICEMIX_BASE" $OPTS -jar "$JAR" $*
}
main() {
Modified: servicemix/smx4/runtime/trunk/assembly/src/main/distribution/unix-text/bin/linux/wrapper.conf
URL: http://svn.apache.org/viewvc/servicemix/smx4/runtime/trunk/assembly/src/main/distribution/unix-text/bin/linux/wrapper.conf?rev=603290&r1=603289&r2=603290&view=diff
==============================================================================
--- servicemix/smx4/runtime/trunk/assembly/src/main/distribution/unix-text/bin/linux/wrapper.conf (original)
+++ servicemix/smx4/runtime/trunk/assembly/src/main/distribution/unix-text/bin/linux/wrapper.conf Tue Dec 11 08:27:56 2007
@@ -5,9 +5,9 @@
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License. You may obtain a copy of the License at
-#
+#
# http://www.apache.org/licenses/LICENSE-2.0
-#
+#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -20,8 +20,8 @@
#********************************************************************
#wrapper.debug=TRUE
-set.default.ACTIVEMQ_HOME=../..
-set.default.ACTIVEMQ_BASE=../..
+set.default.SERVICEMIX_HOME=../..
+set.default.SERVICEMIX_BASE=../..
wrapper.working.dir=.
# Java Application
@@ -35,34 +35,30 @@
# Java Classpath (include wrapper.jar) Add class path elements as
# needed starting from 1
-wrapper.java.classpath.1=%ACTIVEMQ_HOME%/bin/wrapper.jar
-wrapper.java.classpath.2=%ACTIVEMQ_HOME%/bin/run.jar
+wrapper.java.classpath.1=%SERVICEMIX_HOME%/bin/wrapper.jar
+wrapper.java.classpath.2=%SERVICEMIX_HOME%/bin/servicemix.jar
# Java Library Path (location of Wrapper.DLL or libwrapper.so)
-wrapper.java.library.path.1=%ACTIVEMQ_HOME%/bin/linux/
+wrapper.java.library.path.1=%SERVICEMIX_HOME%/bin/macosx/
# Java Additional Parameters
# note that n is the parameter number starting from 1.
-wrapper.java.additional.1=-Dactivemq.home=%ACTIVEMQ_HOME%
-wrapper.java.additional.2=-Dactivemq.base=%ACTIVEMQ_BASE%
-wrapper.java.additional.3=-Djavax.net.ssl.keyStorePassword=password
-wrapper.java.additional.4=-Djavax.net.ssl.trustStorePassword=password
-wrapper.java.additional.5=-Djavax.net.ssl.keyStore=%ACTIVEMQ_BASE%/conf/broker.ks
-wrapper.java.additional.6=-Djavax.net.ssl.trustStore=%ACTIVEMQ_BASE%/conf/broker.ts
-wrapper.java.additional.7=-Dcom.sun.management.jmxremote
-wrapper.java.additional.8=-Dorg.apache.activemq.UseDedicatedTaskRunner=true
-wrapper.java.additional.9=-Dderby.storage.fileSyncTransactionLog=true
+wrapper.java.additional.1=-Dservicemix.home=%SERVICEMIX_HOME%
+wrapper.java.additional.2=-Dservicemix.base=%SERVICEMIX_BASE%
+wrapper.java.additional.3=-Dcom.sun.management.jmxremote
+wrapper.java.additional.4=-Dservicemix.startLocalConsole=false
+wrapper.java.additional.5=-Dservicemix.startRemoteShell=true
# Uncomment to enable jmx
-#wrapper.java.additional.n=-Dcom.sun.management.jmxremote.port=1616
-#wrapper.java.additional.n=-Dcom.sun.management.jmxremote.authenticate=false
+#wrapper.java.additional.n=-Dcom.sun.management.jmxremote.port=1616
+#wrapper.java.additional.n=-Dcom.sun.management.jmxremote.authenticate=false
#wrapper.java.additional.n=-Dcom.sun.management.jmxremote.ssl=false
# Uncomment to enable YourKit profiling
#wrapper.java.additional.n=-Xrunyjpagent
# Uncomment to enable remote debugging
-#wrapper.java.additional.n=-Xdebug -Xnoagent -Djava.compiler=NONE
+#wrapper.java.additional.n=-Xdebug -Xnoagent -Djava.compiler=NONE
#wrapper.java.additional.n=-Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=5005
# Initial Java Heap Size (in MB)
@@ -72,7 +68,7 @@
wrapper.java.maxmemory=512
# Application parameters. Add parameters as needed starting from 1
-wrapper.app.parameter.1=org.apache.activemq.console.Main
+wrapper.app.parameter.1=org.apache.servicemix.runtime.main.Main
#********************************************************************
# Wrapper Logging Properties
@@ -84,7 +80,7 @@
wrapper.console.loglevel=INFO
# Log file to use for wrapper output logging.
-wrapper.logfile=%ACTIVEMQ_BASE%/activemq-data/wrapper.log
+wrapper.logfile=%SERVICEMIX_BASE%/data/log/wrapper.log
# Format of output for the log file. (See docs for formats)
wrapper.logfile.format=LPTM
@@ -109,7 +105,7 @@
# Wrapper Windows Properties
#********************************************************************
# Title to use when running as a console
-wrapper.console.title=ActiveMQ
+wrapper.console.title=ServiceMix
#********************************************************************
# Wrapper Windows NT/2000/XP Service Properties
@@ -120,13 +116,13 @@
# service can then be reinstalled.
# Name of the service
-wrapper.ntservice.name=ActiveMQ
+wrapper.ntservice.name=ServiceMix
# Display name of the service
-wrapper.ntservice.displayname=ActiveMQ
+wrapper.ntservice.displayname=ServiceMix
# Description of the service
-wrapper.ntservice.description=ActiveMQ Broker
+wrapper.ntservice.description=ServiceMix Broker
# Service dependencies. Add dependencies as needed starting from 1
wrapper.ntservice.dependency.1=
Propchange: servicemix/smx4/runtime/trunk/assembly/src/main/distribution/unix-text/bin/linux/wrapper.conf
------------------------------------------------------------------------------
svn:eol-style = native
Modified: servicemix/smx4/runtime/trunk/assembly/src/main/distribution/unix-text/bin/macosx/wrapper.conf
URL: http://svn.apache.org/viewvc/servicemix/smx4/runtime/trunk/assembly/src/main/distribution/unix-text/bin/macosx/wrapper.conf?rev=603290&r1=603289&r2=603290&view=diff
==============================================================================
--- servicemix/smx4/runtime/trunk/assembly/src/main/distribution/unix-text/bin/macosx/wrapper.conf (original)
+++ servicemix/smx4/runtime/trunk/assembly/src/main/distribution/unix-text/bin/macosx/wrapper.conf Tue Dec 11 08:27:56 2007
@@ -5,9 +5,9 @@
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License. You may obtain a copy of the License at
-#
+#
# http://www.apache.org/licenses/LICENSE-2.0
-#
+#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -20,8 +20,8 @@
#********************************************************************
#wrapper.debug=TRUE
-set.default.ACTIVEMQ_HOME=../..
-set.default.ACTIVEMQ_BASE=../..
+set.default.SERVICEMIX_HOME=../..
+set.default.SERVICEMIX_BASE=../..
wrapper.working.dir=.
# Java Application
@@ -35,34 +35,30 @@
# Java Classpath (include wrapper.jar) Add class path elements as
# needed starting from 1
-wrapper.java.classpath.1=%ACTIVEMQ_HOME%/bin/wrapper.jar
-wrapper.java.classpath.2=%ACTIVEMQ_HOME%/bin/run.jar
+wrapper.java.classpath.1=%SERVICEMIX_HOME%/bin/wrapper.jar
+wrapper.java.classpath.2=%SERVICEMIX_HOME%/bin/servicemix.jar
# Java Library Path (location of Wrapper.DLL or libwrapper.so)
-wrapper.java.library.path.1=%ACTIVEMQ_HOME%/bin/macosx/
+wrapper.java.library.path.1=%SERVICEMIX_HOME%/bin/macosx/
# Java Additional Parameters
# note that n is the parameter number starting from 1.
-wrapper.java.additional.1=-Dactivemq.home=%ACTIVEMQ_HOME%
-wrapper.java.additional.2=-Dactivemq.base=%ACTIVEMQ_BASE%
-wrapper.java.additional.3=-Djavax.net.ssl.keyStorePassword=password
-wrapper.java.additional.4=-Djavax.net.ssl.trustStorePassword=password
-wrapper.java.additional.5=-Djavax.net.ssl.keyStore=%ACTIVEMQ_BASE%/conf/broker.ks
-wrapper.java.additional.6=-Djavax.net.ssl.trustStore=%ACTIVEMQ_BASE%/conf/broker.ts
-wrapper.java.additional.7=-Dcom.sun.management.jmxremote
-wrapper.java.additional.8=-Dorg.apache.activemq.UseDedicatedTaskRunner=true
-wrapper.java.additional.9=-Dderby.storage.fileSyncTransactionLog=true
+wrapper.java.additional.1=-Dservicemix.home=%SERVICEMIX_HOME%
+wrapper.java.additional.2=-Dservicemix.base=%SERVICEMIX_BASE%
+wrapper.java.additional.3=-Dcom.sun.management.jmxremote
+wrapper.java.additional.4=-Dservicemix.startLocalConsole=false
+wrapper.java.additional.5=-Dservicemix.startRemoteShell=true
# Uncomment to enable jmx
-#wrapper.java.additional.n=-Dcom.sun.management.jmxremote.port=1616
-#wrapper.java.additional.n=-Dcom.sun.management.jmxremote.authenticate=false
+#wrapper.java.additional.n=-Dcom.sun.management.jmxremote.port=1616
+#wrapper.java.additional.n=-Dcom.sun.management.jmxremote.authenticate=false
#wrapper.java.additional.n=-Dcom.sun.management.jmxremote.ssl=false
# Uncomment to enable YourKit profiling
#wrapper.java.additional.n=-Xrunyjpagent
# Uncomment to enable remote debugging
-#wrapper.java.additional.n=-Xdebug -Xnoagent -Djava.compiler=NONE
+#wrapper.java.additional.n=-Xdebug -Xnoagent -Djava.compiler=NONE
#wrapper.java.additional.n=-Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=5005
# Initial Java Heap Size (in MB)
@@ -72,7 +68,7 @@
wrapper.java.maxmemory=512
# Application parameters. Add parameters as needed starting from 1
-wrapper.app.parameter.1=org.apache.activemq.console.Main
+wrapper.app.parameter.1=org.apache.servicemix.runtime.main.Main
#********************************************************************
# Wrapper Logging Properties
@@ -84,7 +80,7 @@
wrapper.console.loglevel=INFO
# Log file to use for wrapper output logging.
-wrapper.logfile=%ACTIVEMQ_BASE%/activemq-data/wrapper.log
+wrapper.logfile=%SERVICEMIX_BASE%/data/log/wrapper.log
# Format of output for the log file. (See docs for formats)
wrapper.logfile.format=LPTM
@@ -109,7 +105,7 @@
# Wrapper Windows Properties
#********************************************************************
# Title to use when running as a console
-wrapper.console.title=ActiveMQ
+wrapper.console.title=ServiceMix
#********************************************************************
# Wrapper Windows NT/2000/XP Service Properties
@@ -120,13 +116,13 @@
# service can then be reinstalled.
# Name of the service
-wrapper.ntservice.name=ActiveMQ
+wrapper.ntservice.name=ServiceMix
# Display name of the service
-wrapper.ntservice.displayname=ActiveMQ
+wrapper.ntservice.displayname=ServiceMix
# Description of the service
-wrapper.ntservice.description=ActiveMQ Broker
+wrapper.ntservice.description=ServiceMix Broker
# Service dependencies. Add dependencies as needed starting from 1
wrapper.ntservice.dependency.1=
Propchange: servicemix/smx4/runtime/trunk/assembly/src/main/distribution/unix-text/bin/macosx/wrapper.conf
------------------------------------------------------------------------------
svn:eol-style = native
Modified: servicemix/smx4/runtime/trunk/assembly/src/main/distribution/windows-text/bin/win32/wrapper.conf
URL: http://svn.apache.org/viewvc/servicemix/smx4/runtime/trunk/assembly/src/main/distribution/windows-text/bin/win32/wrapper.conf?rev=603290&r1=603289&r2=603290&view=diff
==============================================================================
--- servicemix/smx4/runtime/trunk/assembly/src/main/distribution/windows-text/bin/win32/wrapper.conf (original)
+++ servicemix/smx4/runtime/trunk/assembly/src/main/distribution/windows-text/bin/win32/wrapper.conf Tue Dec 11 08:27:56 2007
@@ -5,9 +5,9 @@
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License. You may obtain a copy of the License at
-#
+#
# http://www.apache.org/licenses/LICENSE-2.0
-#
+#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -19,13 +19,13 @@
# Wrapper Properties
#********************************************************************
-# wrapper.debug=TRUE
-set.default.ACTIVEMQ_HOME=../..
-set.default.ACTIVEMQ_BASE=../..
+#wrapper.debug=TRUE
+set.default.SERVICEMIX_HOME=../..
+set.default.SERVICEMIX_BASE=../..
wrapper.working.dir=.
# Java Application
-wrapper.java.command=%JAVA_HOME%/bin/java
+wrapper.java.command=java
# Java Main class. This class must implement the WrapperListener interface
# or guarantee that the WrapperManager class is initialized. Helper
@@ -35,34 +35,30 @@
# Java Classpath (include wrapper.jar) Add class path elements as
# needed starting from 1
-wrapper.java.classpath.1=%ACTIVEMQ_HOME%/bin/wrapper.jar
-wrapper.java.classpath.2=%ACTIVEMQ_HOME%/bin/run.jar
+wrapper.java.classpath.1=%SERVICEMIX_HOME%/bin/wrapper.jar
+wrapper.java.classpath.2=%SERVICEMIX_HOME%/bin/servicemix.jar
# Java Library Path (location of Wrapper.DLL or libwrapper.so)
-wrapper.java.library.path.1=%ACTIVEMQ_HOME%/bin/win32
+wrapper.java.library.path.1=%SERVICEMIX_HOME%/bin/macosx/
# Java Additional Parameters
# note that n is the parameter number starting from 1.
-wrapper.java.additional.1=-Dactivemq.home="%ACTIVEMQ_HOME%"
-wrapper.java.additional.2=-Dactivemq.base="%ACTIVEMQ_BASE%"
-wrapper.java.additional.3=-Djavax.net.ssl.keyStorePassword=password
-wrapper.java.additional.4=-Djavax.net.ssl.trustStorePassword=password
-wrapper.java.additional.5=-Djavax.net.ssl.keyStore="%ACTIVEMQ_BASE%/conf/broker.ks"
-wrapper.java.additional.6=-Djavax.net.ssl.trustStore="%ACTIVEMQ_BASE%/conf/broker.ts"
-wrapper.java.additional.7=-Dcom.sun.management.jmxremote
-wrapper.java.additional.8=-Dorg.apache.activemq.UseDedicatedTaskRunner=true
-wrapper.java.additional.9=-Dderby.storage.fileSyncTransactionLog=true
-
-# Uncomment to enable remote jmx
-#wrapper.java.additional.n=-Dcom.sun.management.jmxremote.port=1616
-#wrapper.java.additional.n=-Dcom.sun.management.jmxremote.authenticate=false
+wrapper.java.additional.1=-Dservicemix.home=%SERVICEMIX_HOME%
+wrapper.java.additional.2=-Dservicemix.base=%SERVICEMIX_BASE%
+wrapper.java.additional.3=-Dcom.sun.management.jmxremote
+wrapper.java.additional.4=-Dservicemix.startLocalConsole=false
+wrapper.java.additional.5=-Dservicemix.startRemoteShell=true
+
+# Uncomment to enable jmx
+#wrapper.java.additional.n=-Dcom.sun.management.jmxremote.port=1616
+#wrapper.java.additional.n=-Dcom.sun.management.jmxremote.authenticate=false
#wrapper.java.additional.n=-Dcom.sun.management.jmxremote.ssl=false
# Uncomment to enable YourKit profiling
#wrapper.java.additional.n=-Xrunyjpagent
# Uncomment to enable remote debugging
-#wrapper.java.additional.n=-Xdebug -Xnoagent -Djava.compiler=NONE
+#wrapper.java.additional.n=-Xdebug -Xnoagent -Djava.compiler=NONE
#wrapper.java.additional.n=-Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=5005
# Initial Java Heap Size (in MB)
@@ -72,7 +68,7 @@
wrapper.java.maxmemory=512
# Application parameters. Add parameters as needed starting from 1
-wrapper.app.parameter.1=org.apache.activemq.console.Main
+wrapper.app.parameter.1=org.apache.servicemix.runtime.main.Main
#********************************************************************
# Wrapper Logging Properties
@@ -84,7 +80,7 @@
wrapper.console.loglevel=INFO
# Log file to use for wrapper output logging.
-wrapper.logfile=%ACTIVEMQ_BASE%/activemq-data/wrapper.log
+wrapper.logfile=%SERVICEMIX_BASE%/data/log/wrapper.log
# Format of output for the log file. (See docs for formats)
wrapper.logfile.format=LPTM
@@ -109,7 +105,7 @@
# Wrapper Windows Properties
#********************************************************************
# Title to use when running as a console
-wrapper.console.title=ActiveMQ
+wrapper.console.title=ServiceMix
#********************************************************************
# Wrapper Windows NT/2000/XP Service Properties
@@ -120,13 +116,13 @@
# service can then be reinstalled.
# Name of the service
-wrapper.ntservice.name=ActiveMQ
+wrapper.ntservice.name=ServiceMix
# Display name of the service
-wrapper.ntservice.displayname=ActiveMQ
+wrapper.ntservice.displayname=ServiceMix
# Description of the service
-wrapper.ntservice.description=ActiveMQ Broker
+wrapper.ntservice.description=ServiceMix Broker
# Service dependencies. Add dependencies as needed starting from 1
wrapper.ntservice.dependency.1=
Propchange: servicemix/smx4/runtime/trunk/assembly/src/main/distribution/windows-text/bin/win32/wrapper.conf
------------------------------------------------------------------------------
svn:eol-style = native
Modified: servicemix/smx4/runtime/trunk/filemonitor/pom.xml
URL: http://svn.apache.org/viewvc/servicemix/smx4/runtime/trunk/filemonitor/pom.xml?rev=603290&r1=603289&r2=603290&view=diff
==============================================================================
--- servicemix/smx4/runtime/trunk/filemonitor/pom.xml (original)
+++ servicemix/smx4/runtime/trunk/filemonitor/pom.xml Tue Dec 11 08:27:56 2007
@@ -79,6 +79,19 @@
<version>${junit.version}</version>
<scope>test</scope>
</dependency>
+
+ <dependency>
+ <groupId>org.apache.ant</groupId>
+ <artifactId>ant</artifactId>
+ <version>${ant.version}</version>
+ <optional>true</optional>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.ant</groupId>
+ <artifactId>ant-launcher</artifactId>
+ <version>${ant.version}</version>
+ <optional>true</optional>
+ </dependency>
</dependencies>
<build>
Modified: servicemix/smx4/runtime/trunk/filemonitor/src/main/java/org/apache/servicemix/runtime/filemonitor/FileMonitorActivator.java
URL: http://svn.apache.org/viewvc/servicemix/smx4/runtime/trunk/filemonitor/src/main/java/org/apache/servicemix/runtime/filemonitor/FileMonitorActivator.java?rev=603290&r1=603289&r2=603290&view=diff
==============================================================================
--- servicemix/smx4/runtime/trunk/filemonitor/src/main/java/org/apache/servicemix/runtime/filemonitor/FileMonitorActivator.java (original)
+++ servicemix/smx4/runtime/trunk/filemonitor/src/main/java/org/apache/servicemix/runtime/filemonitor/FileMonitorActivator.java Tue Dec 11 08:27:56 2007
@@ -60,6 +60,7 @@
Hashtable initialProperties = new Hashtable();
setPropertiesFromContext(initialProperties,
+ FileMonitor.CONFIG_DIR,
FileMonitor.DEPLOY_DIR,
FileMonitor.GENERATED_JAR_DIR,
FileMonitor.SCAN_INTERVAL
Modified: servicemix/smx4/runtime/trunk/gshell/gshell-core/src/main/java/org/apache/geronimo/gshell/spring/GShell.java
URL: http://svn.apache.org/viewvc/servicemix/smx4/runtime/trunk/gshell/gshell-core/src/main/java/org/apache/geronimo/gshell/spring/GShell.java?rev=603290&r1=603289&r2=603290&view=diff
==============================================================================
--- servicemix/smx4/runtime/trunk/gshell/gshell-core/src/main/java/org/apache/geronimo/gshell/spring/GShell.java (original)
+++ servicemix/smx4/runtime/trunk/gshell/gshell-core/src/main/java/org/apache/geronimo/gshell/spring/GShell.java Tue Dec 11 08:27:56 2007
@@ -16,39 +16,39 @@
*/
package org.apache.geronimo.gshell.spring;
-import java.util.Arrays;
import java.util.concurrent.CountDownLatch;
-import java.util.concurrent.TimeUnit;
import org.apache.geronimo.gshell.DefaultEnvironment;
import org.apache.geronimo.gshell.ExitNotification;
import org.apache.geronimo.gshell.command.IO;
+import org.apache.geronimo.gshell.common.Arguments;
import org.apache.geronimo.gshell.shell.Environment;
import org.apache.geronimo.gshell.shell.InteractiveShell;
import org.apache.servicemix.runtime.main.spi.MainService;
import org.osgi.framework.BundleContext;
import org.osgi.framework.BundleException;
-import org.osgi.framework.FrameworkEvent;
-import org.osgi.framework.FrameworkListener;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import org.springframework.osgi.context.BundleContextAware;
/**
- * Created by IntelliJ IDEA.
- * User: gnodet
- * Date: Oct 11, 2007
- * Time: 10:20:37 PM
- * To change this template use File | Settings | File Templates.
+ * This class represents the local shell console and is also used when passing a command to execute on the command line.
+ * Such mechanism is done using the {@link MainService} service registered in the OSGi registry, which contains the
+ * command line arguments and a place holder for the exit code.
*/
public class GShell implements Runnable, BundleContextAware {
+ private static final Logger log = LoggerFactory.getLogger(GShell.class);
+
private InteractiveShell shell;
private Thread thread;
private IO io;
private Environment env;
private boolean start;
private MainService mainService;
- private BundleContext bundleContext;
- private CountDownLatch frameworkStarted;
+ private BundleContext bundleContext;
+ private CountDownLatch frameworkStarted;
+
public GShell(InteractiveShell shell) {
this.shell = shell;
this.io = new IO(System.in, System.out, System.err);
@@ -60,7 +60,7 @@
}
public void start() {
- frameworkStarted = new CountDownLatch(1);
+ frameworkStarted = new CountDownLatch(1);
if (start) {
thread = new Thread(this);
thread.start();
@@ -69,66 +69,70 @@
public void stop() throws InterruptedException {
if (thread != null) {
- frameworkStarted.countDown();
+ frameworkStarted.countDown();
thread.interrupt();
thread.join();
thread = null;
}
+ Thread.dumpStack();
}
public void run() {
- try {
+ try {
IOTargetSource.setIO(io);
EnvironmentTargetSource.setEnvironment(env);
-
- String[] args=null;
- if( mainService != null ) {
- args = mainService.getArgs();
- }
-
- // If a command was specified on the command line, then just execute that command.
- if (args != null && args.length > 0) {
- waitForFrameworkToStart();
- Object value = shell.execute((Object[])args);
- if (mainService != null) {
- if( value instanceof Number ) {
- mainService.setExitCode(((Number)value).intValue());
- } else {
- mainService.setExitCode(value!=null?1:0);
- }
- }
- } else {
- // Otherwise go into a command shell.
- shell.run();
- if( mainService!=null ) {
- mainService.setExitCode(0);
- }
- }
-
+
+ String[] args = null;
+ if (mainService != null) {
+ args = mainService.getArgs();
+ }
+
+ // If a command was specified on the command line, then just execute that command.
+ if (args != null && args.length > 0) {
+ waitForFrameworkToStart();
+ log.info("Executing Shell with arguments: " + Arguments.asString(args));
+ Object value = shell.execute((Object[]) args);
+ if (mainService != null) {
+ if (value instanceof Number) {
+ mainService.setExitCode(((Number) value).intValue());
+ } else {
+ mainService.setExitCode(value != null ? 1 : 0);
+ }
+ }
+ } else {
+ // Otherwise go into a command shell.
+ shell.run();
+ if (mainService != null) {
+ mainService.setExitCode(0);
+ }
+ }
+
} catch (ExitNotification e) {
- if( mainService!=null ) {
- mainService.setExitCode(0);
- }
+ if (mainService != null) {
+ mainService.setExitCode(0);
+ }
+ log.info("Exiting shell due received exit notification");
} catch (Exception e) {
- if( mainService!=null ) {
- mainService.setExitCode(-1);
- }
+ if (mainService != null) {
+ mainService.setExitCode(-1);
+ }
+ log.info("Exiting shell due to caught exception " + e, e);
} finally {
- try {
- getBundleContext().getBundle(0).stop();
- } catch (BundleException e) {
- e.printStackTrace();
- }
+ try {
+ getBundleContext().getBundle(0).stop();
+ } catch (BundleException e) {
+ log.info("Caught exception while shutting down framework: " + e, e);
+ }
}
}
/**
* Blocks until the framework has finished starting. We do this so that any installed
* bundles for commands get fully registered.
- *
+ *
* @throws InterruptedException
*/
- private void waitForFrameworkToStart() throws InterruptedException {
+ private void waitForFrameworkToStart() throws InterruptedException {
// getBundleContext().addFrameworkListener(new FrameworkListener(){
// public void frameworkEvent(FrameworkEvent event) {
// System.out.println("Got event: "+event.getType());
@@ -143,22 +147,22 @@
// } else {
// System.out.println("System took too long startup... continuing");
// }
- }
+ }
- public MainService getMainService() {
- return mainService;
- }
-
- public void setMainService(MainService main) {
- this.mainService = main;
- }
-
- public void setBundleContext(BundleContext bundleContext) {
- this.bundleContext = bundleContext;
- }
+ public MainService getMainService() {
+ return mainService;
+ }
+
+ public void setMainService(MainService main) {
+ this.mainService = main;
+ }
+
+ public void setBundleContext(BundleContext bundleContext) {
+ this.bundleContext = bundleContext;
+ }
- public BundleContext getBundleContext() {
- return bundleContext;
+ public BundleContext getBundleContext() {
+ return bundleContext;
}
}
Modified: servicemix/smx4/runtime/trunk/pom.xml
URL: http://svn.apache.org/viewvc/servicemix/smx4/runtime/trunk/pom.xml?rev=603290&r1=603289&r2=603290&view=diff
==============================================================================
--- servicemix/smx4/runtime/trunk/pom.xml (original)
+++ servicemix/smx4/runtime/trunk/pom.xml Tue Dec 11 08:27:56 2007
@@ -304,6 +304,37 @@
</build>
</profile>
<profile>
+ <id>setup.eclipse</id>
+ <modules>
+ <module>assembly</module>
+ </modules>
+ <properties>
+ <eclipse.workspace.dir>${basedir}/../workspace</eclipse.workspace.dir>
+ </properties>
+ <build>
+ <defaultGoal>eclipse:eclipse</defaultGoal>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-eclipse-plugin</artifactId>
+ <inherited>false</inherited>
+ <executions>
+ <execution>
+ <id>setup.eclipse.workspace</id>
+ <phase>process-test-sources</phase>
+ <goals>
+ <goal>add-maven-repo</goal>
+ </goals>
+ <configuration>
+ <workspace>${eclipse.workspace.dir}</workspace>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+ </profile>
+ <profile>
<id>deploy</id>
<build>
<defaultGoal>deploy</defaultGoal>