[General] PEtALS user experience
fgardes
petals-features at ebmwebsourcing.com
Wed Mar 16 10:19:41 CET 2011
Hi!
1-Normally, you've to use the shell ping.sh, which isn't operational on quickstart 2.2. Youv've to had '!' into two test. The correct ping.sh (adds are on red):
> #!/bin/sh
>
> RepScript=`dirname $0`
> RepCourant=`pwd`
>
>
> ######################
> # ENV VARIABLES
> ######################
>
> echo "Setting Petals environment"
>
> if [ ! -d "$JAVA_HOME" ]
> then
> echo "The JAVA_HOME variable is not properly set. Please set it in your environment."
> exit 1
> fi
>
> if [ ! -d "$PETALS_HOME" ]
> then
> PETALS_HOME="$RepCourant/$RepScript/.."
> export PETALS_HOME
> fi
>
> if [ ! -f "$PETALS_HOME/conf/server.properties" ]
> then
> echo "The PETALS_HOME environment variable is not set correctly. Please set it in your environment with a correct value."
> exit 2
> fi
>
> PATH="$JAVA_HOME/bin:$PATH"
> export PATH
>
> java -version
> echo ""
>
>
> ######################
> # ARGUMENTS
> ######################
>
> cd "$PETALS_HOME/bin"
>
> Silence=false
> while getopts :hv:Sv options
> do
> case ${options} in
> h)
> echo "The ping.sh script is used to determine if Petals is started."
> echo "usage : ping [-h] [-S]"
> echo " -h : prints the help message"
> echo " -S : active the silent mode"
> exit 0;
> ;;
> S)
> Silence=true
> ;;
> ?)
> echo "usage : ping [-h] [-S]"
> exit 2
> ;;
> esac
> done
>
> pingResult=`java -Xmx128m -jar server.jar version`
>
> echo $pingResult | grep "Petals JBI Container - version:" >/dev/null 2>/dev/null
> active=$?
>
> cd "$RepCourant"
>
> if [ $active -eq 0 ]
> then
> if [ $Silence != true ]
> then
> echo "Petals RUNNING"
> fi
> exit 0
> else
> if [ $Silence != true ]
> then
> echo "Petals STOPPED"
> fi
> exit 1
> fi
>
2-that's right : to get the version, today we need the PEtALS JMX Server on:
Code:
/*
* (non-Javadoc)
*
* @see org.ow2.petals.launcher.PetalsLauncher#version()
*/
public void version() throws Exception {
System.out.println(getPetalsJmxClient().getAdminServiceClient().getSystemInfo());
}
So you can't get the version without starting the JMX :(
-------------------- m2f --------------------
Read this forum topic online here:
http://petals.ebmwebsourcing.com/forum/viewtopic.php?p=207#207
-------------------- m2f --------------------
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://forum-list.petalslink.org/pipermail/general/attachments/20110316/1de73d97/attachment.htm>
More information about the General
mailing list