db-torque-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jme...@chubb.com
Subject RE: AbstractBaseManager vs. JDO Persistence Manager
Date Fri, 29 Jul 2005 16:20:43 GMT


I found this information regarding JDO PersistenceManager


Your object model is usually composed of a set of classes with many
interrelationships. The graph of all the related instances of those classes
may include the entire contents of the datastore, but typically your
applications deal with only a small number of the persistent instances at a
time. JDO provides the illusion that your application can access the entire
graph of connected instances, while in reality it only instantiates the
small subset of instances that the application needs. This concept is
called transparent data access, transparent persistence, or simply
A PersistenceManager manages the persistent instances accessed from a
datastore. It provides methods to make instances persistent and to delete
instances from the datastore. It also provides factory methods to construct
Extent and Query instances, which you use to access instances from the
A PersistenceManager can manage any number of persistent instances at a
time. Each instance of a persistent class is associated with one
PersistenceManager or zero PersistenceManagers. A transient instance is not
associated with any PersistenceManager instance. As soon as an instance is
made persistent or transactional, it is associated with exactly one


This sounds similar to your AbstractBaseManager in that it manages
instances but it appears that PersistenceManager adds support for lifecycle

deletePersistentAll( )

evictAll( )

makeNontransactionalAll( )

makePersistentAll( )

makeTransactionalAll( )

makeTransientAll( )

refreshAll( )

retrieveAll( )

This methods look similar to what is in the abstract BasePeer class.

Spring interfaces with JDO via the PersistenceManager.   I think the idea
is that there is one central access point into JDO through the
PersistenceManager.  Maxim has created some code that implements
PersistenceManager like functions for Torque.    Hopefully this will let us
mirror the JDO design for the torque ORM package.  Spring tries to be
consistent in implementation and I think Thomas Risberg would approve of
that design.

Still much to learn.  I'm new to Spring also.  Big learning curve for me...
(both Torque and Spring) but it's coming along with your help :)  I
appreciate it.


John Menke

             Thomas Fischer                                                
             u.net>                                                     To 
                                       "Apache Torque Developers List"     
             07/29/2005 08:45          <torque-dev@db.apache.org>          
             AM                                                         cc 
             Please respond to         RE: AbstractBaseManager  vs. JDO    
              "Apache Torque           Persistence Manager                 
             Developers List"                                              

Hi John,

I am afraid I do not have enough knowledge on JDO and its
PersistenceManager to answer your question. I'll tell you the tiny bit I
know about AbstractBaseManager:
AbstractBaseManager is the base class for the Manager Classes, just as
BasePeer is the base class for the Peer objects . The Manager classes are
needed if one wants to cache database objects in the Torque runtime.
Caching is tornde OFF by default; if one wants to enable it, one has to
explicitly set the torque.useManagers generator property to true. If
caching is enabled, the generator will create different object classes and
the additional manager classes for cache management. Caching is still
considered experimental, and I have heard that cache invalidation is still
a problem (probably one has to invalidate the cache manually).

That is all I know about the AbstractBaseManager class. If you have further
questions or need clarification, please keep asking.


jmenke@chubb.com schrieb am 28.07.2005 18:20:08:

> Is the AbstractBaseManager class in Torque the functional equivalent of a
> PersistenceManager in JDO?
> John Menke

To unsubscribe, e-mail: torque-dev-unsubscribe@db.apache.org
For additional commands, e-mail: torque-dev-help@db.apache.org

To unsubscribe, e-mail: torque-dev-unsubscribe@db.apache.org
For additional commands, e-mail: torque-dev-help@db.apache.org

View raw message