cocoon-docs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From d...@cocoon.apache.org
Subject [Cocoon Wiki] Updated: GettingStartedWithCocoonAndHibernate
Date Fri, 29 Oct 2004 20:18:45 GMT
   Date: 2004-10-29T13:18:45
   Editor: JorgHeymans <jh@domek.be>
   Wiki: Cocoon Wiki
   Page: GettingStartedWithCocoonAndHibernate
   URL: http://wiki.apache.org/cocoon/GettingStartedWithCocoonAndHibernate

   no comment

Change Log:

------------------------------------------------------------------------------
@@ -1,12 +1,16 @@
-
 = Why would you want to do this?  =
 
-''brief outline of the benefits of using Hibernate''
-
+''brief outline of the benefits of using an object relational mapping tool, like for Hibernate
or OJB''
+  *  You don't have to write endless SQL access code anymore. The O/R mapping tool generates
all necessary SQL access code behind the scenes and hands you the results in POJO format.
+  *  You can manipulate your database (read, insert, delete) using POJO's and nothing but
POJO's.
+  *  Hibernate comes with transparent connection pooling (DBCP) and query caching (EHCache),
only a matter of configuration.
 
 = What must you know before you start? =
 
 ''outline skills and depth of knowledge required''
+  *  You need to be proficient in Java, have basic SQL knowledge in case you want to do troubleshooting.

+  *  You should now how to translate your application domain into a solid database model.
+  *  Understand the "lazy loading" concept that most O/R mapping tools use by default. This
generally means that nothing is retrieved from the database until you really ask for it. [http://www.hibernate.org/162.html]
 
 ''outline skills and depth of knowledge that would be useful''
 
@@ -22,23 +26,28 @@
 
 = What other software is also useful? =
 
-== System X ==
+== Random query monitoring tool ==
+
+It is useful to see what queries your mapping tool is actually generating under the hood.
With hibernate you can configure this in the configuration file. Alternatively most databases
also offer query logging.
 
-System X is useful because .... It can be obtained from [http://www]
+== Middlegen ==
 
-== System Y ==
+Middlegen extracts hibernate mapping files from your database. It also correctly generates
the mapping relations between tables if you setup foreign key constraints. 
 
-System Y is useful because .... It can be obtained from [http://www]
+It can be obtained from [http://boss.bekk.no/boss/middlegen/], check also [http://middlegen.codehaus.org/]
or [http://www.hibernate.org/98.html] 
 
-== System Z ==
+== hbm2java ==
 
-System Z  is useful because .... It can be obtained from [http://www]
+hbm2java is a hibernate ant task that can generate java classes from hibernate mapping files.
It can be obtained from the hibernate distribution [http://www.hibernate.org]
 
 ----
 
 = How to Install and Configure the Software =
 
-Hibernate can be deployed according to the installation procedure found at [http://www.hibernate.org/].
 After this you will need to...
+Hibernate can be deployed according to the installation procedure found at [http://www.hibernate.org/].
 
+
+  *  If you want to setup hibernate under Cocoon I recommend you setup a servlet filter for
handling the disposal of hibernate sessions. This ensures that your hibernate session sticks
around until *after* your view was rendered. This technique is described in more detail in
the "Hibernate in Action" book ([http://www.manning.com/bauer]). 
+
 
 Other installation procedures needed before getting started are ...
 
@@ -48,7 +57,7 @@
 
 == Objective ==
 
-The objective of this part is to allow a user to perform an ACID (add/create/insert/delete)
operation on a single table.  The table, while simple, contains a range of data types that
will demonstrate how data is formatted in the front end (by Cocoon) and handled on the back
end (by Hibernate).  In addition ...
+The objective of this part is to allow a user to perform an ACID (add/create/insert/delete)
operation on a single table.  The table, while simple, contains a range of data types that
will demonstrate how data is formatted in the front end (by Cocoon) and handled on the back
end (by Hibernate).  
 
 == Step 1: Do this ==
 

Mime
View raw message