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 &quot;contrib&quot;.</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>
  -&lt;MLET CODE = "org.jboss.jdo.castor.CastorJDOImpl"
  -      ARCHIVE="jboss.jar,castor-0.8.11.jar,xerces.jar"
  -      CODEBASE="../lib/ext/"&gt;
  -   &lt;ARG TYPE="java.lang.String" VALUE="file:../conf/database.xml"&gt;
  -   &lt;ARG TYPE="java.lang.String" VALUE="dataObjectsJndiName"&gt;
  -   &lt;ARG TYPE="java.lang.Integer" VALUE="0"&gt;
  -   &lt;ARG TYPE="java.lang.Boolean" VALUE="false"&gt;
  -   &lt;ARG TYPE="java.lang.Boolean" VALUE="false"&gt;
  -&lt;/MLET&gt;
  +  &lt;mbean code="org.jboss.jdo.castor.CastorJDOImpl"  
name="DefaultDomain:service=CastorJDO,name=someName"&gt;
  +    &lt;attribute 
name="<b>Configuration</b>"&gt;file:../conf/default/database.xml&lt;/attribute&gt;
  +    &lt;attribute name="<b>JndiName</b>"&gt;jdo/someName&lt;/attribute&gt;
  +    &lt;attribute name="<b>LockTimeout</b>"&gt;0&lt;/attribute&gt;
  +    &lt;attribute name="<b>LoggingEnabled</b>"&gt;false&lt;/attribute&gt;
  +    &lt;attribute name="<b>CommonClassPath</b>"&gt;false&lt;/attribute&gt;
  +  &lt;/mbean&gt;
   </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>
   &lt;database name="test" engine="oracle" &gt;
  -    &lt;jndi name="java:/dataSourceJndiName"/&gt;
  +    &lt;jndi name="java:/jdbc/someName"/&gt;
       &lt;mapping href="mapping.xml" /&gt;
   &lt;/database&gt;
   </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>
   &lt;resource-managers&gt;
      &lt;resource-manager
            res-class="org.jboss.ejb.deployment.JDBCResource"&gt;
  -      &lt;res-name&gt;dataSourceNameForBean&lt;/res-name&gt;
  -      &lt;res-jndi-name&gt;dataSourceJndiName&lt;/res-jndi-name&gt;
  +      &lt;res-name&gt;jdbc/someName&lt;/res-name&gt;
  +      &lt;res-jndi-name&gt;jdbc/someName&lt;/res-jndi-name&gt;
      &lt;/resource-manager&gt;
      &lt;resource-manager
            res-class="org.jboss.ejb.deployment.CastorJDOResource"&gt;
  -      &lt;res-name&gt;dataObjectsNameForBean&lt;/res-name&gt;
  -      &lt;res-jndi-name&gt;dataObjectsJndiName&lt;/res-jndi-name&gt;
  +      &lt;res-name&gt;jdo/someName&lt;/res-name&gt;
  +      &lt;res-jndi-name&gt;jdo/someName&lt;/res-jndi-name&gt;
     &lt;/resource-manager&gt;
   &lt;/resource-managers&gt;
   </pre>
  @@ -114,13 +106,12 @@
   <pre>
   &lt;resource-ref&gt;
      &lt;description&gt;DataObjects factory&lt;/description&gt;
  -   &lt;res-ref-name&gt;dataObjectsNameForBean&lt;/res-ref-name&gt;
  +   &lt;res-ref-name&gt;jdo/someName&lt;/res-ref-name&gt;
      &lt;res-type&gt;org.exolab.castor.jdo.DataObjects&lt;/res-type&gt;
      &lt;res-auth&gt;Container&lt;/res-auth&gt;
   &lt;/resource-ref&gt;
   </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

Reply via email to