                  Oracle JMS STANDALONE DEMO 
                  ==========================

This is a simple set of demo applications that demonstrate the
configuration and use of Oracle JMS (OJMS) running under OC4J. These work on
OC4J versions 9.0.2 and higher.


Required environment and demo parameters
-----------------------------------------
ORACLE_HOME      : where the iAS is installed
J2EE_HOME        : root directory of the OC4J source tree
DB_HOST          : your installed database host
DB_PORT          : your installed database port
DB_SID           : your installed database sid

Make sure that you have "java" and "javac" accessible in your PATH
(i.e. you have a valid JDK, version 1.3 or greater, installed).

If you run the demo in the iAS environment instead of OC4J standalone mode,
update etc/jndi.properties, switching the url from "ormi://localhost"
to "opmn:ormi://$HOST:$OPMN_REQUEST_PORT:$OC4J_INSTANCE_NAME".  The value
of your host, opmn request port, and oc4j instance name can be found in
$ORACLE_HOME/opmn/conf/opmn.xml. 

Review these settings in etc/jndi.properties and update if needed
  java.naming.security.principal=admin
  java.naming.security.credentials=welcome


Required DATABASE setup
-----------------------
Connect to database as sys (or equivalent) user and run the sql/jmsuser.sql scripts.
This will create the user and Queue, Topic for the demo.


Requirements
-------------

1. The users need to config a resource provider named "ojmsdemo" to access 
OJMS queues and topics in $J2EE_HOME/config/application.xml with the 
following entry:

<resource-provider class="oracle.jms.OjmsContext" name="ojmsdemo">
   <description> OJMS/AQ </description>
   <property name="datasource" value="jdbc/OracleDS"></property>
</resource-provider>

2. The users need to config the data-source.xml to have the database 
connection information as following:

<data-source
    class="com.evermind.sql.DriverManagerDataSource"
    name="OracleDS"
    location="jdbc/OracleCoreDS"
    xa-location="jdbc/xa/OracleXADS"
    ejb-location="jdbc/OracleDS"
    connection-driver="oracle.jdbc.driver.OracleDriver"
    username="jmsuser"
    password="jmsuser"
    url="jdbc:oracle:thin:@%DB_HOST%:%DB_PORT%:%DB_SID%"
    inactivity-timeout="30"
 />

Note: Replace DB_HOST, DB_PORT, DB_SID with the values of your database.


Demo compilation
-----------------
The demo uses Ant/Makefile for the compilation and run process.

1. Clean the environment.
ant clean (or make clean)

2. Compile the demo classes.
ant (or make)


Start the OC4J server
---------------------
cd $J2EE_HOME
java -jar $J2EE_HOME/oc4j.jar

(in standalone OC4J; in iAS, use the standard DCM/EM tools to start
OC4J).


Run demo
--------
1. Send messages to the pre-configured Queue.
ant Qsend (or make Qsend)

2. Browse messages from the Queue.
ant Qbrow (or make Qbrow)

3. Receive messages from the Queue.
ant Qrecv (or make Qrecv)

4. Now the Queue is empty; browse/receive and find no messages.
ant Qbrow (or make Qbrow)
ant Qrecv (or make Qrecv)

