Active development of JAMWiki has ceased, and bug fixes and support will be limited at best. If you are interested in taking over management of JAMWiki please send an email to the jamwiki-devel mailing list.

Tech:Hibernate

ktip.png This page (and all pages in the Tech: namespace) is a developer discussion about a feature that is either proposed for inclusion in JAMWiki or one that has already been implemented. This page is NOT documentation of JAMWiki functionality - for a list of documentation, see Category:JAMWiki.
Status of this feature: NOT IMPLEMENTED.

Technical Specification

JAMWiki Hibernate layer will use latest Hibernate release, probably version 3.2.5. The Spring Framework controls transaction management and provides some convenient methods. If possible only methods of the Java Persistence API, as know as EJB 3.0 are used. EJB 3.0 is much more lightweight than EJB 2 and doesn't need any application server. It's basically a thin layer above Hibernate.

Integration

All classes are located in org.jamwiki.hibernate.There must be one change in WikiBase, where the DataHandler is initiated. If HibernateDataHandler is available on the classpath, it is created via reflection.

Database Layout

 ---------     --------------------
|Category |   | VirtualWiki        |
 ---------     --------------------
  |m            |1
  |             |
  |m            |m                  
 -------------------          ---------------- 
| Topic             | 1---m  |  TopicVersion  |
 -------------------          ----------------
     |m            
     |             
     |                      
     |----WatchList
     |m 
 ------------
|  User      |
 ------------
     |m
     |
     |m
 ------------
|  Group     |
 ------------


In my opinion RecentChange is just a combination of Topic with 2 TopicVersions. The information is redundant.

A note about RecentChange - the original thought was that with a huge wiki it would be impractical to query thousands upon thousands of topic version to build the recent changes, so having a separate table allowed a way to keep the latest few thousand versions around. With the history pages and user contributions querying the version table it may be time to re-evaluate, but I haven't looked at things closely for a while. -- Ryan 03-Sep-2007 20:12 PDT