User: olegnitz
Date: 01/04/21 04:14:28
Modified: business jboss-castor.html
Log:
Configuration description updated.
Revision Changes Path
1.7 +30 -39 newsite/business/jboss-castor.html
Index: jboss-castor.html
===================================================================
RCS file: /cvsroot/jboss/newsite/business/jboss-castor.html,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- jboss-castor.html 2001/02/27 16:24:45 1.6
+++ jboss-castor.html 2001/04/21 11:14:28 1.7
@@ -34,7 +34,7 @@
</tr>
<tr>
<td class="newsbody"><font face="Myriad Web,Arial"><a
href="http://castor.exolab.org">Castor</a> version 0.8.9 or later is needed.
- Download <a
href="http://ftp.exolab.org/ftp/jars/castor-0.8.11.zip">castor-0.8.11.zip</a> and
extract castor-0.8.11.jar and xerces.jar.<br>
+ Download <a
href="http://ftp.exolab.org/ftp/jars/castor-0.9.2.zip">castor-0.9.2.zip</a> and
extract castor-0.9.2.jar and xerces.jar.<br>
The CastorJDO integration module is here: <a
href="../castorjdo/jboss-castorjdo.jar">jboss-castorjdo.jar</a><br>
<p><font face="Myriad Web,Arial">The sources can be
found in <a href="cvs.html">CVS</a>, module "contrib".</font>
<p><font face="Myriad Web,Arial">A complete example
of use of CastorJDO in SessionBean is <a href="../castorjdo/rooms.zip">here</a>
(contributed by Terry Child).</font></td>
@@ -46,65 +46,57 @@
<td class="newsbody"><font face="Myriad Web,Arial">
<ul>
<li>Put the three jars files mentioned above in lib/ext directory.</li>
-<li>Add the Mlet in jboss.conf<br>
+<li>Add the mbean in jboss.conf<br>
<pre>
-<MLET CODE = "org.jboss.jdo.castor.CastorJDOImpl"
- ARCHIVE="jboss.jar,castor-0.8.11.jar,xerces.jar"
- CODEBASE="../lib/ext/">
- <ARG TYPE="java.lang.String" VALUE="file:../conf/database.xml">
- <ARG TYPE="java.lang.String" VALUE="dataObjectsJndiName">
- <ARG TYPE="java.lang.Integer" VALUE="0">
- <ARG TYPE="java.lang.Boolean" VALUE="false">
- <ARG TYPE="java.lang.Boolean" VALUE="false">
-</MLET>
+ <mbean code="org.jboss.jdo.castor.CastorJDOImpl"
name="DefaultDomain:service=CastorJDO,name=someName">
+ <attribute
name="<b>Configuration</b>">file:../conf/default/database.xml</attribute>
+ <attribute name="<b>JndiName</b>">jdo/someName</attribute>
+ <attribute name="<b>LockTimeout</b>">0</attribute>
+ <attribute name="<b>LoggingEnabled</b>">false</attribute>
+ <attribute name="<b>CommonClassPath</b>">false</attribute>
+ </mbean>
</pre>
-where the arguments are:
-<ol>
-<li>the database configuration file needed by
+where the attributes are:
+<ul>
+<li><b>Configuration</b> - the database configuration file needed by
the Castor JDO, it contains JNDI name of JDBC DataSource and
reference(s) to mapping configuration file(s), e.g.:
<pre>
<database name="test" engine="oracle" >
- <jndi name="java:/dataSourceJndiName"/>
+ <jndi name="java:/jdbc/someName"/>
<mapping href="mapping.xml" />
</database>
</pre>
- It is recommended to place it in "conf" directory or in one of its
- subdirectories as well as mapping configuration file(s).
- At least, don't place them to your EJB jar files.
See Castor documentation for further info on the content of the
Castor configuration files.</li>
-<li>the JNDI name that is used for binding bean
+<li><b>JndiName</b> - the JNDI name that is used for binding bean
resource references. See below.</li>
-<li>the lock timeout in seconds, value <b>0</b> means
- "use the Castor default value" (which now equals 10 seconds).</li>
-<li>the flag of logging. When you set it to <b>true</b>,
+<li><b>LockTimeout</b> - the lock timeout in seconds, value <b>0</b> means
+ "use the Castor default value" (which now equals 10 seconds).
+ The default value is <b>0</b>.</li>
+<li><b>LoggingEnabled</b> - the flag of logging. When you set it to <b>true</b>,
the CastorJDO MBean sends information messages and warnings to
- JBoss loggers.</li>
-<li>tells if your JDO classes are loaded via ClassPathExtension MLET in
- jboss.conf - in this case set the argument to <b>true</b>,
+ JBoss loggers. The default value is <b>false</b>.</li>
+<li><b>CommonClassPath</b> - tells if your JDO classes are loaded via
ClassPathExtension
+ MLET in jboss.conf - in this case set the argument to <b>true</b>,
or via EJB jar classpath (i.e. either they are in the same jar or
they are accessible via Class-Path: attribute of META-INF/MANIFEST.MF) -
- in this case set the argument to <b>false</b>.
- If you need to access the same JDO class from different bean jar files,
- better load this class via ClassPathExtension MLET, otherwise changes
- that are done in one bean may not be visible in the other bean
- (due to separate Castor caches for the two Class instances).
-</ol>
+ in this case set the argument to <b>false</b>. The default value is <b>false</b>.
+</ul>
<li>Declare the resource managers in your jboss.xml besides your
ejb-jar.xml, e.g.:<br>
<pre>
<resource-managers>
<resource-manager
res-class="org.jboss.ejb.deployment.JDBCResource">
- <res-name>dataSourceNameForBean</res-name>
- <res-jndi-name>dataSourceJndiName</res-jndi-name>
+ <res-name>jdbc/someName</res-name>
+ <res-jndi-name>jdbc/someName</res-jndi-name>
</resource-manager>
<resource-manager
res-class="org.jboss.ejb.deployment.CastorJDOResource">
- <res-name>dataObjectsNameForBean</res-name>
- <res-jndi-name>dataObjectsJndiName</res-jndi-name>
+ <res-name>jdo/someName</res-name>
+ <res-jndi-name>jdo/someName</res-jndi-name>
</resource-manager>
</resource-managers>
</pre>
@@ -114,13 +106,12 @@
<pre>
<resource-ref>
<description>DataObjects factory</description>
- <res-ref-name>dataObjectsNameForBean</res-ref-name>
+ <res-ref-name>jdo/someName</res-ref-name>
<res-type>org.exolab.castor.jdo.DataObjects</res-type>
<res-auth>Container</res-auth>
</resource-ref>
</pre>
-It is recommended to start JNDI names for JDO resources with "jdo/"
-(e.g, the bean JNDI name might be "java:comp/env/jdo/myjdo").
+It is recommended to start JNDI names for JDO resources with "jdo/".
Also it is recommended to use EJX to edit ejb-jar.xml and jboss.xml files
(in "EJB 1.1 XML" and "EJB 1.1 XML with JBoss XML" modes, respectively).
</li>
@@ -128,7 +119,7 @@
<pre>
public MyObject a_method() {
InitialContext ic = new InitialContext();
- DataObjects jdo = (DataObjects) ic.lookup("java:comp/env/jdo/myjdo");
+ DataObjects jdo = (DataObjects) ic.lookup("java:comp/env/jdo/someName");
Database db = jdo.getDatabase();
db.create(obj1);
[...]
_______________________________________________
Jboss-development mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/jboss-development