You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@struts.apache.org by hu...@apache.org on 2002/06/23 20:57:20 UTC

cvs commit: jakarta-struts/doc/userGuide building_model.xml project.xml

husted      2002/06/23 11:57:20

  Modified:    doc/userGuide building_model.xml project.xml
  Log:
  Update menu for UserGuide folder. Clarify role of the Struts datasource manager.
  
  Revision  Changes    Path
  1.7       +36 -14    jakarta-struts/doc/userGuide/building_model.xml
  
  Index: building_model.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-struts/doc/userGuide/building_model.xml,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- building_model.xml	20 Feb 2002 00:41:14 -0000	1.6
  +++ building_model.xml	23 Jun 2002 18:57:19 -0000	1.7
  @@ -83,7 +83,8 @@
         <blockquote>
           <b>Note:</b> While ActionForm beans often have properties that correspond 
           to properties in your Model beans, the form beans themselves should 
  -        be considered part of the view.
  +        be considered a Controller component. As such, they are able to 
  +        transfer data between the Model and View layers. 
         </blockquote>
         <p>
           The Struts framework generally assumes that you have defined an
  @@ -239,23 +240,43 @@
       </section>
       
       <section name="2.6 Accessing Relational Databases" href="databases">
  -      
  +
         <p>
  -        Struts can define the datasources for an application from within its standard 
  -        configuration file. A <b>simple</b> JDBC connection pool is also provided. See <a 
  -        href="building_controller.html#config">The Action Mappings Configuration File</a>
  -        section and the Utilities Developer Guide for details. 
  +        Ideally, the business logic beans should encapsulate the data access 
  +        details, including acquiring a database connection. However, some 
  +        application designs expect that the caller able to provide a
  +        with a database connection or datasource instance. When this is the 
  +        case, the Struts datasource manager can make it easy for your Action 
  +        to produce these resources on demand. 
  +      </p>      
  +      <p>
  +        The Struts datasource manager is configured as an element in the 
  +        Struts configuration file (struts-config.xml). The manager can 
  +        used to deploy any connection pool that implements the         
  +        <code>javax.sql.DataSource</code> interface and is configurable totally
  +        from JavaBean properties. If your DBMS or container provides a 
  +        connection pool that meets these requirements, then that component 
  +        might your first choice. 
  +       </p>
  +       <p>
  +        Otherwise, the Struts distribution includes a Generic DataSource pool  
  +        [org.apache.struts.util.GenericDataSource]
  +        that works well with the datasource manager. If another component 
  +        is not specified, the Generic DataSource pool is used by default.
  +        See <a  href="building_controller.html#config">The Action Mappings 
  +        Configuration File</a> section and the Utilities Developer Guide for 
  +        more detail. 
         </p>
         <p>
  -        After the datasource is defined, here is an example of establishing a connection 
  -        from within a Action perform method.
  +        After the datasource is defined, here is an example of using the 
  +        manger to establishing a connection from within an Action's <code>execute</code> method.
         </p>
   <pre>
   public ActionForward
  -       perform(ActionMapping mapping,
  +       execute(ActionMapping mapping,
                  ActionForm form,
                  HttpServletRequest request,
  -               HttpServletResponse response)
  +               HttpServletResponse response) throws Exception 
   {
    javax.sql.DataSource dataSource;
    java.sql.Connection myConnection;
  @@ -281,10 +302,11 @@
   </pre>
         
         <p>
  -        Note that the Struts generic connection pool is an <b>optional</b> component. Many 
  -        Struts applications use other connection pools for better performance, 
  -        especially with high-volume production systems. 
  -       </p>
  +        Note that the Struts connection pool [org.apache.struts.util.GenericDataSource] 
  +        has <b>not</b> been optimized for performance. Many Struts applications use other connection 
  +        pools, especially with high-volume production systems. If your DBMS or container 
  +        provides a connection pool of its own, that may be a better choice. 
  +      </p>
         <p align="center">
           Next: <a href="building_view.html">Building View Components</a>
         </p>
  
  
  
  1.8       +8 -2      jakarta-struts/doc/userGuide/project.xml
  
  Index: project.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-struts/doc/userGuide/project.xml,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- project.xml	3 Mar 2002 05:10:56 -0000	1.7
  +++ project.xml	23 Jun 2002 18:57:20 -0000	1.8
  @@ -48,8 +48,14 @@
           href="installation.html"/>
         <item name="Newbie FAQ"           
           href="../newbie.html"/>
  -      <item name="Struts Home"
  -        href="../index.html"/>
  +    </menu>
  +
  +    <menu name="Welcome">
  +        <item name="Home"                    href="../index.html"/>
  +        <item name="News &amp; Status"       href="../news_2002.html"/>
  +        <item name="Kickstart FAQ"           href="../kickstart.html"/> 
  +        <item name="Resources"               href="../resources/index.html"/>
  +        <item name="Who We Are"              href="../volunteers.html"/>
       </menu>
   
   </project>
  
  
  

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>