Repository: airavata
Updated Branches:
  refs/heads/develop 9101a5192 -> 176469936


fixing the sharing server start script issue


Project: http://git-wip-us.apache.org/repos/asf/airavata/repo
Commit: http://git-wip-us.apache.org/repos/asf/airavata/commit/17646993
Tree: http://git-wip-us.apache.org/repos/asf/airavata/tree/17646993
Diff: http://git-wip-us.apache.org/repos/asf/airavata/diff/17646993

Branch: refs/heads/develop
Commit: 1764699364e5a07f3d9fe129a6af4e7505c68e10
Parents: 9101a51
Author: scnakandala <supun.nakand...@gmail.com>
Authored: Thu Oct 13 17:35:49 2016 -0400
Committer: scnakandala <supun.nakand...@gmail.com>
Committed: Thu Oct 13 17:35:49 2016 -0400

----------------------------------------------------------------------
 .../src/main/resources/bin/setenv.sh              |  6 +-----
 .../src/main/resources/bin/sharing-registry.sh    | 18 +++++++++++-------
 2 files changed, 12 insertions(+), 12 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/airavata/blob/17646993/modules/sharing-registry/sharing-registry-distribution/src/main/resources/bin/setenv.sh
----------------------------------------------------------------------
diff --git 
a/modules/sharing-registry/sharing-registry-distribution/src/main/resources/bin/setenv.sh
 
b/modules/sharing-registry/sharing-registry-distribution/src/main/resources/bin/setenv.sh
index 1dcf419..1e5475d 100644
--- 
a/modules/sharing-registry/sharing-registry-distribution/src/main/resources/bin/setenv.sh
+++ 
b/modules/sharing-registry/sharing-registry-distribution/src/main/resources/bin/setenv.sh
@@ -52,14 +52,10 @@ PRGDIR=`dirname "$PRG"`
 
 SHARING_REGISTRY_CLASSPATH=""
 
-
-
-for f in "SHARING_REGISTRY_HOME"/lib/*.jar
+for f in "$SHARING_REGISTRY_HOME"/lib/*.jar
 do
   SHARING_REGISTRY_CLASSPATH="$SHARING_REGISTRY_CLASSPATH":$f
 done
 
-SHARING_REGISTRY_CLASSPATH="$SHARING_REGISTRY_CLASSPATH":"$SHARING_REGISTRY_HOME"/conf/log4j.properties
-
 export SHARING_REGISTRY_HOME
 export SHARING_REGISTRY_CLASSPATH
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata/blob/17646993/modules/sharing-registry/sharing-registry-distribution/src/main/resources/bin/sharing-registry.sh
----------------------------------------------------------------------
diff --git 
a/modules/sharing-registry/sharing-registry-distribution/src/main/resources/bin/sharing-registry.sh
 
b/modules/sharing-registry/sharing-registry-distribution/src/main/resources/bin/sharing-registry.sh
index 35bf0ef..0725c48 100644
--- 
a/modules/sharing-registry/sharing-registry-distribution/src/main/resources/bin/sharing-registry.sh
+++ 
b/modules/sharing-registry/sharing-registry-distribution/src/main/resources/bin/sharing-registry.sh
@@ -18,16 +18,22 @@
 # under the License.
 
 . `dirname $0`/setenv.sh
-cd $SHARING_REGISTRY_HOME
+cd $SHARING_REGISTRY_HOME/bin
 
 IS_DAEMON_MODE=false
 SHARING_REGISTRY_COMMAND=""
 STOP=false
 FORCE=false
+JAVA_OPTS=""
 
 for var in "$@"
 do
     case $var in
+    -xdebug)
+               AIRAVATA_COMMAND="${AIRAVATA_COMMAND}"
+            JAVA_OPTS="$JAVA_OPTS -Xdebug -Xnoagent 
-Xrunjdwp:transport=dt_socket,server=y,address=8000"
+            shift
+        ;;
        start)
            IS_DAEMON_MODE=true
             shift
@@ -43,6 +49,7 @@ do
             echo "command options:"
            echo "  start              Start server in daemon mode"
            echo "  stop               Stop server."
+           echo "  -xdebug                        Start Sharing Registry 
Server under JPDA debugger"
            echo "  -h                 Display this help and exit"
                shift
             exit 0
@@ -74,14 +81,11 @@ then
                fi
        done
 else
+       echo $SHARING_REGISTRY_CLASSPATH
        if $IS_DAEMON_MODE ; then
                echo "Starting Sharing Registry Server in daemon mode..."
-               cd "$SHARING_REGISTRY_HOME"/lib
-               nohup $JAVA_HOME/bin/java -jar 
"$SHARING_REGISTRY_HOME"/lib/airavata-sharing-registry-server-0.17-SNAPSHOT.jar 
> ../sharing-registry.out & echo $! > "../sharing-registry-start_$!"
-               cd ..
+               nohup $JAVA_HOME/bin/java ${JAVA_OPTS} -classpath 
"$SHARING_REGISTRY_CLASSPATH"  
org.apache.airavata.sharing.registry.server.SharingRegistryServer > 
../sharing-registry.out & echo $! > "../sharing-registry-start_$!"
        else
-        cd "$SHARING_REGISTRY_HOME"/lib
-               $JAVA_HOME/bin/java -jar 
"$SHARING_REGISTRY_HOME"/lib/airavata-sharing-registry-server-0.17-SNAPSHOT.jar
-               cd ..
+               $JAVA_HOME/bin/java ${JAVA_OPTS} -classpath 
"$SHARING_REGISTRY_CLASSPATH"  
org.apache.airavata.sharing.registry.server.SharingRegistryServer
        fi
 fi
\ No newline at end of file

Reply via email to