#!/bin/sh

# Start EJB Server
# Check you have added jms.jar in jonas.service.ejb.descriptors property definition
jonas start
echo

# deploy the bean
jonas admin -a jms.jar


##### Put example classes in CLASSPATH
export CLASSPATH=$CLASSPATH:$JONAS_ROOT/examples/classes

# Run the JMS message receptor - it uses joram + monolog.
xterm -e jclient jms.MsgReceptor &
sleep 10
echo

# run the EJB Client
jclient jms.EjbCompClient
echo

# stop EJB Server
jonas stop
