You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@turbine.apache.org by jv...@apache.org on 2001/12/08 16:27:39 UTC

cvs commit: jakarta-turbine-fulcrum/src/core/java/org/apache/fulcrum package.html

jvanzyl     01/12/08 07:27:39

  Modified:    src/core/java/org/apache/fulcrum package.html
  Log:
  - removing some references to Turbine and removing items that no
    longer make sense now that the services are decoupled.
  
  Revision  Changes    Path
  1.2       +10 -57    jakarta-turbine-fulcrum/src/core/java/org/apache/fulcrum/package.html
  
  Index: package.html
  ===================================================================
  RCS file: /home/cvs/jakarta-turbine-fulcrum/src/core/java/org/apache/fulcrum/package.html,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- package.html	2001/07/31 14:35:41	1.1
  +++ package.html	2001/12/08 15:27:39	1.2
  @@ -19,12 +19,8 @@
        i.e. memory or connections are allocated once only, and the internal
        state is common to all requesting clients.
   <li> Has pluggable implementation - you can use your own implementation
  -     if you need, just change  an entry in TurbineResources.properties,
  +     if you need, just change  an entry in Fulcrum.properties,
        and there you go.
  -<li> Can access ServletConfig at system startup time to process
  -     relative paths and the like.
  -<li> Can access RunData on the first Turbine doGet execution to
  -     get URL we're running under and the like.
   <li> Can initialize itself (allocate memory, make connctions)
        just before the client requests it for the first time. Services that
        are never used by the application will not allocate resources.
  @@ -33,33 +29,15 @@
   </ul>		  
   <h3>The life cycle of a Service</h3>
   <p>
  -A Service (or any other Initable, if we had any) is not supposed 
  -to do much in it's constructor. Especialy it should not allocate
  -any costly resources like large memory structures, DB or network
  -connections and the like. It may well happen that the Service
  +A Service is not supposed to do much in it's constructor. Especialy it 
  +should not allocate any costly resources like large memory structures, 
  +DB or network connections and the like. It may well happen that the Service
   is sitting in the config file, but the application does not 
   need it, so allocating all resources at system startup might
   be a loss.
   <p>
  -Early initialization is similar to the constructor. It is used
  -to pass some information that the Service will need in it's
  -future operation. For example WebMacro Service uses ServletConfig
  -object to process it's own configuration options: getRealPath()
  -method is used to convert paths to WebMacro.properties and 
  -templates from relative to webapp root to absolute paths.
  -UniqueId Service uses the HttpRequest object from the first Turbine
  -invocation to determine URL this instance is runnign under, to 
  -generate instance ID.
  -Early initialization method should process the configuration, store
  -some values, but NOT allocate resources. There is still a chance
  -that the Service will not be used.
  -(Actually WebMacroService does this wrong, because it triggers 
  -it's late initializer inside early initializer. This needs
  -to be fixed eventually.)
  -If the Service is ready to work (i.e. does not need any more objects
  -being sent to it), and does not to allocate any resources during
  -late initialization, the internal state can be changed so that
  -getInit() returns true.
  +Better explanation of early initialization. WebMacro is no longer
  +a service and what was currently here is misleading.
   <p>
   Late initialization happens when the Service is requested by the
   application for the first time. It should allocate any resources
  @@ -74,35 +52,10 @@
   system is shutting down), the shutdown() method is called.
   shutdown() should deallocate all resources. If any error conditions
   occur they are ignored.
  -<h3>Initialization of services outside of the Turbine servlet</h3>
  -<p>
  -In the case where specific Turbine services are desired outside the
  -context of the <code>Turbine</code> servlet, a Turbine JAR file can be
  -used in conjunction with a <i>properly configured</i>
  -<code>TurbineResources.properties</code> file to initialize a specific
  -set of services to use in your application.  The following sample
  -code performs such initialization:
  -<p>
  -<blockquote><code><pre>
  -String webAppRoot = "/var/httpd/webapps";
  -String trProps = "/var/httpd/TurbineResources.properties";
  -try
  -{
  -    TurbineConfig cfg = new TurbineConfig(webAppRoot, trProps);
  -    cfg.init();
  -}
  -catch (Exception e)
  -{
  -    // If Turine fails to initialize, no logging service will be available.
  -    String msg = "Failed to initialize Turbine: " + e.getMessage();
  -    // Write directly to stderr to preserve the full stack trace.
  -    System.err.println(msg);
  -    e.printStackTrace();
  -    throw new Error(msg);
  -}
  -</pre></code></blockquote>
  -</td></tr></table>
  +</td>
  +</tr>
  +</table>
   <br>
  -<font size="-2">$Id: package.html,v 1.1 2001/07/31 14:35:41 jvanzyl Exp $</font>
  +<font size="-2">$Id: package.html,v 1.2 2001/12/08 15:27:39 jvanzyl Exp $</font>
   </body>
   </html>
  
  
  

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