Thought inc.

The Dynamic O/R Mapping Company
  CocoBase PURE POJO

features of new v5.0
> pure pojo - ejb3
> magic mapper
> high performance
> o/r mapping
> querying solutions
> cocobase is free
> eclipse, spring
> technical spec's

  tech support


Dynamic O/R Mapping™ and
Dynamic Transparent Persistence

with CocoBase

for the J2EE & J2SE Platforms

CocoBase® Enterprise O/R Whitepaper


CocoBase® Enterprise O/R is an enterprise level mapping technology for persisting Java objects with relational databases. The core of the tool is a mature dynamic mapping layer and administration interface, which provide the most comprehensive features available on the market for persisting application data. Designed to be architecturally extensible, the CocoBase® toolset includes a complete set of Dynamic Transparent Persistence® features. This gives Java developers a mature foundation for mapping everything from simple Java objects to complex distributed and transactionally coordinated data, with the ability to utilize the newest advances in data persistence such as Transparent Persistence.

CocoBase® Enterprise O/R is a vendor neutral, Object to Relational mapping layer that wraps any standard JDBC driver, and sits between Java application objects and standard JDBC accessible databases. In application server environments, the CocoBase® runtime exists in the application server container. CocoBase® manages object and object graph persistence, and provides a portable platform for the retrieval, management, and persistence of application data with relational databases.

CocoBase® persistence features help to keep Java object models simple and focused on business logic, and removes persistence related code from both the programming model and Java byte-code. These features are available for use with pure Java data object models (no byte-code or class hierarchy changes are required) and can be used in conjunction with Session Beans, JSPs, and standalone Java applications and applets.

CocoBase® persistence features include the following technologies:

Dynamic O/R Mapping® provides data mapping functionality for Java objects. CocoBase® removes database specific code and predefined SQL from the application source code and instead, relies on user defined database maps (i.e. dynamic mapping layer) to generate application specific SQL and JDBC code at runtime. When persisting object data, attributes can be mapped to single or multiple database tables simultaneously, in local and distributed environments. Dynamic O/R Mapping® also provides the ability to bind new mapping definitions and new navigation models on the fly. The same object model can be readily used in different applications, each specifying unique, user-defined persistence and navigation models.

CocoBase® Transaction Objects provides object-oriented transaction support. The Transaction object coordinates persistence operations in local and distributed environments and maintains synchronization between database and in-memory attributes. The Transaction object, with its built-in optimizations, improves application performance and reduces network overhead.

CocoBase® Navigator provides database relationship mapping and object graph navigation and management functionality for persistent objects. The Navigator supports 1-1, 1-M, M-1 and M-M relationships. Persistence control is provided at each class level in the object graph and each database operation (i.e. Select, Insert, Update, Delete) is individually configurable.

Transparent Persistence provides persistence to object models and object graphs (related groups of objects) that in themselves are not database aware. Persistence is provided, using CocoBase® Dynamic O/R Mapping®, Transaction and Navigation tools, in a way that is non-invasive and requires no changes to the Java source or byte-code.

Dynamic Transparent Persistence® (DTP) is the combination of features from both Dynamic O/R Mapping® and Transparent Persistence.

Distributed Dynamic Transparent Persistence® makes DTP applications compatible with distributed environments. For example, the Generic Session Bean included with CocoBase® is a production ready implementation that incorporates distributed environment features.

What is Dynamic O/R Mapping® ?

CocoBase® removes database specific code and predefined SQL from the application source code and instead, relies on user defined database maps to generate application specific SQL at runtime. CocoBase® maps provide a template for dynamically generating the structure of the SQL and query values are programatically specified and inserted at runtime. This architecture decouples the application object from a particular database structure or particular SQL syntax and allows data objects to be easily generated, maintained and reused. It also centralizes database and object model maintenance since maps stored in database repositories can easily be edited or replaced, and any changes are instantly reflected throughout the enterprise.

Typically, O/R tools are often implemented by statically coding SQL directly into an application, or by tightly coupling the O/R layer to a single class hierarchy, which can be very fragile, or may result in limited reusability and difficulty in maintenance. In contrast, the CocoBase® dynamic mapping layer allows data maps to be shared, changed on the fly, and evolved quickly to meet the needs of the enterprise. The CocoBase® O/R mapping layer also provides many performance and scaling optimizations that can easily be configured to best fit specific application needs without requiring application regeneration and redeployment.

What is Dynamic Transparent Persistence
® ?

Dynamic Transparent Persistence® refers to using Dynamic O/R Mapping® and persistence without intrusion on Java source or byte code. CocoBase® implements Dynamic Transparent Persistence® through an automated process of proxying data objects and using Java reflection to determine persistent object attributes. Because the persistence layer is abstracted from the object model and database maps and navigation models are loaded dynamically at runtime, CocoBase® persistence is completely transparent to the object model and can be modified on the fly. CocoBase® Dynamic Transparent Persistenceâ is compatible with local and distributed environments. It is designed to minimize maintenance without sacrificing performance, scaling or portability. Any Java class containing publicly accessible attributes can be persisted using CocoBase®.

A key aspect of CocoBase's® Dynamic Transparent Persistence® is that it is completely non-invasive to the object model. Many systems claim to be transparent but actually mutilate the application byte-code, making it nearly impossible to debug the business logic. Others tightly bind Java classes to a particular persistence API, greatly reducing their reusability, portability and compatibility. CocoBase® does not alter source files, resulting classes or byte code. By careful design, CocoBase® goes beyond just being transparent by focusing on an implementation that provides customers with the most reuse, compatibility and best options for application development.

Session Bean; Distributed Dynamic Transparent Persistence®

CocoBase® Enterprise O/R includes a Generic Session Bean implementation that extends CocoBase® Dynamic Transparent Persistence® into distributed J2EE environments. With Distributed Dynamic Transparent Persistence®, the task of persistence occurs on an application server, rather than on a client, using the servers built-in transaction management and CocoBase's® object tracking, management, and reconciliation features. Some persistence architectures claim to be distributed, but persistence actually occurs in the client and can slow clients that lack the scalability, performance and distributed nature of application servers.

Distributed Dynamic Transparent Persistence® extends the general dynamic nature of CocoBase® by allowing the developer to persist relational data with a simple, non-invasive, non-proprietary, vendor neutral, re-distributable object. For example, a session bean running on one application server may access an Oracle relational database, while a second session bean running on a separate server machine is accessing a Sybase relational database. The two can be automatically transactionally coordinated by the application servers. This is a truly distributed programming model example. CocoBase® leverages the transaction coordination capabilities of the J2EE environment while minimizing the programming effort required.

The CocoBase® Generic Session Bean lets developers define unique navigation models for each distributed application requiring object graph management. Once the navigation model is defined, the application only needs to call the load() or save() methods with the desired root object and the Session Bean manages the persistence of the entire object graph. This allows developers to use the transaction facilities of the application server and a distributed programming model without having to write a new distributed component for each class. It also makes possible, the reuse of existing Java object models and greatly simplifies distributed programming.
This technology, in persisting and retrieving complex object models, acts as a Session Bean "server" service running within the host application server. The Generic Session Bean can serve any standard Java object model or object graph. Object graphs can have any combination of 1-1, 1-M, M-1 or M-M inter-object relationships. The CocoBase® Generic Session Bean is included as source code and is user extensible.

Please note: Entity Beans cannot be transparent because they are responsible for their own persistence.

Dynamic Transparent Persistence
® Features and Benefits

In support of Sun Microsystems' open community language, Java, and its original design intent of dynamic execution and classloading, CocoBase's® dynamic transparent persistence is vendor neutral and 100% portable across J2EE and J2SE platforms. Developers don't need to write database specific code or change the object model in some proprietary way in order to persist objects. Dynamic Transparent Persistence® makes it possible to track and persist any Java class, either locally or in a distributed environment.

With CocoBase® Enterprise O/R, the same object model can be persisted to all JDBC supported databases transparently and simultaneously since they contain no limiting database specific code. This shared objects approach is virtually impossible to implement with other persistence tools because of the tight binding between the object model and persistence layer. CocoBase® persists object data using independent persistence monitors (invisible to the object) that persist, retrieve and reconcile changes to the object or object graph. Multiple monitors can simultaneously run in an application and even in the same thread. They may even monitor the same instances.

CocoBase® persistence facilities integrate with various JDBC, networking, and transaction facilities to ensure proper network programming and serialization compatibility for the application developer. CocoBase's® ability to handle and reconcile multiple object copies in the same Java Virtual Machine (JVM) lets threaded servers have a unique context and to persist data on parallel transactions without interference in their requests. This makes CocoBase® compatible with existing distributed and threaded environments.

Dynamic Transparent Persistence® separates the object model from the persistence layer. As a result, the application object does not need to be aware of its own persistability, the physical database structure, the SQL used to persist it or the Persistence manager. Because of this, the same object can be loaded or persisted to an arbitrary number of databases or database tables.

The CocoBase® runtime and mapping layer persists completely generic Java data objects without implementing or requiring any vendor specific persistence functionality or bytecode manipulation. This makes CocoBase® an incredibly flexible facility for persistence with different environments and database vendors. For example CocoBase® allows the same map to be used to persist an EJB in a J2EE application or a Java Class in a J2SE application. Although the actual class structures are different, CocoBase® can provide persistence based on the 'shape' (attribute names and types) of the objects. As a result, CocoBase® Enterprise OR provides a way to normalize the persistence layer inconsistencies that plague large enterprises.
UML/XMI and Java Class Importer

CocoBase® can import abstract object models designed with UML/XMI Modeling Tools such as Rational Rose, Embarcadero Describe, Together Control Center, and ArgoUML. CocoBase® can also import Java classes generated using code generation tools such as JBuilder, VisualAge for Java or Forte. Once an object model is imported, a concrete database representation can be generated using the CocoBase® toolset. Additionally, a set of 'pure' Java classes can be generated from the imported representation, if required.


CocoBase® Enterprise O/R's dynamic transparent persistence® is fully portable, extensible and scalable. Among its unique features include the ability to perform true Dynamic Transparent Persistence® in both local and distributed environments in a completely standard, non-intrusive, and enterprise ready implementation. THOUGHT Inc.® and CocoBase® continue to deliver the most advanced persistence features with the first truly distributed transparent persistence for J2EE and J2SE environments.



Copyright 2002, THOUGHT Inc., 657 Mission St., San Francisco, CA 94105 USA. All rights reserved. Copyright in these (any and all contained herein) documents is owned by THOUGHT Inc. This material is for personal use only. Republication and re-dissemination, including posting to news groups, is expressly prohibited without the prior written consent of THOUGHT Inc. This publication is provided "as is" without warranty of any kind, either express or implied, including, but not limited to, the implied warranties of merchantability, fitness for a particular purpose, or non-infringement, to also include any and all technical inaccuracies or typographical errors.


CocoBase is a patented product under patent #5857197.


CocoBase, THOUGHT Inc., Dynamic O/R Mapping, Dynamic Transparent Persistence and others are all trademarks of THOUGHT Inc. All other trademarks are owned by their respective owners.





Related Info

CocoBase® Whitepaper
How to Meet ROI Requirements for Persisting Data in Enterprise Applications with CocoBase®.

CocoBase® Whitepaper
Dynamic Transparent Persistence™ for the J2EE and J2SE Platforms.

CocoBase® Whitepaper
Why Dynamic Repository Based Mapping is the Key to Success for Database Access with CMP / BMP Entity Beans.

CocoBase® Whitepaper
Mapping Concepts - Details on how CocoBase Maps Data.