DZone
Thanks for visiting DZone today,
Edit Profile
  • Manage Email Subscriptions
  • How to Post to DZone
  • Article Submission Guidelines
Sign Out View Profile
  • Post an Article
  • Manage My Drafts
Over 2 million developers have joined DZone.
Log In / Join
Refcards Trend Reports Events Over 2 million developers have joined DZone. Join Today! Thanks for visiting DZone today,
Edit Profile Manage Email Subscriptions Moderation Admin Console How to Post to DZone Article Submission Guidelines
View Profile
Sign Out
Refcards
Trend Reports
Events
Zones
Culture and Methodologies Agile Career Development Methodologies Team Management
Data Engineering AI/ML Big Data Data Databases IoT
Software Design and Architecture Cloud Architecture Containers Integration Microservices Performance Security
Coding Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
Partner Zones AWS Cloud
by AWS Developer Relations
Culture and Methodologies
Agile Career Development Methodologies Team Management
Data Engineering
AI/ML Big Data Data Databases IoT
Software Design and Architecture
Cloud Architecture Containers Integration Microservices Performance Security
Coding
Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance
Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
Partner Zones
AWS Cloud
by AWS Developer Relations
  1. DZone
  2. Data Engineering
  3. Databases
  4. Apache Cayenne 3.0 and the State of the Project

Apache Cayenne 3.0 and the State of the Project

Mitch Pronschinske user avatar by
Mitch Pronschinske
·
Jul. 07, 10 · Interview
Like (0)
Save
Tweet
Share
11.61K Views

Join the DZone community and get the full member experience.

Join For Free
After 9 years as an active Top Level Project at Apache, the Cayenne project released version 3 of its ORM and remoting services persistence framework.  Cayenne VP Andrus Adamchik believes that Cayenne 3.0 has what it takes to compete with the best Java ORMs like Hibernate.  The foundations of Cayenne's design provide 'rich' persistent objects and a clean separation between the mapping model and Java code.  Adamchik says those choices have endured for nearly a decade: "they survived POJO/annotation hype rather well,enabling smooth database access experience and a number of rather unique features not found (maybe even not possible) in other ORMs."  Cayenne 3.0 continues to extend the abilities of its ORM with those founding principles in mind.

Cayenne supports database reverse engineering and generation, as well as a Velocity-based class generation engine.  These utilities are controlled through the CayenneModeler GUI tool, requiring no XML or annotation based configuration.  Cayenne also provides database generation, Web Services and non-Java client integration, schema mapping, on-demand object and relationship faulting, database auto-detection, and more.

A very long list of additional features were added to Cayenne 3.0.  The upgrade drops right into an older existing Cayenne project, and the only problems with backward compatibility would be that the saved files in CayenneModeler 3.0 don't work with previous versions.  Cayenne committers thought about building a JPA provider on top of the runtime, but ultimately decided to stay away from JPA.  Many of the new features came out of this idea however.  

Java 5 is now the minimum requirement for Cayenne 3.0 and generics are now supported.  Object properties can be mapped to columns from a joined table over one or more joins.  You can also declare a callback method on an entity object or declare a listener class, or register it via API, to receive entity events, JPA-style.

Other features include:

  • A Pluggable Query Cache
  • EJBQL Object Queries as Strings
  • SelectQuery improvements
  • More Tools for CayenneModeler
  • Performance Improvments

Adamchik explained what developers who used Cayenne for the first time thought about it:

"Programmers who haven't used Cayenne before will find it a powerful and easy to use ORM, distinguished from other ORM tools by a clean and intuitive API, powerful three tier (ROP) option, flexible caching, a GUI modeler tool and much more. Cayenne is extremely stable; its huge suite of tests and long history mean that it is fast and reliable."

The project website cites three points that set Cayenne apart form other ORMs

  1. Cayenne can work in three-tier (ROP) mode connecting multiple clients through remote Cayenne controlled services, not JDBC.  This brings more control to caching and centralized validation through a variety of clients.
  2. Cayenne can use generic classes and define the mapping dynamically at runtime without needing to know the class at compile time and without bytecode manipulation.
  3. Nested contexts provide an arbitrary number of nesting levels for commit/rollback operations so users can create "scratch contexts" for working with objects and preserving a larger set of uncommitted changes.

Future Releases
Planning and development for Cayenne 3.1 is well underway.  A dependency injection container is already available in the project's Subversion trunk.  The committers don't want to introduce a complex new runtime like Spring or Guice yet.  The DI container won't create version conflicts with these runtimes.  3.1 will also finalize the support of generics in queries.

ObjectStyle offers commercial support for Apache Cayenne.  You can download Cayenne here.  The newly released Technical Fact sheet can be found here. 
Database

Opinions expressed by DZone contributors are their own.

Popular on DZone

  • GitLab vs Jenkins: Which Is the Best CI/CD Tool?
  • Public Key and Private Key Pairs: Know the Technical Difference
  • Best CI/CD Tools for DevOps: A Review of the Top 10
  • Using GPT-3 in Our Applications

Comments

Partner Resources

X

ABOUT US

  • About DZone
  • Send feedback
  • Careers
  • Sitemap

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

  • Article Submission Guidelines
  • Become a Contributor
  • Visit the Writers' Zone

LEGAL

  • Terms of Service
  • Privacy Policy

CONTACT US

  • 600 Park Offices Drive
  • Suite 300
  • Durham, NC 27709
  • support@dzone.com
  • +1 (919) 678-0300

Let's be friends: