db-ojb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From arm...@apache.org
Subject cvs commit: db-ojb/xdocs deployment.xml
Date Thu, 27 Feb 2003 23:54:36 GMT
arminw      2003/02/27 15:54:36

  Modified:    xdocs    deployment.xml
  Log:
  update the jboss integration section
  
  Revision  Changes    Path
  1.12      +121 -35   db-ojb/xdocs/deployment.xml
  
  Index: deployment.xml
  ===================================================================
  RCS file: /home/cvs/db-ojb/xdocs/deployment.xml,v
  retrieving revision 1.11
  retrieving revision 1.12
  diff -u -r1.11 -r1.12
  --- deployment.xml	13 Feb 2003 23:39:53 -0000	1.11
  +++ deployment.xml	27 Feb 2003 23:54:35 -0000	1.12
  @@ -48,7 +48,7 @@
   
   <subsection name="1. The OJB binary jar archive" anchor="2">
   <P>
  -	You need a <code>jakarta-ojb-&lt;version&gt;.jar</code> file containing
the compiled OJB library.
  +	You need a <code>db-ojb-&lt;version&gt;.jar</code> file containing
the compiled OJB library.
   	<br/>This jar files contains all OJB code neccessary in
   	production level environments. It does not contain any test code. It
   	also does not contain any configuration data.
  @@ -83,15 +83,15 @@
   <subsection name="3. Additional jar archives" anchor="4">
   <P>
   	OJB depends on several other jar archives. These jar files are
  -	shipped in the <code>jakarta-ojb-&lt;version&gt;/lib</code> directory.
  -	<a href="http://jakarta.apache.org/ojb/dependencies.html">These jar files are listed
here.</a>
  +	shipped in the <code>db-ojb-&lt;version&gt;/lib</code> directory.
  +	<a href="http://db.apache.org/ojb/dependencies.html">These jar files are listed
here.</a>
   </P>
   <p>
   	Some of these jar files are only used during build-time and need not to be
   	be deployed in runtime environments.
   	<br/>
   	Apart from wasting disk space they do no harm. If you don't care you just take all jars
from
  -	<code>jakarta-ojb-&lt;version&gt;/lib</code>.
  +	<code>db-ojb-&lt;version&gt;/lib</code>.
   	<br/>
   	If you do care, here is the list of jars you can omit during runtime:
   	<ul>
  @@ -151,7 +151,7 @@
   </P>
   <OL>
     <LI>
  -    Add <code>jakarta-ojb-&lt;version&gt;.jar</code>
  +    Add <code>db-ojb-&lt;version&gt;.jar</code>
       to the classpath
     </LI>
     <LI>
  @@ -182,11 +182,11 @@
   
   <OL>
       <LI>
  -	    Deploy <code>jakarta-ojb-&lt;version&gt;.jar</code>
  +	    Deploy <code>db-ojb-&lt;version&gt;.jar</code>
   	    with your servlet applications WAR file.
   	    <br/>The WAR format specifies that
   	    application specific jars are to be placed in a directory <code>WEB-INF/lib</code>.
  -	    Place <code>jakarta-ojb-&lt;version&gt;.jar</code>
  +	    Place <code>db-ojb-&lt;version&gt;.jar</code>
   	    to this directory.
       </LI>
       <LI>
  @@ -238,36 +238,118 @@
   should be useful for all users.
   </p>
   
  +
  +
   <subsection name="Instructions for JBoss" anchor="31">
   
   <p>
  -<b>1. Add the following MBean declaration to the user-service.xml:</b>
  +<b>1. Get the missed jar files</b>
  +<br/>
  +As a result of different licence models we could not ship all necessary
  +jar files with OJB. Thus you need some extra jar files to make the ejb
  +examples target run:
  +<ul>
  +    <li>jboss-common.jar</li>
  +    <li>jboss-j2ee.jar</li>
  +    <li>jboss-jmx.jar</li>
  +    <li>jboss-system.jar</li>
  +    <li>xdoclet.jar</li>
  +</ul>
  +Put these jar files in the <code>lib</code> directory of OJB.
  +</p>
  +
  +<p>
  +<b>2. Make a .sar directory</b>
  +<br/>
  +Make a <code>ojb.sar</code> directory under <code>[jboss.home]/server/default/deploy</code>
  +<br/>
  +Add a <code>META-INF</code> directory under <code>ojb.sar</code>.
  +<br/>
  +Put a simple <code>MANIFEST.MF</code> files and a <code>jboss-service.xml</code>
  +file in this directory.
  +<br/>
  +The <code>jboss-service</code> file looks like:
   <source><![CDATA[
  -<mbean code="org.jboss.ojb.pb.PBFactory"
  -        name="DefaultDomain:service=PBAPI,name=ojb/PBAPI">
  -    <attribute name="JndiName">ojb/PBAPI</attribute>
  -</mbean>
  +<?xml version="1.0" encoding="UTF-8"?>
   
  -<mbean code="org.jboss.ojb.odmg.ODMGFactory"
  -        name="DefaultDomain:service=ODMG,name=ojb/defaultODMG">
  -    <attribute name="JndiName">ojb/defaultODMG</attribute>
  -</mbean>
  +<server>
  +    <mbean code="org.apache.ojb.jboss.PBFactory"
  +        name="DefaultDomain:service=PBAPI,name=ojb/PBAPI">
  +        <depends>jboss.jca:service=RARDeployer</depends>
  +        <attribute name="JndiName">ojb/PBAPI</attribute>
  +    </mbean>
  +
  +    <mbean code="org.apache.ojb.jboss.ODMGFactory"
  +    name="DefaultDomain:service=ODMG,name=ojb/defaultODMG">
  +        <depends>jboss.jca:service=RARDeployer</depends>
  +        <attribute name="JndiName">ojb/defaultODMG</attribute>
  +    </mbean>
  +</server>
   ]]></source>
  +
   This entries make OJB accessible via JNDI.
  +</p>
  +
  +<p>
  +<b>3. Prepare OJB code base</b>
   <br/>
  +With <code>bin\build.bat prepare-jboss jar</code>
  +using windows or<br/>
  +<code>bin/build.sh prepare-jboss jar</code> we rebuild OJB
  +jars including the jboss MBeans.
  +<br/>
  +The <code>prepare-jboss</code> target copy the jboss MBeans to the OJB code
  +base. After running the <code>jar</code> target you could find the new
  +<code>db-ojb-xxx.jar</code>, including the MBeans, in the <code>dist</code>
  +directory (If you need a OJB jar file without the MBeans, clean <code>target</code>
  +directory and invoke the <code>jar</code> ant target).
  +<br/>
  +Copy the <code>db-ojb-xxx.jar</code> file into the <code>ojb.sar</code>
directory.
  +</p>
   
  +<p>
  +<b>4. Copy OJB configuration files into the <code>ojb.sar</code> directory</b>
  +<br/>
  +OJB.properties, repository.xml, repository_internal.xml, repository_database.xml,
  +repository_ejb.xml (if you want to run the ejb examples). The repository.xml
  +should rather look like:
  +<source><![CDATA[
  +<?xml version="1.0" encoding="UTF-8"?>
  +<!-- This is a sample metadata repository for the ObJectBridge
  +System. Use this file as a template for building your own
  +mappings-->
  +
  +<!-- defining entities for include-files -->
  +<!DOCTYPE descriptor-repository SYSTEM "repository.dtd" [
  +<!ENTITY database SYSTEM "repository_database.xml">
  +<!ENTITY internal SYSTEM "repository_internal.xml">
  +<!ENTITY junit SYSTEM "repository_junit.xml">
  +<!ENTITY user SYSTEM "repository_user.xml">
  +<!ENTITY ejb SYSTEM "repository_ejb.xml">
  +<!ENTITY jdo SYSTEM "repository_jdo.xml">
  +]>
  +
  +
  +<descriptor-repository version="1.0"
  +                    isolation-level="read-uncommitted">
  +
  +    <!-- include all used database connections -->
  +    &database;
   
  -Add <code>jboss-common.jar</code> and <code>jboss-system.jar</code>
into
  -the lib directory if not present. With <code>bin\build.bat prepare-jboss jar</code>
  -using windows or <code>bin/build.sh prepare-jboss jar</code> we rebuild OJB
  -jars including the jboss MBeans.
  +    <!-- include ojb internal mappings here -->
  +    &internal;
   
  +    <!-- include mappings for the EJB-examples -->
  +    &ejb;
   
  +</descriptor-repository>
  +]]></source>
   </p>
   
   <p>
  -<b>2. Make sure your OJB Properties files has the following settings:</b>
  -
  +<b>5. Adapt OJB.properties file</b>
  +<br/>
  +Your OJB.properties file need the following settings:
   <source><![CDATA[
   ConnectionFactoryClass=
   org.apache.ojb.broker.accesslayer.ConnectionFactoryManagedImpl
  @@ -280,8 +362,8 @@
   </p>
   
   <p>
  -<b>3. Declare datasources in the repository (repository_database) file:</b>
  -Do only use datasources from the application server to connect your databases.
  +<b>5. Declare datasources in the repository (repository_database) file</b>
  +Do only use <code>DataSource</code> from the application server to connect
your databases.
   <source><![CDATA[
   <!-- Datasource example -->
   <jdbc-connection-descriptor
  @@ -331,10 +413,15 @@
   </p>
   
   <p>
  -Check out the ejb's provided in the OJB distro at: <code>[jakarta-ojb]/src/ejb/org/apache/ojb/ejb</code>
  +Check out the ejb's provided in the OJB distro at: <code>[db-ojb]/src/ejb/org/apache/ojb/ejb</code>
   for an example of working beans.
   </p>
  -
  +<p>
  +<b>
  +This solution is not re-deployable. If someone knows the reason or find a
  +solution that makes OJB re-deployable in jboss, please let me know.
  +</b>
  +</p>
   </subsection>
   
   <subsection name="Build the OJB sample session beans" anchor="32">
  @@ -345,13 +432,13 @@
   <br/>
   You could find the source code of the beans under
   <br/>
  -<code>[jakarta-ojb]/src/ejb/org/apache/ojb/ejb</code>
  +<code>[db-ojb]/src/ejb/org/apache/ojb/ejb</code>
   <br/>
   and after running the <code>ejb-examples</code> ant target (see below),
   you will find the complete sources (including the generated interfaces)
   under
   <br/>
  -<code>[jakarta-ojb]/target/srcejb</code>
  +<code>[db-ojb]/target/srcejb</code>
   <br/>
   in three sub-dirs.
   </p>
  @@ -364,16 +451,15 @@
   ]]></source>
   to generate the the bean and client jars prepared for use in JBoss. If you using
   a different application server, you have to modifiy the xdoclet ant target in
  -<code>[jakarta-ojb]/build-xdoclet.xml</code> to generate files specified for
your
  +<code>[db-ojb]/build-xdoclet.xml</code> to generate files specified for your
   application server. See xdoclet documentation for further information.
   </p>
   <p>
  -After running the ant target you will find a <code>jakarta-ojb-XXX-beans.jar</code>
  -and a <code>jakarta-ojb-XXX-client.jar</code> in the [jakarta-ojb]/dist directory.
  -Put the bean jar in JBoss /deploy dir and the OJB application jar in /lib, also
  -add the OJB configuration files (OJB.properties + repositoryXXX.xml) to
  -classpath. This solution is not re-deployable. If someone find a solution that makes the
sample
  -beans re-deployable in jboss, please let me know.
  +After running the ant target you will find a <code>db-ojb-XXX-beans.jar</code>
  +and a <code>db-ojb-XXX-client.jar</code> in the [db-ojb]/dist directory.
  +Put the bean jar in the <code>ojb.sar</code> directory.
  +<br/>
  +To run the ejb-example test cases use the <code>org.apache.ojb.ejb.AllTests.class</code>.
   </p>
   </subsection>
   
  
  
  

Mime
View raw message