. $OSPL_HOME/examples/functions

check_osplhome

get_libjsig

startOSPL

echo "=== Launching Ownership "

LD_PRELOAD=$OSPL_JSIG $SPLICE_JAVA -classpath $OSPL_HOME/jar/dcpssaj.jar:classes:$SPLICE_EXTRA_CP OwnershipDataSubscriber > subResult.txt &

sleep 5

echo === starting publisher "pub1" with ownership strength 5
LD_PRELOAD=$OSPL_JSIG $SPLICE_JAVA -classpath $OSPL_HOME/jar/dcpssaj.jar:classes:$SPLICE_EXTRA_CP OwnershipDataPublisher pub1 5 40 1 > pubResult_1.txt &

echo === Waiting 2 seconds ...
sleep 2

echo === starting publisher "pub2" with ownership strength 10

LD_PRELOAD=$OSPL_JSIG $SPLICE_JAVA -classpath $OSPL_HOME/jar/dcpssaj.jar:classes:$SPLICE_EXTRA_CP OwnershipDataPublisher pub2 10 5 0 > pubResult_2.txt

sleep 10

ownershipCheckResult

stopOSPL
