Dashboard > Apache Cayenne > 2005 > April > 17 > Cayenne Release Schedule preview
  Apache Cayenne Log In | Sign Up   View a printable version of the current page.  
  Cayenne Release Schedule preview
Added by Andrus Adamchik, last edited by Andrus Adamchik on Apr 17, 2005  (view change)
Labels: 
(None)

I think we are ready for both 1.2M4 and 1.1.2. I will be traveling next week, so both releases will likely go out the week after. A highlight of M4 is definitely Modeler improvements contributed by Garry Watkins. Both visual and backend-related. I am sure everyone will like new "entity toolbars", history navigation and smarter db-to-object layers synchronization and renaming.

1.1.2 will contain a number of cosmetic changes and one serious bug fix - CAY-297. If my latest CAY-297 patch is confirmed to work, I'd like 1.1.2 to go live ASAP.

Now jumping a bit ahead - I am planning to include a first cut of distributed DataContext feature in M5. I already have some code developed locally. Distribution layer (pluggable, currently done over Hessian protocol) is finished. Just need to wrap up a few ObjectStore functions. I faced a few challenges as I designed it. First DataObject is a bit too heavy, as it has all the methods to ensure graph consistency. As a result default implementation depends on ObjectStore, EntityResolver and even DataNode [!] - something that makes its "distribution" harder if not impossible. I defined a "light" version called "Persistent". The goal was to allow concrete implementations to rely on parent context only and avoid making any assumptions about the underlying stack (not even the DataMap). Here is how it looks like now:

Persistent.java
public interface Persistent extends Serializable {

    ObjectId getObjectId();

    void setObjectId(ObjectId id);

    int getPersistenceState();

    void setPersistenceState(int state);

    ObjectContext getObjectContext();
}

Notice that instead of DataContext it uses ObjectContext. ObjectContext is a new interface (see below) that only contains a bare minimum API for communicating with data store and a few callback methods for the benefit of "Persistent" objects.

ObjectContext.java
public interface ObjectContext extends Serializable {

    /**
     * Commits changes made to this ObjectContext persistent objects.
     */
    void commitChanges();

    /**
     * Merges changes from the ObjectContext parameter. This method is used by child
     * ObjectContexts to commit their objects to parent.
     */
    void commitChangesInContext(ObjectContext context);

    /**
     * Executes a named selecting query.
     */
    List performQuery(String queryName, Map parameters, boolean refresh);

    /**
     * Executes a named non-selecting query.
     */
    int[] performNonSelectingQuery(String queryName, Map parameters);

    /**
     * Returns a list of objects that are registered with this ObjectContext and have a
     * state PersistenceState.NEW
     */
    public Collection newObjects();

    /**
     * Returns a list of objects that are registered with this ObjectContext and have a
     * state PersistenceState.DELETED
     */
    public Collection deletedObjects();

    /**
     * Returns a list of objects that are registered with this ObjectContext and have a
     * state PersistenceState.MODIFIED
     */
    public Collection modifiedObjects();

    /**
     * A callback method that is invoked whenver a persistent object property is about to
     * be read. Allows ObjectContext to resolve faults on demand.
     */
    void objectWillRead(Persistent persistent, String property);

    /**
     * A callback method that is invoked whenver a persistent object property is about to
     * be changed. Allows ObjectContext to track object changes.
     */
    void objectWillWrite(
            Persistent persistent,
            String property,
            Object oldValue,
            Object newValue);
}

Our current DataContext is a class, not an interface, and over the years it accumulated a number of dependencies on the underlying Cayenne stack that make things more optimized, but also harder to extend and change. So I decided to start fresh. Lets see where this goes... Definitely the goal is to avoid two sets of API (one for the client one for the server), so as 1.2 matures, DataContext/DataObject and ObjectContext/Persistent should converge into a single design. Also this API was also designed with another upcoming feature in mind - nested DataContexts. So I hope there will be synergy.

This looks great!

I started doing some simple cayenne-spring-JSF integration based on the work you've one, and I can't help but think that the Persistent/ObjectContext is a better fit than DataObject/DataContext.

I'm looking forward to giving this a try.

Posted by Mike Kienenberger at Apr 18, 2005 11:31 | Permalink
April 2005
Sun Mon Tue Wed Thu Fri Sat
          1 2
3 4 5 6 7 8 9
10 11 12 13 14 15 16
17 18 19 20 21 22 23
24 25 26 27 28 29 30
             

1.1.2 Release
Interview with Jonathan 'Wolf' Rentzsch

Site powered by a free Open Source Project / Non-profit License (more) of Confluence - the Enterprise wiki.
Learn more or evaluate Confluence for your organisation.
Powered by Atlassian Confluence, the Enterprise Wiki. (Version: 2.2.9 Build:#527 Sep 07, 2006) - Bug/feature request - Contact Administrators