/
/ $Header: README.txt 22-aug-2003.10:56:02 wliau Exp $
/
/ REAMD.txt
/
/ Copyright (c) Oracle Corporation 2000, 2001. All Rights Reserved.
/
/   NAME
/     README.txt - <one-line expansion of the name>
/
/   DESCRIPTION
/     <short description of component this file declares/defines>
/
/   NOTES
/     <other useful comments, qualifications, etc.>
/
/   MODIFIED   (MM/DD/YY)
/   wliau       08/22/03 - 
/   onaim       03/26/03 - onaim_adding_faq_demo_904
/   onaim       03/25/03 - Fixing bug 2855895
/   onaim       03/18/03 - Updating ejb demo directory structure
/   lphan       10/08/02 - 
/   lphan       09/30/02 - include info about using dcmctl to deploy demo apps
/		           in iAS environment 
/   ielayyan    11/16/01 -
/   ielayyan    05/11/01 - Creation
/

BUILD:
~~~~~
Building of these demo applications requires setting of two environment
variables J2EE_HOME and ORACLE_HOME.
Set ORACLE_HOME to where OC4J instance is installed e.g.
/opt/oracle/oraAS10g and J2EE_HOME to j2ee/home of your OC4J install e.g.
/opt/oracle/oraAS10g/j2ee/home.

-to build use "ant" (an xml build tool from http://jakarta.apache.org/ant):
> cd <appname>
> ant

DEPLOY:
~~~~~~
-to deploy J2EE apps to standalone OC4J from client (using admin.jar, even 
remotely over ormi):
> java -jar $J2EE_HOME/admin.jar ormi://localhost <admin_user> <admin_pass>
>      -deploy -file ./lib/<appname>.ear
>      -deploymentName <appname>
>      -targetPath <full_path_to>/<appname>.ear

this adds following entry to server.xml:
<application name="<appname>" path="<full_path_to>/<appname>.ear" auto-start="true" />

if no targetPath specified the earfile is copied to a default dir (usually
$J2EE_HOME/applications or as specified by application-directory in
server.xml) and that becomes the master ear for the application.

if you'd like to use this ear as the master use targetPath or alternatively
directly point server.xml to the ear or to the flat ear under build and
restart (assuming ear descriptor in application.xml is the same in both cases):
<application name="<appname>" path="<path_to>/build/<appname>" auto-start="true" />

-to deploy J2EE apps to iAS environment, the DCM Command-Line utility (dcmctl)
must be used (instead of admin.jar):
> dcmctl deployApplication -file ./lib/<appname>.ear -a <appname>
>	[-co <component name>] [-rc <root context>] 

If the -co target option is not supplied, the operation is applied to all OC4J
instances within the associated application server instance. Do not use the -rc
option when deploying an EAR file.

Please see the Oracle9iAS Containers for J2EE User's Guide for more information
on dcmctl commands and options. 
 
-to bind web module to some-web-site
> java -jar $J2EE_HOME/admin.jar ormi://localhost <admin_user> <admin_pass>
>      -bindWebApp <appname> <appname>-web http-web-site /<appname>
this adds following entry to http-web-site.xml:
<web-app application="<appname>" name="<appname>-web" root="/<appname>" />

RUN:
~~~
-to run web client, point your browser to http://<host>:<http-port>/<appname>
please don't confuse ormi-port in config/rmi.xml (default 23791) with
http-port in config/http-web-site.xml (default 80)

-when running the examples in an iAS environment and the following error occurs:

 java.lang.InstantiationException: Error looking up EJBHome: Lookup error:
   java.net.ConnectException: Connection refused; nested exception is: 
        java.net.ConnectException: Connection refused
 
 The most likely cause is a mismatch between the port the server is listening
 on and the port specified in the client's jndi.properties file. To discover
 the ormi port, use the Opmn Process Table Information Client (Optic) and then
 update the client's jndi.properties file.

  java -jar $ORACLE_HOME/opmn/lib/Optic.zip <option> <opmnlocation>

          <option> - must specify one and only one of the following: 
              -dump-info  - print 1-line summary about each opmn-managed 
                            server currently running 
              -topo-dump  - print information about every known opmn server 
              -debug-info - print debug information about an opmn server 

          <opmnlocation> - an ORACLE_HOME or an opmn host:port pair 
              -oracle-home <path> - contact the opmn at this ORACLE_HOME 
              <host>:<port> - host and "request" port specified in 
                              $ORACLE_HOME/opmn/conf/opmn.xml  

-to run stand-alone java client:
> java -jar ./lib/<appname>-client.jar
or alternatively
> ant run

-please don't forget to double check datasource name used in <appname>
 correspond to config/data-sources.xml

-please don't forget to check the relative path in
etc/<appname>-client.mf or run using "ant run"


TREE:
~~~~
|-------README.txt
|
|-------build.xml
|
|-------common.xml
|
|-------<demo-type>.properties
|
|-------src
|	|
|	|-------ejb
|	|	|-------client
|	|	|	`-------XClient.java
|	|	`-------<appname-ejb>
|	|		|-------X.java
|	|		|-------XBean.java
|	|		`-------XHome.java
|	|
|	`-------web
|		|-------<appname-web>
|		|	|-------XServlet.java
|		|	`-------X.html
|		`-------jsp
|			`-------X.jsp
|-------etc
|	|-------application.xml
|	|-------orion-application.xml
|	|-------ejb-jar.xml
|	|-------orion-ejb-jar.xml
|	|-------web.xml
|	|-------orion-web.xml
|	|-------application-client.xml
|	|-------orion-application-client.xml
|	|-------<appname>-client.mf
|	`-------jndi.properties
|
|-------sql
|
|-------doc
|	|-------Readme.html
|	`-------images
|
|-------dist
|	|-------<appname>.ear
|	|-------<appname>-ejb.jar
|	|-------<appname>-web.war
|	`-------<appname>-client.jar
|
|-------build
| 	`-------<appname>
| 	 	|-------META-INF
| 	 	|	|-------application.xml
| 	 	|	`-------orion-application.xml
|	 	|-------<appname>-client
|	 	|	|-------META-INF
|	 	|	|	|-------application-client.xml
|	 	|	|	`-------orion-application-client.xml
|	 	|	`-------<appname>
|	 	|	 	`-------XClient.class
|	 	|-------<appname>-ejb
|	 	|	|-------META-INF
|	 	|	|	|-------ejb-jar.xml
|	 	|	|	`-------orion-ejb-jar.xml
|	 	|	`-------<appname>
|	 	|	 	|-------X.class
|	 	|	 	|-------XBean.class
|	 	|	 	`-------XHome.class
|	 	`-------<appname>-web
|	 	 	|-------WEB-INF
|	 	 	|	|-------classes
|	 	 	|	|	`-------<appname>
|	 	 	|	|	 	`-------XServlet.class
|	 	 	|	|-------web.xml
|	 	 	|	`-------orion-web.xml
|	 	 	`-------X.html
+--	 	 	`-------X.jsp
