User: tobias  
  Date: 01/01/09 17:04:29

  Modified:    documentation oraclecmp.htm
  Log:
  removed the instructions for donwloading and installing minerva as minerva is 
already included into JBoss 2.0-Final. This thing is still outdated. Someone should 
check it from top to bottom.
  
  Revision  Changes    Path
  1.3       +16 -11    newsite/documentation/oraclecmp.htm
  
  Index: oraclecmp.htm
  ===================================================================
  RCS file: /products/cvs/ejboss/newsite/documentation/oraclecmp.htm,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- oraclecmp.htm     2001/01/08 05:33:11     1.2
  +++ oraclecmp.htm     2001/01/10 01:04:29     1.3
  @@ -11,6 +11,9 @@
                <h2>JBoss CMP Quick Start using JBoss 2.0 and Oracle</h2>
                <p>Author: Ewan Branda<br>
                Last revised: July 11, 2000</p>
  +<hr>
  +This guide is a little bit outdated. At the moment we are reorganizing the 
documentation and we will take care of this piece too. Meanwhile I made some slight 
adjustments to this guide, which were probably NOT sufficient to make it 100% correct 
again. Good luck. (TF 2001/01/08)
  +<hr>
                <p>This guide should help you to quickly get JBoss 2.0 up and running 
using container-managed persistence and Oracle. With minor modifications you can use 
the same example with any database. It should be used in conjunction with the 
documents <i>Beginning EJB programming using jBoss</i> and <i>Using container-managed 
persistence with jBoss</i> available at the <a href="http://www.jboss.org">JBoss</a> 
web site (click on &quot;Getting Started&quot; under &quot;How To&quot;).</p>
                <p>In order to get JBoss up and running you have to do&nbsp;the 
following&nbsp;basic procedures:&nbsp;</p>
                <ol>
  @@ -25,9 +28,9 @@
                <ol type="1">
                        <li>If you are not running Java 1.3 then download it from <a 
href="http://java.sun.com">http://java.sun.com</a> and install it. JBoss only works 
with version 1.3 of the java VM.&nbsp;
                        <li>Download the jboss 2.0 distribution from <a 
href="http://www.jboss.org">http://www.jboss.org</a>.
  -                     <li>Download the minerva.jar archive from <a 
href="http://www.jboss.org">http://www.jboss.org</a>.
  +<!-- outdated TF 2001/01/09 <li>Download the minerva.jar archive from <a 
href="http://www.jboss.org">http://www.jboss.org</a>.-->
                        <li>Run the JBoss installer and point it to the 1.3 VM when 
prompted. The remainder of this document will refer to the JBoss installation 
directory as <em>$JBOSS_ROOT</em> .
  -                     <li>Copy the minerva.jar archive to the 
<i>$JBOSS_ROOT/lib/ext</i> directory
  +<!-- outdated TF 2001/01/09  <li>Copy the minerva.jar archive to the 
<i>$JBOSS_ROOT/lib/ext</i> directory -->
                </ol>
                <p>
                <hr>
  @@ -36,7 +39,7 @@
                <ol>
                        <li>Edit the <em>$JBOSS_ROOT/conf/jboss.conf</em> file. You 
need to add <code>&lt;MLET&gt;</code> tags for each data source you are using. These 
notes assume that you are using the Minerva connection pooler (installed in the steps 
above). Here is an example entry for an oracle data source:
                        <p><code>&lt;MLET 
CODE=&quot;org.jboss.jdbc.XADataSourceLoader&quot; 
ARCHIVE=&quot;jboss.jar,minerva.jar&quot; CODEBASE=&quot;../lib/ext/&quot;&gt;<br>
  -                     &nbsp;&nbsp;&nbsp;&lt;ARG TYPE=&quot;java.lang.String&quot; 
VALUE=&quot;MyConnectionPool&quot;&gt;<br>
  +                     &nbsp;&nbsp;&nbsp;&lt;ARG TYPE=&quot;java.lang.String&quot; 
VALUE=&quot;OracleDB&quot;&gt;<br>
                        &nbsp;&nbsp;&nbsp;&lt;ARG TYPE=&quot;java.lang.String&quot; 
VALUE=&quot;org.jboss.minerva.xa.XADataSourceImpl&quot;&gt;<br>
                        &nbsp;&nbsp;&nbsp;&lt;ARG TYPE=&quot;java.lang.String&quot; 
VALUE=&quot;jdbc:oracle:thin:@localhost:1521:orcl&quot;&gt;<br>
                        &nbsp;&nbsp;&nbsp;&lt;ARG TYPE=&quot;java.lang.String&quot; 
VALUE=&quot;theUsername&quot;&gt;<br>
  @@ -46,7 +49,7 @@
                        &nbsp;&nbsp;&nbsp;&lt;ARG TYPE=&quot;java.lang.Integer&quot; 
VALUE=&quot;5&quot;&gt;</code><code><br>
                        
&nbsp;&nbsp;&nbsp;&lt;ARGTYPE=&quot;java.lang.String&quot;VALUE=&quot;GCEnabled=true;ShrinkingEnabled=true;GCMinIdleTime=30000;GCInterval=10000;ShrinkMinIdleTime=30000&quot;&gt;<br>
                        &lt;/MLET&gt;</code></p>
  -                     <p>Note that the name specified in the first attribute tag 
above (&quot;MyConnectionPool&quot; in this example) will be the name used to refer to 
the data source in the <i>meta-inf/jboss.xml</i> (discussed later). The third argument 
is the database connection url and should be in the standard JDBC url format for that 
driver. Refer to the <a href="http://www.jboss.org">Minerva documentation</a> (select 
the &quot;Minerva&quot; link at left) for a discussion of JDBC driver types and tag 
formats.</p>
  +                     <p>Note that the name specified in the first attribute tag 
above (&quot;OracleDB&quot; in this example) will be the name used to refer to the 
data source in the <i>meta-inf/jboss.xml</i> (discussed later). The third argument is 
the database connection url and should be in the standard JDBC url format for that 
driver. Refer to the <a href="http://www.jboss.org">Minerva documentation</a> (select 
the &quot;Minerva&quot; link at left) for a discussion of JDBC driver types and tag 
formats.</p>
                        <p>An example <i>jboss.conf</i> file can be found <a 
href="#jboss_conf_xml">here</a>.</p>
                        <li>
                        <p>Edit the <em>$JBOSS_ROOT/conf/jboss.properties</em> file. 
You need to add any JDBC drivers you are using to the <i>jdbc.drivers</i> property. 
Here is an example entry:</p>
  @@ -58,19 +61,21 @@
                <h3>EJB Deployment</h3>
                <ol>
                        <li>Create a <i>jaws.xml</i> configuration file. This file 
specifies details about the data source. It &quot;imports&quot; the data source into 
the EJB application context. Immediately below the <code>&lt;jaws&gt;</code> 
tag&nbsp;insert the following code:
  -                     
<p><code>&lt;datasource&gt;xa.MyConnectionPool&lt;/datasource&gt;<br>
  +                     <p><code>&lt;datasource&gt;OracleDB&lt;/datasource&gt;<br>
                        &lt;type-mapping&gt;MyOracleTypeMapping&lt;/type-mapping&gt; 
</code></p>
  -                     <p>Note that the <code>datasource</code> attribute 
(&quot;MyConnectionPool&quot; in this case) corresponds to the name attribute in the 
<code>&lt;MLET&gt;</code> tag you added to the jboss.conf file. The 
&quot;<code>xa.</code>&quot; is required. &quot;MyOracleTypeMapping&quot;&nbsp;is the 
name of the type mapping configuration specified later in the same file. 
See&nbsp;the&nbsp;example code for&nbsp;details.</p>
  +                     <p>Note that the <code>datasource</code> attribute 
(&quot;OracleDB&quot; in this case) corresponds to the name attribute in the 
<code>&lt;MLET&gt;</code> tag you added to the jboss.conf file. 
  +<!-- outdated TF 2001/01/09 The &quot;<code>xa.</code>&quot; is required.
  +--> &quot;MyOracleTypeMapping&quot;&nbsp;is the name of the type mapping 
configuration specified later in the same file. See&nbsp;the&nbsp;example code 
for&nbsp;details.</p>
                        <p>You should include datatype mappings (java to SQL) for the 
datasource you are using (see the example file). In addition, you may optionally 
include object-to-relational mapping information, such as the table name to use for a 
specified entity bean, the entity field name to table column name mappings, etc. If 
you don't provide these JBoss will use the ejb-name property as the table name and the 
entity bean field names for column names. See the example jaws.xml file for 
details.</p>
                        <p>An example <i>jaws.xml </i>file can be found <a 
href="#jaws_xml">here</a>.</p>
                        <li>Create a <i>jboss.xml</i> deployment descriptor. This file 
can be copied from a previous deployment, making&nbsp;some modifications. Immediately 
below the <code>&lt;jboss&gt;</code> tag&nbsp;insert the following code:
                        <p><code>&lt;resource-managers&gt;<br>
                        &nbsp;&nbsp;&lt;resource-manager 
res-class=&quot;org.jboss.ejb.deployment.JDBCResource&quot;&gt;<br>
                        &nbsp;&nbsp;&lt;res-name&gt;MyDB&lt;/res-name&gt;<br>
  -                     
&nbsp;&nbsp;&lt;res-jndi-name&gt;xa.MyConnectionPool&lt;/res-jndi-name&gt;<br>
  +                     
&nbsp;&nbsp;&lt;res-jndi-name&gt;OracleDB&lt;/res-jndi-name&gt;<br>
                        &nbsp;&nbsp;&lt;/resource-manager&gt;<br>
                        &lt;/resource-managers&gt; </code></p>
  -                     <p>Note that the <code>res-jndi-name</code> attribute 
(&quot;MyConnectionPool&quot; in this case) corresponds to the name attribute in the 
<code>&lt;MLET&gt;</code> tag you added to the jboss.conf file. The 
&quot;<code>xa.</code>&quot; is required. Note also that the <code>res-name</code> 
attribute (&quot;MyDB&quot;) will be used by the entity specifiers in 
<i>ejb-jar.xml</i> to refer to data source resources, as discussed below.<br>
  +                     <p>Note that the <code>res-jndi-name</code> attribute 
(&quot;OracleDB&quot; in this case) corresponds to the name attribute in the 
<code>&lt;MLET&gt;</code> tag you added to the jboss.conf file. The 
&quot;<code>xa.</code>&quot; is required. Note also that the <code>res-name</code> 
attribute (&quot;MyDB&quot;) will be used by the entity specifiers in 
<i>ejb-jar.xml</i> to refer to data source resources, as discussed below.<br>
                        <br>
                        An example <i>jboss.xml </i>file can be found <a 
href="#jboss_xml">here</a> .</p>
                        <li>Create an <i>ejb-jar.xml</i> deployment descriptor. This 
should conform to EJB1.1 standards for this file type. Each entity bean that uses CMP 
should have the following code within the <code>&lt;entity&gt;</code> tag:
  @@ -101,7 +106,7 @@
                        <p>where &quot;MyBeanJNDIName&quot; is the JNDI name specified 
in the <code>&lt;jndi-name&gt;</code> attribute in the <i>jboss.xml</i> file.
                        <p>The client application must have the following classes in 
the VM classpath in order to run:</p>
                        <ul>
  -                             <li><i>$JBOSS_ROOT/lib/ext/ejb.jar</i>
  +                             <li><i>$JBOSS_ROOT/client/ejb.jar</i>
                                <li><i>$JBOSS_ROOT/client/jnp-client.jar</i>
                                <li><i>$JBOSS_ROOT/client/jboss-client.jar</i>
                        </ul>
  @@ -117,7 +122,7 @@
                <h4>jaws.xml</h4>
                <p><code>&lt;?xml version=&quot;1.0&quot; 
encoding=&quot;UTF-8&quot;?&gt;<br>
                &lt;jaws&gt;</code></p>
  -             <p><code>&nbsp;&nbsp;&nbsp; 
&lt;datasource&gt;xa.MyConnectionPool&lt;/datasource&gt;<br>
  +             <p><code>&nbsp;&nbsp;&nbsp; 
&lt;datasource&gt;OracleDB&lt;/datasource&gt;<br>
                &nbsp;&nbsp;&nbsp; 
&lt;type-mapping&gt;MyOracleTypeMapping&lt;/type-mapping&gt;</code></p>
                <p><code>&nbsp;&nbsp;&nbsp; &lt;type-mappings&gt;<br>
                &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br>
  @@ -229,7 +234,7 @@
                <p><code>&nbsp;&nbsp;&nbsp;&nbsp; &lt;resource-managers&gt;<br>
                &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;resource-manager 
res-class=&quot;org.jboss.ejb.deployment.JDBCResource&quot;&gt;<br>
                &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
&lt;res-name&gt;MovieDB&lt;/res-name&gt;<br>
  -             &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
&lt;res-jndi-name&gt;xa.MyConnectionPool&lt;/res-jndi-name&gt;<br>
  +             &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
&lt;res-jndi-name&gt;OracleDB&lt;/res-jndi-name&gt;<br>
                &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/resource-manager&gt;<br>
                &nbsp;&nbsp;&nbsp;&nbsp; &lt;/resource-managers&gt;</code></p>
                <p><code>&nbsp;&nbsp;&nbsp;&nbsp; &lt;enterprise-beans&gt;<br>
  
  
  

Reply via email to