dirkv 02/01/03 13:45:19
Added: src/doc howto-j2eestore.xml
Log:
J2EE Store Howto
converted from README by Colin Britton
Revision Changes Path
1.1 jakarta-slide/src/doc/howto-j2eestore.xml
Index: howto-j2eestore.xml
===================================================================
<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE document [
<!ENTITY project SYSTEM "stylesheets/project.xml">
]>
<document>
&project;
<properties>
<author email="[EMAIL PROTECTED]">Colin Britton</author>
<title>J2EE Store Howto</title>
</properties>
<body>
<section name="Building the store">
<p>In order to use the J2EE stores you need to build Jakarta-Slide with the
Datasource
classes available.
They are included in JDK1.4 but earlier versions require an additional library
(jdbc2_0-stdext.jar) in the slide lib directory. </p>
</section>
<section name="Configuring Slide">
<p>In order to use the stores, the Domain.xml file needs to contain the
following configuration for the store:
<pre>
<definition>
<store name="j2ee">
<nodestore classname="slidestore.j2ee.J2EEDescriptorsStore">
<parameter name="datasource">jdbc/mtx</parameter>
</nodestore>
<securitystore>
<reference store="nodestore"/>
</securitystore>
<lockstore>
<reference store="nodestore"/>
</lockstore>
<revisiondescriptorsstore>
<reference store="nodestore"/>
</revisiondescriptorsstore>
<revisiondescriptorstore>
<reference store="nodestore"/>
</revisiondescriptorstore>
<contentstore classname="slidestore.j2ee.J2EEContentStore">
<parameter name="datasource">jdbc/mtx</parameter>
</contentstore>
</store>
<scope match="/" store="j2ee"/>
</definition>
</pre>
</p>
</section>
<section name="Configuring Tomcat 4.x">
<p>In order to use this with Tomcat you need to setup the datasource.
Instructions for this are at
<a
href="http://jakarta.apache.org/tomcat/tomcat-4.0-doc/jndi-resources-howto.html">
http://jakarta.apache.org/tomcat/tomcat-4.0-doc/jndi-resources-howto.html</a>.
</p>
<p>If you follow the above instructions you will make changes similar to the
following in web.xml and server.xml.</p>
<p>
<pre>
web.xml
<resource-ref>
<description>Testing Tomcat-wide datasource usage</description>
<res-ref-name>jdbc/mtx</res-ref-name>
<res-type>javax.sql.DataSource</res-type>
<res-auth>Container</res-auth>
</resource-ref>
server.xml
<DefaultContext debug="99">
<Resource name="jdbc/mtx" auth="Container" type="javax.sql.DataSource"/>
<ResourceParams name="jdbc/mtx_system">
<parameter>
<name>user</name>
<value>bar</value>
</parameter>
<parameter>
<name>password</name>
<value>foo</value>
</parameter>
<parameter>
<name>driverClassName</name>
<value>com.jnetdirect.jsql.JSQLDriver</value>
</parameter>
<parameter>
<name>driverName</name>
<value>jdbc:JSQLConnect://localhost/test</value>
</parameter>
</ResourceParams>
</DefaultContext>
</pre>
</p>
</section>
<section name="Troubleshooting">
<p>A couple of general notes in case you encounter problems.</p>
<p>It is important that the only jndi.jar, naming.jar and jdbc.jar's and
your jdbc driver are in the %CATALINA_HOME%/common/libs and/or
%CATALINA_HOME%/libs folders.</p>
<p>If slide loads any of the classes from its own classloder it will either
not find the tomcat datasource or it will fail to load the DB drivers.</p>
<p>With Tomcat 4.0.1 the standard implementation provides a datasource which
has pooling. It has no configured limits, it will grow as required and lazily
shrinks to reduce its size. Tomcat also has the capability to support
other datasource implementations and may offer one based on the Apache commons
DBCP pool implementationin a future release.</p>
</section>
</body>
</document>
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>