WO2003077113A1 - Session bean implementation for distributed transparent persistence of complex data objects - Google Patents

Session bean implementation for distributed transparent persistence of complex data objects Download PDF

Info

Publication number
WO2003077113A1
WO2003077113A1 PCT/US2003/006987 US0306987W WO03077113A1 WO 2003077113 A1 WO2003077113 A1 WO 2003077113A1 US 0306987 W US0306987 W US 0306987W WO 03077113 A1 WO03077113 A1 WO 03077113A1
Authority
WO
WIPO (PCT)
Prior art keywords
model
data
objects
cdog
persistence
Prior art date
Application number
PCT/US2003/006987
Other languages
French (fr)
Inventor
Ward Mullins
Original Assignee
Thought, Inc.
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Thought, Inc. filed Critical Thought, Inc.
Priority to AU2003220077A priority Critical patent/AU2003220077A1/en
Publication of WO2003077113A1 publication Critical patent/WO2003077113A1/en

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/28Databases characterised by their database models, e.g. relational or object models
    • G06F16/289Object oriented databases
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/958Organisation or management of web site content, e.g. publishing, maintaining pages or automatic linking

Definitions

  • the field of the present invention relates generally to computer systems, computer data stores and to methods and software for accessing and utilizing data stores. More particularly, the present invention relates to a system, methods and software for creating or maintaining distributed transparent persistence of complex data objects and associated data stores. In one aspect, the invention also relates to an application programming object capable of creating or maintaining distributed transparent persistence of data objects or data object graphs without the necessity of inserting any byte codes or modification of the object graph. Virtually any java object or object graph can be transparently persisted. Further, copies of a data graph or a portion of the data graph can be automatically reconciled and changes persisted without any persistence coding in the object model.
  • the methods for producing persistence for a data object, complex data object or a data store conflict with the goals of producing pure object application models where the object models do not include persistence objects or persistence byte code.
  • Patent 5,857,197 (and its associated programming interfaces (“APIs”)) describes tools for translating object data to relational data, relational data to object data, and object data to object data to expedite the use of data stores.
  • Persistence problems arise with the creation, access, changing or deleting of an object application model that utilizes such data stores.
  • the object application model may be distributed over multiple physical computer machine locations or eyen distributed over multiple Internet website locations that may be independent of the data stores.
  • the object application model may utilize a different set of data objects or different set of definitions for relationships between data objects than that of one or more of its data sources. In most situations, the respective structures of the data sources and of the object applications model simply do not conveniently allow for mapping, accessing or changing of an overall schema of application data objects as well as any associated definitions of relationships between two or more data objects or elements within a data object.
  • relationships may exist between a data object and one or more of the other data objects found in the object application model or in a data object of the data source.
  • a relationship between one data object and another data object or with a data source may be member selected from the group of three relationship types consisting of 1 to 1 (1-1), 1 to many (1-M) or many to many (M-M). Complex combinations of these relationships may exist as a data object relationships definition for a given data object. These relationships are described or illustrated in further detail later in this document.
  • Objects may logically span multiple relational tables or multiple object databases, and may even be distributed over a logical (or hypothetical) computer system involving multiple physically independent computer systems or even multiple website locations.
  • Creating, accessing, maintaining or updating an object application model can require working with multiple translation modules and require tedious and repetitive updating of multiple individual computer systems or multiple data sources in order to do useful work and keep the object application model synchronized.
  • Such approaches are both costly and unwieldy in terms of computing and development resources, particularly with respect to Internet based electronic commerce (eCommerce) object application models.
  • Data objects of an object application model are often a feature of eCommerce object programming applications, where information is obtained from a data source and the data is defined as a data object (e.g., as a Java class) for use with another computer application.
  • a data object or model of data objects may exist only in the random access memory of a computer memory system, or may be saved to either a data source or to some other type of retrievable information repository.
  • a programmer or administrator of an object data application cannot easily access or track the overall model or diagram of data objects for an object application model or some of its specific elements.
  • tools for accessing and persisting data objects and associated data object relationships of a complex data object graph model have not been well implemented in the field of object language programming.
  • a computer application can execute one or more of the following non-limiting actions with respect to one or more of the members selected from the group consisting of data, a data object, and a data object definition: access data, change data, create data, create a new relationship between one or more data objects by creating or changing at least one data object relationship definition, change or delete a relationship between one or more data objects by changing or deleting at least one data object relationship definition, access a data object relationship definition and use its parameters to access a data source or a data object, and access one or more data object relationship definitions or data objects to create a new data object or data object relationship.
  • a data object and an associated data object relationship definition may be represented by a complex data object graph ("CDOG").
  • CDOG for the purposes of this document, may be thought of as a computer program data object graph that represents a data object having at least one relationship with at least one other data object or with itself via a circular link.
  • JDOG Java Data Object Graph
  • a computer applications programmer tool designed to assist a programmer or administrator in the actions of providing persistence for data objects or data object graphs when deleting, inactivating or updating a CDOG
  • the computer applications programmer tool can be configured to automatically reconcile all or a portion of a CDOG and copies thereof on a distributed environment when data objects or relationships are inserted, deleted, inactivated or updated for a CDOG.
  • Class as referred to in this document in the context of computer software applications is a logic unit in a computer application or a computer software program where the application or program is based upon an objected oriented programming language (e.g., Java).
  • objected oriented programming language e.g., Java
  • a class is a logical unit used as a logical template in an object oriented language from which to allocate new instances of objects.
  • Object as used in the context of this document is a general term referring to a logic unit in a computer application or a computer software program where the application or program is based upon an objected oriented prograrnming language (e.g., Java).
  • object may ordinarily be used interchangeably with the term “class” as a template or as an instance depending on the context.
  • Data object as referred to in the context of this document represents the concept of the occurrence of an object that holds data within a specific computer application domain and is likely to have its contents stored in a persistent data source of a computer system (e.g., a database server, a binary file, a text file, or even in a combination of two or more of such a persistent data sources of a computer system).
  • a data object may exist as an independent data object without any relationship to any other data object or it may have one or more relationships with itself or with one or more other data objects.
  • Complex data object refers to the occurrence of a data object that has at least one or more relationships with itself, or at least one or more relationships with one or more other data object(s). In a given instance of a CDO at least one relationship is populated as a link, as defined below.
  • a CDO may have a multiplicity of different relationships with itself or with one or more additional CDOs.
  • Relationship or "data relationship” as used in the context of a CDO refers to the type of logical combination that occurs between a data object with itself, or refers to the type of logical combination that occurs between a data object and at least one another data object. Among other references or descriptions, such a relationship is always referred to or partially described by a "relationship type". This term is used in an object oriented language context to reference or describe any expectations, actions and limitations possible between two or more data objects.
  • Relationship type in the context of this document is a label that specifies the possible multiple combinations that can occur between a CDO and itself or with at least one other CDO.
  • the possible relationship type labels are 1-1 (one to one), 1-M (one to many) and M-M (many to many).
  • a given CDO may be simultaneously related to more than one other CDO through several different types of relationship. This is also sometimes referred to as the multiplicity of the relationship.
  • Link as used in this document with respect to a CDO identifies a particular occurrence of a relationship between a CDO and itself, between a CDO and another CDO. The occurrence of at least one populated link results in an instance of the CDO. This may be considered a synonym for a "relationship" between two objects.
  • “Circular link” as used in this document with respect to a CDO identifies a particular occurrence of a relationship between a CDO and itself that may be direct or indirect (e.g., linked to itself through another CDO).
  • Relationship definition or “relationship description” in the context of this document and computer software applications refers to information, or an abstraction of information, regarding a “relationship”, “data relationship” “relationship type” or a “link” that can be stored, accessed, transferred, communicated, displayed or edited.
  • Complex data object graph or "CDOG” is a term employed herein as an abstraction to logically represent a set of complex data objects and a set of their corresponding relationships.
  • Java data object graph or "JDOG” is a term employed herein as an abstraction to logically represent a set of complex data objects and a set of their corresponding relationships that are part of a Java programming application.
  • Application model or simply “model” are essentially interchangeable terms employed herein as abstractions to logically convey a collective description or other representation for a set of complex data objects and a corresponding description or other representation of their relationships. In one respect, these terms are used logically herein provide a general way of efficiently communicating when referring to set of metadata (i.e., data about data) that describes possible data entities (e.g., objects, database tables, maps, etc,) data relationship types, and data constraints involved in a computer system or application, or in a specific instance of an application. It is important to understand the context in which the terms "application model” and “model” are used in this document.
  • model is an abstraction rather than a specific possibility or instance of the model as applied.
  • application model or “model”. From the context of its use the term will be clear.
  • the model is the abstract relationship between classes, wherein the CEDO is an instance (or set of instances) that expresses) the model.
  • “Navigation”, “navigating” or “navigated” in the context of the present document refers to an action implementing at least one object to interact with a set of related objects for a certain purpose, such as creation, access, insertion, modification and deletion of an object, or of one of its relationships. It is the physical act of traversing the relationships, which might be referred to as “walking up or down the graph” in common lingo.
  • “Navigation model” as used herein is a special type of application model that is applied specifically to a description (or other representation) of how objects can relate to each other and what might be the expected behavior when a CDOG is navigated for a certain, purpose.
  • Object schema is a term employed herein as an abstraction referring to the set of data object classes that describe the possible data objects that can be created, modified or maintained in an application, or describing an instance of a set of data object classes in an application.
  • Distribution Transparent Persistence is a term employed herein as an abstraction referring to the concept of providing persistence for a member selected from the group consisting of a data object, a data object graph, associated data and data object relationships in a distributed environment without the need for the insertion of byte code or data objects in an object model or schema.
  • CocoBase Proxy Classes is a term employed herein used in referring to wrapper classes that provide CocoBase runtime compatibility for objects that aren't inherently database aware.
  • a computer system can persist the attributes and data for any data object that is wrapped with a CocoProxy wrapper class by simply using CocoBase facilities.
  • CocoBase facilities For example, source code for the (attribute based) CocoProxy and (get/set method based) CocoProxyM classes are available under the thought ⁇ cocode o3tier3i ⁇ demos ⁇ pguide directory, when the CocoBase software tools suite is installed on a computer system. This optional design provides an extensible mechanism for instances of data extraction and propagation.
  • CocoBase Navigation API is a term employed herein to refer to an example of an API that provides database relationship mapping and object graph management capability for persistent objects. Database relationships are mapped to object links using CocoBase Navigator link definitions. Persistence control is provided at each class level in the object graph. Each of the Select, Insert, Update and Delete operations are individually configurable.
  • CocoBase Transaction API is a term employed herein to refer to an example of an API that provides object oriented transaction support. Transaction objects are used to persist data object attributes and maintain synchronization between database and in memory attribute values. The Transaction API has many built in optimizations, and applications utilizing CocoBase transactions generally benefit from reduced database and network overhead. This facility allows the developer to group together object changes into a single unit of work whose implementation or storage will succeed or fail all at once.
  • CocoBase Factories is a term employed herein to refer to examples of software modules and softwares libraries that are used to provide automated, custom object instantiation behavior. Factory behavior is completely customizable. For example, a factory may be used to bind newly instantiated objects to a transaction object, to load a graph of related objects using the CocoBase Navigator, or to implement polymo ⁇ hism in a database result set.
  • a ProxyFactory class is part of the current CocoBase software tools suite distribution in the thought ⁇ cocodemo3tier3i ⁇ deinos ⁇ pguide directory, and this factory returns result set objects wrapped in a CocoProxy wrapper, when a CocoProxy wrapped key object is passed into the CocoBase runtime software module as part of a query that needs processing by the CocoBase runtime module.
  • CocoBase Repository is a term employed herein as an abstraction referring to a datasource to dataobject mapping repository and associated software modules that is installed into a datasource (or may optionally be a single stand alone file or set of files that circumscribe a set of datasource to dataobject mapping definitions and associated software modules, or may be an alternate data source).
  • a repository can optionally be in a format such as XML, XMI and the like. See, U.S. Patent Number 5,857,197, the CocoBaseEnte ⁇ rise O/R Tools Suite, and the co-pending patent appliction entitled "Dynamic Object-Driven Database Manipulation and Mapping System" for more detailed descriptions of mapping repositories, and the like.
  • CocoBase Transparent Persistence for Objects and Object Models All models using a relational database for map storage require the CocoBase repository to be installed into the database, or in a stand-alone source accessable to CocoBase.
  • the installation of a mapping repository can occur automatically, if required, when using CocoAdmin to log into the database.
  • Pre-existing database tables can be used, provided that the CocoBase repository is first installed into the database, or accessible to CocoBase from an alternate location.
  • applications that implement CocoBase transparent persistence are included in the CocoBase software tools suite distribution (see the distribution documentation for the location of folders or directories containing such examples).
  • An object of the present invention is to provide a system for creating or maintaining transparent persistence of a complex data object, a complex data object graph (CDOG) model, or a portion of a CDOG.
  • an object of the present invention is to provide such a system that can selectively persist all or a portion of a CDOG model when the model is a member selected from the group consisting of an object model generated from a data object mapping repository and an object model generated from data object modeling tool repository.
  • a further object is to provide such a system is located on, or is part of, a local or distributed computer system.
  • An object of the present invention is to provide a method for creating, maintaining, accessing, navigating and persisting complex data objects stores in a repository.
  • an object of the present invention is to provide such a method having the step utilizing the storage facilities of an ente ⁇ rise EJB server to store and maintain the data object graph.
  • such a method involves a local or distributed computer system.
  • An object of the present invention is to provide a computer software component that operates in an EJB environment, or the like, wherein the component has the capacity to access an object model repository or an instance thereof in a computer memory or in another temporary computer storage store device and persist at least one action selected from the group consisting of creating, maintaining, accessing, navigating, updating or deleting complex data objects as a CDOG model.
  • the computer software component is an Ente ⁇ rise Bean selected from the group consisting of Stateless, Stateful and Entity Beans.
  • the computer software component is an EJB Session Bean built on top of CocoBase runtime libraries having the ability to persist all or a portion of a CDOG model or instance thereof.
  • An even more preferred object is to provide such a computer software component capable of transparently persisting all or a portion of a CDOG model or instance thereof for a local or distributed computer system and automatically reconciling and persisting any changes to an instance of the CDOG model or any changes to the repository definition for the CDOG model.
  • a preferred object of the present invention is to provide a software tool comprising a navigation API and software component ( as described above), adapted for a local network or a distributed network environment, wherein said software tool provides persistence in an object oriented language environment transparently by implementing a configurable network component capable of acquiring and persisting CDOGs through network APIs.
  • a further object of the present invention is a software tool capable of reading a source programming object logic model or a database in a format selected from the group consisting of a UML data file a XMI data file, and a XML file and converting the information into a target member selected from the group consisting of a database definition XML file, a database mapping definition file, and a CDOG definition file.
  • the software can automatically generate a transparent persistence layer that corresponds to the object model information of the source file.
  • a further object of the present invention is to provide a software module and source code known as a an Java entity bean (such as a generic session bean) that is capable of providing persistence of either or both of a data objects and a data model, in total or in part as determined through setting established by a user of the computer system.
  • a software module and source code known as a an Java entity bean (such as a generic session bean) that is capable of providing persistence of either or both of a data objects and a data model, in total or in part as determined through setting established by a user of the computer system.
  • FIG. 1 is a complex data object (CDO) graph drawing, which illustrates a customer object and some of its related objects (billing address, orders and items ordered), as well as relationships between the objects. Relationships of the types 1 to 1 (1-1) and 1 to many (1-M) are shown in this CDO graph. More specifically, FIG. 1 illustrates a CDO graph drawing presenting an instance of a customer object 1 having a 1 to 1 (1-1) relationship (5) with its customer billing address object 10, and a 1 to many relationship (collectively 15, 25, and 35) with the three outstanding order objects 20, 30 and 40, respectively.
  • Order object 20 is an instance of an outstanding order object having a 1 to many relationship (collectively 45 and 55) with the two items ordered objects 50 and 60, respectively.
  • Order object 30 is an instance of an outstanding order object having a relationship with a single order item, but order object 30 has a 1 to many relationship (65) with the item ordered object 70, since many order items could have been associated.
  • Order object 40 is an instance illustrates a 1 to many relationship (collectively 75 and 85) with the two items ordered objects 80 and 90, respectively.
  • FIG. 2 is a complex data object (CDO) graph drawing, which illustrates a company object and some of its related objects (co ⁇ orate address object and some of its departments and employees), as well as relationships between the objects. Relationships of all three types: 1 to 1 (1-1), 1 to many (1-M) and many to many (M- M) are shown in this CDO graph. More specifically, FIG. 2 illustrates a CDO graph drawing presenting an instance of a company object 100 having a 1 to 1 relationship (650) with its co ⁇ orate address object 700, and a 1 to many relationship (collectively 150, 250, and 350) with the three company department objects 200, 300 and 400, respectively.
  • CDO complex data object
  • the company department objects 200, 300 and 400 in FIG. 2 are three instances (many) of company department objects having relationships (425, 450, 550 and 575, respectively) with two (many) employee objects (respectively, 500 and 600).
  • the cross-assignment of employee object 500 to both company department objects 200 and 300, and of employee object 600 to both company department objects 300 and 400, illustrate a complex many to many (M-M) relationship of departments to employees for this company.
  • the present invention provides a system for creating or maintaining persistence for all or a part of a complex data object graph model when a user is creating, maintaining, accessing and navigating complex data objects as a complex data object graph model.
  • the system comprises a computer system having a user interface, a working memory storage area and at least one device for permanently storing information, and said system being loaded with at least one portion of a computer software program, wherein said software program comprises at least one user access interface and a set of programming routines designed for creating or maintaining transparent persistence when a user is creating, maintaining, accessing and navigating complex data objects as a CDOG model.
  • the present invention provides such a system that can persist any part or all of a CDOG model instance, and to resolve and persist any changes to the model or to the repository for the CDOG model.
  • a system providing a point and click graphical user interface.
  • the present invention provides a method for creating, maintaining, accessing, navigating and persisting complex data objects stores as a CDOG model and providing transparent persistence in a distributed environment, comprising the steps of: a) creating or accessing a CDOG representation definition or accessing an instance of the CDOG, b) monitoring and recording any changes to the CDOG or a portion thereof on a local or distributed computer system, and c) persisting any changes to the CDOG on a local or distributed computer system by updating the CDOG or CDOG representation definition to reflect and changes to any copies of the CDOG or CDOG representation definition, and saving a copy of the updated CDOG representation definition to a data source or to another type of information repository.
  • the present invention provides such a method wherein the information data is a data store managed by an EJB Ente ⁇ rise server.
  • an EJB Ente ⁇ rise Java Bean is the software component having the ability to access a CDOG repository file, an UML XMI file or an instance of the at least one portion of the CDOG in a computer's memory or on a distributed network and provide the transparent persistence for the CDOG model.
  • the present invention provides a computer software program having at least one user interface and having at least one feature that provides for at least one action selected from the group consisting of creating or maintaining transparent persistence when a user of a CDOG model is creating, maintaining, accessing or navigating a CDOG model.
  • the present invention provides a software program, or an association with a software program, having a feature for displaying, printing or displaying and printing a representation of the CDOG model as a graph, or as a set of tables representing a CDOG model.
  • such a software program has an editing interface for editing the CDOG model, or has an editable input or source, such as a file, that can be modified to implement changes to the complex data object CDOG model (or has both an interface for editing and an editable input or source, such as a file).
  • the present invention also provides an application programming interface ("API"), as a preferred embodiment, wherein the API can be accessed to create, maintain, access, navigate and persisting complex data objects as a CDOG model.
  • the API can be accessed by an independent computer software program, or by a computer software program module that is part of a software package including the API, to provide at least one action selected from the group consisting of creating, maintaining, accessing, navigating and persisting complex data objects as a CDOG model.
  • the present invention provides such an API as part of a software tool package that provides a method for displaying or printing a representation of the CDOG model as a graph or set of tables representing the CDOG model (or providing methods for both displaying and printing a representation of the CDOG model).
  • such a software tool package that includes the API provides an editing interface for editing the CDOG model, or has an editable input or source, such as a file, that can be modified to implement changes to the CDOG model (or provides both an editing interface and an editable input or source, such as a file,).
  • a preferred embodiment of the present invention provides a software tool comprising the API according ( as described above), adapted for a local network or a distributed network environment, wherein said software tool provides persistence in an object oriented language environment transparently by implementing a configurable network component capable of acquiring and persisting CDOGs through network APIs.
  • the CDOG API is the CocoNavigator API (or the more automated CBFacade API) which provides support for manipulating complex objects in conjunction with the THOUGHT Inc. CocoBase Ente ⁇ rise Object/Relational (O/R) database (hereinafter "CocoBase") mapping tool (see U.S. Patent 5,857,197 (inco ⁇ orated herein in its entirety), for concepts upon which the CocoBase mapping tool is based).
  • An object is considered to be complex when it has established or potential relationships (i.e. links) to other objects. For instance, a Company object instance may be linked to an instance of its co ⁇ orate address and instances of a Department object, which in turn may be linked to a set of instances of Employee objects.
  • FIG.2 An example of such an CDOG is shown in FIG.2, for example.
  • the combination of these objects and their links constitute a graph of objects (CDOG model) that can be manipulated using the CocoNavigator API. Since the CocoNavigator API (or the CBFacade) works in a Java Programming language environment, this CDOG example may also be referred to as a JDOG example.
  • the invention provides a system for creating or maintaining transparent persistence of a member selected from the group consisting of a data object, an object graph model and a portion of an object graph model when a user of the system is creating, maintaining, accessing or navigating complex data objects as a CDOG model, comprising: a) a set of definitions for the relationships between a data source schema and objects capable of sotring data for an object language application, wherein the set of definitions is stored in a repository; b) a set of definitions for the relationships between objects for an object language application, c) an object name, a list of objects, or a set of objects that are to be persisted, d) an object or set of objects as a programming module that contains logic capable of persisting an indicated object or set of objects, e) an input method to inform the programming module of d) with the location of information related to a), b) and c), and f) at least one data source to which persisted data may be stored.
  • a preferred system as described above is such a system that does not require any modifications to an object model or the inclusion of any persistence byte code in the object model in order to provide persistence for all or a portion of the CDOG model. More preferred is such a system that provides persistence for a CDOG model on a distributed network environment. Even more preferred is such a system for creating or maintaining transparent persistence of a member selected from the group consisting of a data object, an object graph model and a portion of an object graph model when a user of the system is creating, maintaining, accessing or navigating complex data objects as a CDOG model, wherein d) comprises a generic ejb stateful session bean. Even more preferred is such a system that provides persistence for a CDOG model on a distributed network environment.
  • such a system as described above does not require any modifications to an object model or the inclusion of any persistence byte code in the object model in order to provide persistence for all or a portion of the CDOG model, wherein d) comprises a generic ejb stateful session bean.
  • the invention provides a software module, or set of modules, for creating or maintaining transparent persistence of a member selected from the group consisting of a data object, an object graph model and a portion of an object graph model when a user of the system is creating, maintaining, accessing or navigating complex data objects as a CDOG model, comprising: i) a software module for creating a set of definitions for the relationships between a data source schema and its stored data to objects in a object language application, ii) a software module for creating set of definitions for the relationships between objects in an object language application, iii) a software module providing an input means for an object name, a list of objects, or a set of objects that are to be persisted, iv) a software module containing the programming logic to persist an object or set of objects based upon access to (a) a set of definitions for the relationships between a data source schema and objects capable of storing data for an object language application, (b) a set of definitions for the relationships between objects for
  • a preferred embodiment of the above invention comprises a software module, or set of modules, as described above, for creating or maintaining transparent persistence of a member selected from the group consisting of a data object, an object graph model and a portion of an object graph model when a user of the system is creating, maintaining, accessing or navigating complex data objects as a CDOG model, comprising software code for generating, accessing, or maintaining a generic ejb stateful session bean object as part of the software module of iv).
  • the invention provides a software tool comprising the API according to the invention or interfacing therewith, wherein the software is adapted for performing the following steps: a) reading a source programming object logic model or a database definition in a format selected from the group consisting of a Unified Modeling Language (“UML”) data file, an XML Metadata Interchange (“XMI”) data file, and an Extensible Markup Language (“XMI”) file; and b) converting the information of (a) into a target member selected from the group consisting of a database definition XML file, a database mapping definition file, and a CDOG definition file.
  • UML Unified Modeling Language
  • XMI XML Metadata Interchange
  • XMI Extensible Markup Language
  • the present invention provides a software tool as described above that is adapted for performing at least one of the following additional steps: a) displaying a representation of a source programming object logic model or a database definition file in a format selected from the group consisting of a UML data file, a XMI data file, and a XML file; b) storing a representation of a source programming object logic model or a database definition file in a format selected from the group consisting of a UML data file, a XMI data file, and a XML file; c) printing a representation of a source programming object logic model or a database definition file in a format selected from the group consisting of a UML data file, a XMI data file, and a XML file; d) displaying the target information of (b); e) storing the target information of (b); and f) printing the target information of (b).
  • the software tool described above provides target information that is at least one member selected from the group consisting a CocoBase database definition repository file, a CocoBase map, a CocoNavigate (or CBFacade) CDOG definition, a CocoNavigate (or CBFacade) object link descriptor, and a CDOG object graph definition data file.
  • target information is at least one member selected from the group consisting a CocoBase database definition repository file, a CocoBase map, a CocoNavigate (or CBFacade) CDOG definition, a CocoNavigate (or CBFacade) object link descriptor, and a CDOG object graph definition data file.
  • the source is a UML/XMI document containing sufficient DTD information to exchange modeling information with a UML modeling tool.
  • the software tool can be set to automatically generate a persistence layer that corresponds to the source UML class diagrams provided by an exported source file from a case tool capable of exporting UML/XMI, such as Rational Rose, Together and ArgoUML.
  • a CDOG Navigator API such as the CocoNavigator API
  • CocoNavigator API can provide at least one object to intercept any accesses to the data objects and their relationships that constitute the CDOG, as well as any changes to the data source upon which the CDOG depends, in order to provide a means to persist any changes to the CDOG (or CDOG model) or related data in the data source.
  • Any changes to the CDOG (or CDOG model) can then be propagated by the CDOG Navigator API to a persistent data source through a CocoBase Ente ⁇ rise O/R connection.
  • persistent data that updates a data source can be utilized to create a CDOG model or to update a CDOG model.
  • Each CDOG (or CDOG model) managed by the CDOG Navigator API (or CBFacade) can be associated by the CDOG Navigator API (or CBFacade) with a CDOG descriptor (such as a file) that may be utilized to represent all or part of a "navigation model".
  • a navigation model may be abstractly described as essentially a namespace in which a set of data objects and a set of link descriptions (i.e., relationship types between data objects) are each defined.
  • a data source, data field, data field size and data field type are listed for each data object in the set of data objects.
  • At least one link description for two data objects, or for a single data object having a circular link contains one or more of the following types of information (however other related information may be utilized):
  • CocoBase map that will impact upon a relationship between two data object should be cascaded to other related map(s) a setting parameter indicating whether a deletion of information from a particular CocoBase map that will impact upon a relationship between two data object should be cascaded to other related map(s)
  • CocoNavigator API When utilized with the CocoBase mapping tool, or with a similar mapping tool, are as follows:
  • a preferred embodiment of the CocoNavigator API or an associated program module is configured to allow many navigation models to be used with the same set of java classes and CocoBase maps that are associated with a CDOG model.
  • This preferred embodiment API, or an associated computer program module may also be configured to permit a user to switch dynamically from one such navigation model to another.
  • a given application is being executed, it is possible to completely change the relationships between data objects and how CDOGs of a CDOG model should be managed.
  • a preferred embodiment of the CocoNavigator API, or an associated computer program module, is configured to permit a user to create, access, support and correctly manage circular data object links.
  • a circular link may be defined as occurring when a data object is directly or indirectly linked to itself as part of a CDOG. Such relationships can be created, accessed, supported and correctly managed via the CocoNavigator API.
  • a preferred embodiment of the CocoNavigator API, or an associated computer program module is configured to permit a user to create, access, support and correctly manage links between data objects as either a bi-directional link or as an oriented link.
  • links between data objects are usually bi-directional links and can be navigated back and forth as an un-oriented navigational model of the CDOG model. With such a bi-directional link feature activated, any object in the navigation model in a given CDOG model can be used as a navigation entry point.
  • the link In an oriented link navigation model, the link may be set as an oriented link accessible from a single direction. Thus, changes must be made from top down or from bottom up on a relationship tree representation of the navigation model, and some actions may need to originate from a pre-set node of the relationship tree.
  • such types of links can be created, accessed, supported and correctly managed via the CocoNavigator API.
  • the CocoNavigator API is configured to permit a user to populate any object property (e.g. , public field or a getter/setter pair) having its type declared as an object class with special dynamic proxies that can monitor and update the state of a relationship link.
  • object property e.g. , public field or a getter/setter pair
  • object classes are thought.Cocobase.navapi.LinkObjProxy of CocoBase and the Sun Microsystems java class, java.util.Vector. Bi- directional or single directional object references can be consistently maintained in this manner, or by other similar logical mechanisms.
  • the CocoNavigator API can be configured to automatically merge a data object and its properties into a CDOG navigation model representation when the class of object being navigated (being created, accessed, supported or maintained) has a property (e.g. , a field or a getter/setter pair) with a name matching the name of a corresponding link as defined in the navigation model.
  • a property e.g. , a field or a getter/setter pair
  • the CocoNavigator API can be configured to include a data object as a relationship link to another data object in a navigation model without the need to declare fields and properties for the data object.
  • Such links should be limited however to cases where no computer code dependency will exist between the java classes that will be associated with such linked data objects of the navigation model.
  • a navigation model can be a pure abstraction, and more reusable than just a populated version or single hypothetical instance of the abstraction.
  • the CocoNavigator API can provide an interface which can be configured to permit a visitor object to use this interface to visit (e.g. , access or change) a data object that is part of a CDOG navigation model.
  • a visitor object e.g. , access or change
  • a data object e.g. , access or change
  • CocoBase an example of CocoNavigator API implementing this concept might using a LinkVisitor object (class). Other similar classes may be defined for this pu ⁇ ose.
  • the visitor interface provides a way for a user to customize and adapt the software, and thereby allows a user to extend the functionality of the CocoNavigator API, or the functionality of an associated computer program module, to provide a desired customizable behavior in their CDOG navigation model.
  • the CocoNavigator API can be configured to operate as a tool to create, access, support and correctly manage a CDOG navigation model in a server environment (e.g., in an EJB container) and to persist any changes to the CDOG navigation model when a navigation model is distributed across a local network or when the navigation model involves a distributed network (e.g., a navigation model distributed across internet connections).
  • a CDO or a CDOG model of any complexity sent by clients (e.g., serialized copies) across a local network, or across a distributed network can be correctly merged into a CDOG model by the CocoNavigator API, or by an associated computer program module.
  • the CocoNavigator API can be configured to send a CDO or CDOG model to a client along with link proxies serialized with parts of the CDO or CDOG model that are being monitored by such link proxies.
  • link proxies serialized with parts of the CDO or CDOG model that are being monitored by such link proxies.
  • dynamic link proxies (described above in (d)) can be used by the client side. Accordingly, a CDOG navigation model can be created, accessed, supported, managed and persisted over a distributed network.
  • the CocoNavigator API can be configured to monitor some or all of the data objects (and associated relationship definitions) participating in links of a CDOG navigation model.
  • the data objects (and associated relationship definitions) participating in links of a CDOG navigation model can be loaded as they are needed (lazy loading) from a persistent data source or from another type of information repository.
  • This lazy loading feature can permit a very large CDOG navigation model to be loaded in a per-link basis as needed.
  • the lazy loading feature can be configured to prevent a link from being loaded twice and can be configured to detect cycles of related loads that have been previously loaded. Such configuration adaptability can be exploited to provide the more efficient use of the resources for a computer system or network or for a distributed computer network.
  • CocoBase transactions Some examples of preferred features that can be provided by the CocoNavigator API and its associated software, which are particularly enhanced when utilized with the currently existing CocoBase mapping tool, are as follows: (aa) CocoBase transactions
  • a preferred embodiment of the CocoNavigator API or an associated program module is configured to bind a data object or data object relationship of a CDOG navigation model with a CocoBase transaction. Such configurations may be utilized to optimize access to the database server and to enhance performance of the computer system, or systems, involved with the CDOG navigation model.
  • the CocoNavigator API or an associated program module can be configured to automatically detect non-CBProp objects (objects with classes that do not implement the CocoBase interface known as the CBProp interface), and automatically create proxies in order to persist such objects as part of a CDOG navigation model.
  • non-CBProp objects objects with classes that do not implement the CocoBase interface known as the CBProp interface
  • the CocoNavigator API or an associated computer program module can be configured to use proxy classes of CocoBase, such as the CocoProxyM classes, when appropriate.
  • proxy classes such as the CocoProxyM classes can provide a system for creating, accessing, supporting, properly maintaining and persisting virtual foreign key fields (i.e., foreign key fields do not need to be defined in the object class for Java programming implementations) by the CocoNavigator API, or by an associated computer program module.
  • the CocoNavigator API or an associated computer program module can be configured to use a configurable network component capable of acquiring and persisting CDOGs through network APIs and thereby provide persistence transparently with respect to the applications that are using the CDOGs.
  • a software tool comprising the CocoNavigator API that is adapted for a local network or for a distributed network environment, wherein the software tool provides persistence in an object oriented language environment transparently by implementing a configurable network component capable of acquiring and persisting CDOGS.
  • Such a concept may be referred to as transparent persistence in the context of this API, because persistence can be obtained without requiring reconfiguring of an existing CDOG model or software application in order to provide such persistence to a computer software application.
  • the CBFacade or other modules containing high level API's can be utilized that can function in place of the CocoNavigator API (or coordinate with it) to automate many of the transparent persistence functions.
  • a software module or modules can be utilized in concert with a local or distributed implementation such as a session bean to provide an easier and quicker establishment of transparent persistence.
  • the CBFacade can provide the functions as defined in (dd) and the session bean can provide a communication link between modules such as a transaction API and the navigation API (and/or with the CBFacade) to assure that transparent persistence occurrs as required.
  • Such transparent persistence in the context of this API can be obtained without requiring reconfiguring of an existing CDOG model or software application in order to provide such persistence to a computer software application.
  • CocoNavigator API has an at least one user access interface, at least one data source access interface and at least three main programming modules consisting of the following programming modules or routines:
  • a programming module or routine constructed to operate on a computer system and to provide the following features to a user or to a software program module of the computer system: a) a computer programming sub-routine or sub-module for obtaining from a member selected from the group consisting of a data source, an information repository, and an input device, sufficient information to construct a CDOG model containing one or more CDOGs, b) a computer programming sub-routine or sub-module for constructing and loading into the memory registers of the computer system a CDOG or a CDOG model representation definition from a data source or other repository, and c) a computer programming sub-routine or sub-module for sending a copy of some portion or all of the CDOG representation definition to a user or to a software program module on a local computer system or on a distributed network;
  • a programming module or routine constructed to operate on a computer system and to provide the following features to a user or to a software program module of the computer system: a) a computer programming sub-routine or sub-module for monitoring a user or a software program module on a computer system that has accessed or changed a portion of a CDOG or CDOG model, which is included in the CDOG, or CDOG model, representation definition of (I), above, and obtaining any changes to the CDOG or CDOG model, b) a computer programming sub-routine or sub-module for monitoring a user or a software program module on a computer system who has obtained a copy of any portion of the CDOG, or CDOG model, representation definition, and for obtaining a copy of any changes that the user might have made to any portion of the CDOG, or CDOG model, representation definition, and c) a computer programming sub-routine or sub-module for comparing a copy of a CDOG, CDOG model, or a representation definition of either the CDOG or CDOG
  • a programming module or routine constructed to operate on a computer system and to provide the following features to a user or software program module of the computer system: a) a computer programming sub-routine or sub-module for storing a new CDOG or CDOG model, or storing a definition of either the CDOG or CDOG model, in a data source or in another information repository, and b) a computer programming sub-routine or sub-module for persisting (saving to permanent storage) either a changed portion of an updated CDOG, an updated CDOG model, or an updated definition representation for either a CDOG or a CDOG model, to a data source or to another type of information repository.
  • the CDOG API according to the invention can be written with an interface that accesses and uses functionalities of the CocoBase mapping tool, associated programming routines, or associated class libraries. Both the object code and the source code of the CDOG API are contemplated as part of this invention.
  • the above described CDOG API can be accessed to create, maintain, access, navigate and persisting complex data objects as a CDOG model.
  • the API can be accessed by a computer software program such as the CocoBase mapping tool, or by a computer software program module that is part of a software package including the API, to provide at least one action selected from the group consisting of creating, maintaining, accessing, navigating and persisting complex data objects as a CDOG model.
  • the present invention provides such an API as part of a software tool package having a feature or method for displaying or printing a graph or set of tables representing a CDOG or a CDOG model.
  • such a software tool package including the API provides an interface for editing a CDOG, a CDOG model, or for editing a representation definition for a CDOG or a CDOG model to provide a modification that implements a change to a CDOG, or to its definition.
  • a software component according to the invention that is capable of persisting all or a portion of a CDOG may be an Ente ⁇ rise Java Bean selected from the group consisting of Stateless, Stateful or even Entity Beans.
  • CocoBase Ente ⁇ rise Beans are a preferred embodiment of the invention and constitute a set of Ente ⁇ rise Java Beans build upon or accessing CocoBase Runtime and EJB APIs to provide persistence in a generic, efficient and transparent way. Distributed transparent persistence can be provided without the need for any object model changes or byte code modifications.
  • CBEBs can be directly deployed on an EJB server with or without customized settings and are capable of persisting virtually any Java Object, any Java Object graph or any portion of the Object graph.
  • Java Objects of any complexity that are arbitrarily created by client applications can be persisted, and the corresponding object classes can be properly mapped to a CocoBase repository or other object repository such as a UML XMI repository. Copies of the Java Object, any portion of an Object Graph, or all of an Object Graph can be automatically reconciled and the changes can be persisted to a storage repository.
  • the CocoBase Navigation API maps database foreign key -primary key relationships to object references.
  • the relationship maps (sometimes referred to herein as navigation models), like the database maps, are stored in a special CocoBase repository, or may be converted into an XML file (or files) and stored in a stand-alone file or directory.
  • the Navigation API supports 1 to 1, 1 to M, and M to M links in both the object and relational spaces. For M to M relationships, an associative table and a corresponding associative map are required, since relational databases do not directly support M to M relationships.
  • a navigation model must be created, or properly reference, before CocoBase links can be defined.
  • a navigation model is a namespace used to categorize and store a set of link definitions. Generally, a single navigation model is sufficient for simple applications. Multiple navigation models are useful if an application switches between several relationship configurations. This allows different views of complex object data for the same set of underlying database tables. Having relationship mapping separated from table mapping is unique to CocoBase. Since maps can be used with multiple link models, it provides reusability at the mapping level.
  • the CBSession EJB is a Stateful Session Bean that works as an abstraction layer for CocoBase runtime classes. It provides generic transparent persistence to Java objects of any complexity in a simple yet elegant way. It is designed to run in any Java Application Server, thus combining CocoBase transparent object persistence capabilities with most features provided by such servers, such as transaction management, security, resource pooling and so forth.
  • the CBSession bean is very simple and easy to use.
  • session bean of Examples 2-4 below might be implemented and used:
  • Context ic new InitialContext(...);
  • Object ref ic.lookup("CBSession”);
  • CBSessionHome home (CBSessionHome) PortableRemoteObject.narrow (ref,CBSessionHome.class);
  • MyComplexObject obj new MyComplexObject()
  • coco_home/classes and coco_home/demos must be in your App Server classpath.
  • the Ant script build.xml will generate a deployable jar file with the CBSession bean for a particular server. Make sure the entry in the beginning of the build.xml file has the entry
  • Targets currently defined include WebLogic 6.1, JBoss 2.4 and a generic jar file. Each subdirectory corresponds to a server, containing the standard descriptor and proprietary descriptors for that server. These descriptors can be modified in case it is required to do so.
  • the jar file for JBoss can be generated as follows: os-prompt> ant jboss
  • IMPORTANT In order to have CBSession working for a particular application model, all the required java classes and resources (i.e. the map pre-load configuration properties file, the navigation model properties file) must be in the classpath (for example, these classes and resources could be copied to the coco_home/demos/resources directory, provided this directory is included in the app server classpath). Another alternative would be to add all needed classes and resources to the CBSession bean jar file. This can be done simply by copying these classes and resources to the directory corresponding to the target server and running the ant script again. For example, for JBoss, the following directory structure would generate ajar file with all classes and resources: cbsession
  • Examples 2-4 source code for CBSession Bean and its use are as follows:
  • the behavior of the session data source can be customized by
  • Object loadedObj this.nav.loadAllLinks(dbobj,mapName,true);
  • this.dataSource CocoDriver.getCocoDriver(this.prop_driver,”",tl ⁇ is.prop_url 5 this.prop_user,this.prop_p assword); if(this.dataSource instanceof thought.CocoBase.CocoPowder) ⁇ thought.CocoBase.CocoPowder.setSilentFlag(true);
  • CocoFactoryInterface() ⁇ public Object getInstance(Object src,
  • Object newContainedObject ((thought.CocoBase.CocoProxyM)src).getObject().getClass0.newInstance();
  • Enumeration keys props.keys(); while (keys.hasMoreElements()) ⁇
  • the CBFacadeRemote is a Wrapper API that works with the CBSession EJB (described in detail previously) It provides a high level API that simplifies the task of remote programming and distributed usage in a very elegant API. It is compatible with an interface which makes it possible to swap out Local and Distributed implementations at will, and at runtime. It is designed to run in any Java Application Server, thus combining CocoBase transparent object persistence capabilities with most features provided by such servers, such as transaction management, security, resource pooling and so forth.
  • Source Code File Name CBFacadeRemote.java package thought.CocoBase;
  • cocosource.navmodel navigation j-nodel_string
  • cocosource.jndiname cbsessionjndi_lookup_string
  • This document is a brief overview of how to create Java applications that use CocoBase Transparent Persistence features starting from SQL database tables. Such Transparent Persistence can be run locally on a system instead of in a distributed environment.
  • a local application server or a JSP server such as TomCat can be utilized to connect a JSP to a database and provide persistence of objects in the model or database.
  • dialog box will appear indicating a successful login and providing a number of task options and/or a tool bar with pull down windows.
  • a window will appear with a tree indicating connections and tables that are available.
  • a Link model is a set of Link definitions. Multiple Link models are useful when an application needs to switch between several relationship configurations, since it allows different views of complex object data over the same set of underlying tables.
  • the idea of having relationship mapping separated from table mapping is unique of CocoBase. It provides reusability at the mapping level, since a given Map can be reused across multiple Link models.
  • Link model usually, one single Link model is sufficient for a simple application.
  • To create a link model right click on the Links branch in the Map editor tree.
  • a pop-up menu like the following will appear giving options such as New Model, Import Model, Save, Save to location, Reload, and the like.
  • the new Link model will be inserted as a sub-node in the editor tree.
  • Link definition would normally be created for each foreign- primary key relationship in the database tables or, in the case of many-to-many relationships, for each associative table.
  • a Link definition is basically a combination of two roles, each having the following information: Map Name - the name of the Map participating in the relationship
  • Link Name the name of the link that connects to the Map in the opposite role. It normally matches the name of the object property (field or get/set method pair) that holds instances of the related objects.
  • Key Fields the comma-separated list of fields defined according to the following guidelines:
  • Java Class the full qualified name of the Java class that will be instantiated when the relationship is loaded from the database. This is normally a class corresponding to the Map specified in the opposite role.
  • M:M Key Fields - This is relevant only for many-to-many Link definitions and is the comma-separated list of the fields in the associative map that refer to the Key Fields of this role. In this case, the name of associative map must be specified in the box M:M Map Name.
  • Link definitions are given in published CocoBase literature. Click on the appropriate boxes to edit the Link definition for the model being defined. Repeat this procedure for each table relationship that is relevant to the application being developed.
  • CocoBase Maps Link models are not kept in the CocoBase repository in the current release. Instead, for each Link model, CocoBase will create a property file called modelname.properties containing all the Link definitions for that model. This property file is stored under the demos/resources directory (by default - although this can be overridden). As long as the property file describing the Link model is in the classpath (either directly or in a subdirectory called resources), CocoBase runtime classes will load the model and register the navigation information. CocoBase Transparent Persistence
  • CocoBase runtime classes can be used to provide transparent persistence to a Java Object Model which corresponds to the created Maps and Links.
  • CocoBase accomplishes transparent persistence with java object models without using bytecode manipulation, proprietary interfaces or class hierarchy intrusion. This means that no special classes or interfaces are needed in the Object Model in order to do persistence with CocoBase. The only requirement is that they must have a default constructor with no arguments.
  • CocoBase Runtime O/R mapping class that wrappers the JDBC driver and issues queries and does the actual persistence calls. This is a class such as thought . CocoBase . CocoPo der or thought . CocoBase . CocoPowder Plugin20 (for jdbc 2.0 connections).
  • CocoBase Transaction object that can track changes of instances, and acts as a change 'buffer'. If a Transaction object is used, then it only calls a CocoBase Runtime driver - O/R mapping runtime class - when the txn.commitQ is called.
  • the Navigator class can function in conjunction with a Transaction object or it can function standalone. While complex object graphs can be transparently managed directly by the Navigator and without the Transaction object, the use of the Transaction object is generally preferred because of its buffering and update optimizations which only persist those attributes that have changed. Creating Applications with CocoBase Transparent Persistence
  • CocoBase runtime classes can be used to persist instances of these classes.
  • CocoBase runtime classes can be used to persist instances of these classes.
  • CocoBase transaction object to manage any objects that are retrieved. Notice how the transaction object is configured through parameters and property settings.
  • CocoBase CocoProxyM (dept) , "Department") ;
  • the Navigator supports one-to-one, one-to-many & many-to-many link definitions with cycle detection. It also detects this locally or by reconciling serialized or copied objects without object model or bytecode intrusion. This is truly transparent persistence that's architected and designed for the NM oriented Java language. There are also more advanced applications included in the demos/pguide/navapi subdirectory that demonstrate all of the mapping one-to- one, one-to-many & many-to-many relationships as well as an EJB using the Navigator system to manage a graph of java objects.
  • This Appendix is an Example describing how to add CocoBase Transparent Persistence to Object Models and applications from SQL database tables (graphic dialogs have been omitted for simplicity, and the options and dialogs may vary somewhat with new releases). This can be done in a local non-distributed environment.
  • a wrapper can be used to wrapper objects and the CBSession class objects (Transparent Persistence mechanism). It is only a brief overview of what can be done with CocoBase.
  • the architecture and implementation presented here is uniquely suited to work in every application from the tiny local application to the enterprise J2EE and to do so with superior performance and manageability.

Abstract

Systems, methods and software for creating or maintaining distributed transparent persistence of complex data objects (1, 10, 20, 30, 40, 50, 60, 70, 80, 90) and associated data stores and an application programming object capable of creating or maintaining distributed transparent persistence of data objects or data object graphs without the necessity of inserting any byte codes or modification of the object graph. Virtually any java object or object graph can be transparently persisted. Copies of a data graph or of a portion of the data graph can be automatically reconciled and changes persisted without any persistence coding in the object model.

Description

SESSION BEAN IMPLEMENTATION OF A SYSTEM, METHOD AND
SOFTWARE FOR CREATING OR MAINTAINING DISTRIBUTED
TRANSPARENT PERSISTENCE OF COMPLEX DATA OBJECTS AND
THEIR DATA RELATIONSHIPS
FIELD OF THE INVENTION
The field of the present invention relates generally to computer systems, computer data stores and to methods and software for accessing and utilizing data stores. More particularly, the present invention relates to a system, methods and software for creating or maintaining distributed transparent persistence of complex data objects and associated data stores. In one aspect, the invention also relates to an application programming object capable of creating or maintaining distributed transparent persistence of data objects or data object graphs without the necessity of inserting any byte codes or modification of the object graph. Virtually any java object or object graph can be transparently persisted. Further, copies of a data graph or a portion of the data graph can be automatically reconciled and changes persisted without any persistence coding in the object model.
BACKGROUND OF THE INVENTION
Systems for accessing data stores from object oriented languages have been used for many years. A frequent approach to accomplish access of data stores involves writing and embedding custom access code within an object application needing the access. This approach is generally limited to having the custom code access only a single relational table within a relational database or similar construct within any other data store (hereinafter collectively "data store"). Under the circumstances where a developer has control over the design and creation of a data store from its inception, it is possible to design and store meaningful information in a single table. Such design opportunities are usually rare, however.
Generally, the methods for producing persistence for a data object, complex data object or a data store conflict with the goals of producing pure object application models where the object models do not include persistence objects or persistence byte code. Particular difficulties exist in a distributed environment since an object application model may exist in one or more of a computer's memory, an application data store and an application information storage repository that may be independent of the data store organization or object definitions. Advancements in the art have been made with respect to tools for conveniently mapping objects to systems of tables and maps in order to expedite accessing, changing and updating data stores. See, for example, U.S. Patent 5,857,197 (and its associated programming interfaces ("APIs")) describes tools for translating object data to relational data, relational data to object data, and object data to object data to expedite the use of data stores. The BMP and the CMP Installer portions of Coco Admin tool in the CocoBase™ Enterprise for O/R Binary Software (Thought, Inc. 657 Mission Street Suite 202, San Francisco, CA 94105 http://www.tlioughtinc.com.) provide means for providing persistence in the EJB environment.
Persistence problems arise with the creation, access, changing or deleting of an object application model that utilizes such data stores. The object application model may be distributed over multiple physical computer machine locations or eyen distributed over multiple Internet website locations that may be independent of the data stores. The object application model may utilize a different set of data objects or different set of definitions for relationships between data objects than that of one or more of its data sources. In most situations, the respective structures of the data sources and of the object applications model simply do not conveniently allow for mapping, accessing or changing of an overall schema of application data objects as well as any associated definitions of relationships between two or more data objects or elements within a data object.
Importantly, relationships may exist between a data object and one or more of the other data objects found in the object application model or in a data object of the data source. A relationship between one data object and another data object or with a data source may be member selected from the group of three relationship types consisting of 1 to 1 (1-1), 1 to many (1-M) or many to many (M-M). Complex combinations of these relationships may exist as a data object relationships definition for a given data object. These relationships are described or illustrated in further detail later in this document.
Objects may logically span multiple relational tables or multiple object databases, and may even be distributed over a logical (or hypothetical) computer system involving multiple physically independent computer systems or even multiple website locations. Creating, accessing, maintaining or updating an object application model can require working with multiple translation modules and require tedious and repetitive updating of multiple individual computer systems or multiple data sources in order to do useful work and keep the object application model synchronized. Such approaches are both costly and unwieldy in terms of computing and development resources, particularly with respect to Internet based electronic commerce (eCommerce) object application models.
Data objects of an object application model are often a feature of eCommerce object programming applications, where information is obtained from a data source and the data is defined as a data object (e.g., as a Java class) for use with another computer application. In practice, a data object or model of data objects may exist only in the random access memory of a computer memory system, or may be saved to either a data source or to some other type of retrievable information repository. A programmer or administrator of an object data application cannot easily access or track the overall model or diagram of data objects for an object application model or some of its specific elements. Unfortunately, tools for accessing and persisting data objects and associated data object relationships of a complex data object graph model have not been well implemented in the field of object language programming.
A computer application can execute one or more of the following non-limiting actions with respect to one or more of the members selected from the group consisting of data, a data object, and a data object definition: access data, change data, create data, create a new relationship between one or more data objects by creating or changing at least one data object relationship definition, change or delete a relationship between one or more data objects by changing or deleting at least one data object relationship definition, access a data object relationship definition and use its parameters to access a data source or a data object, and access one or more data object relationship definitions or data objects to create a new data object or data object relationship. Any changes executed by a computer application with respect to one or more of the members selected from the group consisting of data, data object or data object definition may need to be properly persisted (permanently stored) to preserve any changes to one or more of the members selected from the group consisting of data, a data object and a data object definition. A data object and an associated data object relationship definition may be represented by a complex data object graph ("CDOG"). A CDOG, for the purposes of this document, may be thought of as a computer program data object graph that represents a data object having at least one relationship with at least one other data object or with itself via a circular link. When the data object of a CDOG is implemented in the Java computer program language, the CDOG may be further defined as being a Java Data Object Graph ("JDOG").
There are needs for software, methods and systems that can easily detect and persist any changes to at least one member selected from the group consisting of a data object, any data associated with the related object, or any associated CDOG definition (i.e., an changes to the data object, data or to a relationship of the data object with another data object). For example, there is a need to be able access a pure object model definition from a repository based O/R mapping tool or from a modeling tool repository and provide persistence for the object model without inserting any byte code or additional objects into the object model.
Accordingly, there is a strong need in the art for a computer applications programmer tool designed to assist a programmer or administrator in the actions of providing persistence for data objects or data object graphs when deleting, inactivating or updating a CDOG, wherein the computer applications programmer tool can be configured to automatically reconcile all or a portion of a CDOG and copies thereof on a distributed environment when data objects or relationships are inserted, deleted, inactivated or updated for a CDOG. A particularly strong need exists for such a tool having the further ability to be configured to persist, propagate and reflect system wide (in a local or distributed computer system) any such changes to a CDOG instance to all instances of the CDOG and to all instances of associated data, data objects and data object relationships.
DEFINITIONS
The following non-exhaustive list of definitions is used herein to define terms that may otherwise be confusing or can sometimes have multiple meanings. Each occurrence of a defined term in the above text, in the text that follows, or in the claims of this document, is to be given the meaning ascribed to it in the list of definitions below. "Instance" as referred to in this document in the context of computer software applications is a single occurrence of a software logical element in the memory of a computer system, such as a "class", an "object", a "data object", and the like. This is analogous to the occurrence of a logical memory unit representing a row of data in common practice.
"Class" as referred to in this document in the context of computer software applications is a logic unit in a computer application or a computer software program where the application or program is based upon an objected oriented programming language (e.g., Java). In practice, a class is a logical unit used as a logical template in an object oriented language from which to allocate new instances of objects.
"Object" as used in the context of this document is a general term referring to a logic unit in a computer application or a computer software program where the application or program is based upon an objected oriented prograrnming language (e.g., Java). The term "object" may ordinarily be used interchangeably with the term "class" as a template or as an instance depending on the context.
"Data object" as referred to in the context of this document represents the concept of the occurrence of an object that holds data within a specific computer application domain and is likely to have its contents stored in a persistent data source of a computer system (e.g., a database server, a binary file, a text file, or even in a combination of two or more of such a persistent data sources of a computer system). A data object may exist as an independent data object without any relationship to any other data object or it may have one or more relationships with itself or with one or more other data objects.
"Complex data object" (or "CDO") as used in the context of this document refers to the occurrence of a data object that has at least one or more relationships with itself, or at least one or more relationships with one or more other data object(s). In a given instance of a CDO at least one relationship is populated as a link, as defined below. A CDO may have a multiplicity of different relationships with itself or with one or more additional CDOs.
"Relationship" or "data relationship" as used in the context of a CDO refers to the type of logical combination that occurs between a data object with itself, or refers to the type of logical combination that occurs between a data object and at least one another data object. Among other references or descriptions, such a relationship is always referred to or partially described by a "relationship type". This term is used in an object oriented language context to reference or describe any expectations, actions and limitations possible between two or more data objects.
"Relationship type" in the context of this document is a label that specifies the possible multiple combinations that can occur between a CDO and itself or with at least one other CDO. The possible relationship type labels are 1-1 (one to one), 1-M (one to many) and M-M (many to many). A given CDO may be simultaneously related to more than one other CDO through several different types of relationship. This is also sometimes referred to as the multiplicity of the relationship.
"Link" as used in this document with respect to a CDO identifies a particular occurrence of a relationship between a CDO and itself, between a CDO and another CDO. The occurrence of at least one populated link results in an instance of the CDO. This may be considered a synonym for a "relationship" between two objects.
"Circular link" as used in this document with respect to a CDO identifies a particular occurrence of a relationship between a CDO and itself that may be direct or indirect (e.g., linked to itself through another CDO).
"Relationship definition" or "relationship description" in the context of this document and computer software applications refers to information, or an abstraction of information, regarding a "relationship", "data relationship" "relationship type" or a "link" that can be stored, accessed, transferred, communicated, displayed or edited.
"Complex data object graph" or "CDOG" is a term employed herein as an abstraction to logically represent a set of complex data objects and a set of their corresponding relationships.
"Java data object graph" or "JDOG" is a term employed herein as an abstraction to logically represent a set of complex data objects and a set of their corresponding relationships that are part of a Java programming application.
"Application model" or simply "model" are essentially interchangeable terms employed herein as abstractions to logically convey a collective description or other representation for a set of complex data objects and a corresponding description or other representation of their relationships. In one respect, these terms are used logically herein provide a general way of efficiently communicating when referring to set of metadata (i.e., data about data) that describes possible data entities (e.g., objects, database tables, maps, etc,) data relationship types, and data constraints involved in a computer system or application, or in a specific instance of an application. It is important to understand the context in which the terms "application model" and "model" are used in this document. Ordinarily computer engineers refer to the "model" as an abstraction rather than a specific possibility or instance of the model as applied. However, in this document for the ease of communication abstractions of the model, possible implementations of the model and instances of the model are all referred to generally as "application model" or "model". From the context of its use the term will be clear. The model is the abstract relationship between classes, wherein the CEDO is an instance (or set of instances) that expresses) the model.
"Navigation", "navigating" or "navigated" in the context of the present document refers to an action implementing at least one object to interact with a set of related objects for a certain purpose, such as creation, access, insertion, modification and deletion of an object, or of one of its relationships. It is the physical act of traversing the relationships, which might be referred to as "walking up or down the graph" in common lingo.
"Navigation model" as used herein is a special type of application model that is applied specifically to a description (or other representation) of how objects can relate to each other and what might be the expected behavior when a CDOG is navigated for a certain, purpose.
"Object schema" is a term employed herein as an abstraction referring to the set of data object classes that describe the possible data objects that can be created, modified or maintained in an application, or describing an instance of a set of data object classes in an application.
"Distributed Transparent Persistence" is a term employed herein as an abstraction referring to the concept of providing persistence for a member selected from the group consisting of a data object, a data object graph, associated data and data object relationships in a distributed environment without the need for the insertion of byte code or data objects in an object model or schema.
"CocoBase Proxy Classes" is a term employed herein used in referring to wrapper classes that provide CocoBase runtime compatibility for objects that aren't inherently database aware. A computer system can persist the attributes and data for any data object that is wrapped with a CocoProxy wrapper class by simply using CocoBase facilities. For example, source code for the (attribute based) CocoProxy and (get/set method based) CocoProxyM classes are available under the thought\cocode o3tier3i\demos\pguide directory, when the CocoBase software tools suite is installed on a computer system. This optional design provides an extensible mechanism for instances of data extraction and propagation.
"CocoBase Navigation API" is a term employed herein to refer to an example of an API that provides database relationship mapping and object graph management capability for persistent objects. Database relationships are mapped to object links using CocoBase Navigator link definitions. Persistence control is provided at each class level in the object graph. Each of the Select, Insert, Update and Delete operations are individually configurable.
"CocoBase Transaction API" is a term employed herein to refer to an example of an API that provides object oriented transaction support. Transaction objects are used to persist data object attributes and maintain synchronization between database and in memory attribute values. The Transaction API has many built in optimizations, and applications utilizing CocoBase transactions generally benefit from reduced database and network overhead. This facility allows the developer to group together object changes into a single unit of work whose implementation or storage will succeed or fail all at once.
"CocoBase Factories" is a term employed herein to refer to examples of software modules and softwares libraries that are used to provide automated, custom object instantiation behavior. Factory behavior is completely customizable. For example, a factory may be used to bind newly instantiated objects to a transaction object, to load a graph of related objects using the CocoBase Navigator, or to implement polymoφhism in a database result set. For example, a ProxyFactory class is part of the current CocoBase software tools suite distribution in the thought\cocodemo3tier3i\deinos\pguide directory, and this factory returns result set objects wrapped in a CocoProxy wrapper, when a CocoProxy wrapped key object is passed into the CocoBase runtime software module as part of a query that needs processing by the CocoBase runtime module. "CocoBase Repository" is a term employed herein as an abstraction referring to a datasource to dataobject mapping repository and associated software modules that is installed into a datasource (or may optionally be a single stand alone file or set of files that circumscribe a set of datasource to dataobject mapping definitions and associated software modules, or may be an alternate data source). A repository can optionally be in a format such as XML, XMI and the like. See, U.S. Patent Number 5,857,197, the CocoBaseEnteφrise O/R Tools Suite, and the co-pending patent appliction entitled "Dynamic Object-Driven Database Manipulation and Mapping System" for more detailed descriptions of mapping repositories, and the like.
"CocoBase Transparent Persistence for Objects and Object Models". All models using a relational database for map storage require the CocoBase repository to be installed into the database, or in a stand-alone source accessable to CocoBase. The installation of a mapping repository can occur automatically, if required, when using CocoAdmin to log into the database. Pre-existing database tables can be used, provided that the CocoBase repository is first installed into the database, or accessible to CocoBase from an alternate location. Several example of applications that implement CocoBase transparent persistence are included in the CocoBase software tools suite distribution (see the distribution documentation for the location of folders or directories containing such examples).
SUMMARY OF THE INVENTION
An object of the present invention is to provide a system for creating or maintaining transparent persistence of a complex data object, a complex data object graph (CDOG) model, or a portion of a CDOG. In a preferred embodiment, an object of the present invention is to provide such a system that can selectively persist all or a portion of a CDOG model when the model is a member selected from the group consisting of an object model generated from a data object mapping repository and an object model generated from data object modeling tool repository. A further object is to provide such a system is located on, or is part of, a local or distributed computer system.
An object of the present invention is to provide a method for creating, maintaining, accessing, navigating and persisting complex data objects stores in a repository. In a preferred embodiment, an object of the present invention is to provide such a method having the step utilizing the storage facilities of an enteφrise EJB server to store and maintain the data object graph. In a further object, such a method involves a local or distributed computer system.
An object of the present invention is to provide a computer software component that operates in an EJB environment, or the like, wherein the component has the capacity to access an object model repository or an instance thereof in a computer memory or in another temporary computer storage store device and persist at least one action selected from the group consisting of creating, maintaining, accessing, navigating, updating or deleting complex data objects as a CDOG model. In a preferred aspect, the computer software component is an Enteφrise Bean selected from the group consisting of Stateless, Stateful and Entity Beans. In a further preferred object the computer software component is an EJB Session Bean built on top of CocoBase runtime libraries having the ability to persist all or a portion of a CDOG model or instance thereof. An even more preferred object is to provide such a computer software component capable of transparently persisting all or a portion of a CDOG model or instance thereof for a local or distributed computer system and automatically reconciling and persisting any changes to an instance of the CDOG model or any changes to the repository definition for the CDOG model.
A preferred object of the present invention is to provide a software tool comprising a navigation API and software component ( as described above), adapted for a local network or a distributed network environment, wherein said software tool provides persistence in an object oriented language environment transparently by implementing a configurable network component capable of acquiring and persisting CDOGs through network APIs.
A further object of the present invention is a software tool capable of reading a source programming object logic model or a database in a format selected from the group consisting of a UML data file a XMI data file, and a XML file and converting the information into a target member selected from the group consisting of a database definition XML file, a database mapping definition file, and a CDOG definition file. In a preferred object, the software can automatically generate a transparent persistence layer that corresponds to the object model information of the source file. A further object of the present invention is to provide a software module and source code known as a an Java entity bean (such as a generic session bean) that is capable of providing persistence of either or both of a data objects and a data model, in total or in part as determined through setting established by a user of the computer system.
BRIEF DESCRIPTION OF THE DRAWINGS
For the non-limiting puφose of illustrating some of the concepts of complex data objects CDOs, i.e., data objects and their relationships to one another, according to the invention, two CDO graph drawings Figure 1 and Figure 2 are provided.
Figure 1 is a complex data object (CDO) graph drawing, which illustrates a customer object and some of its related objects (billing address, orders and items ordered), as well as relationships between the objects. Relationships of the types 1 to 1 (1-1) and 1 to many (1-M) are shown in this CDO graph. More specifically, FIG. 1 illustrates a CDO graph drawing presenting an instance of a customer object 1 having a 1 to 1 (1-1) relationship (5) with its customer billing address object 10, and a 1 to many relationship (collectively 15, 25, and 35) with the three outstanding order objects 20, 30 and 40, respectively. Order object 20 is an instance of an outstanding order object having a 1 to many relationship (collectively 45 and 55) with the two items ordered objects 50 and 60, respectively. Order object 30 is an instance of an outstanding order object having a relationship with a single order item, but order object 30 has a 1 to many relationship (65) with the item ordered object 70, since many order items could have been associated. Order object 40 is an instance illustrates a 1 to many relationship (collectively 75 and 85) with the two items ordered objects 80 and 90, respectively.
Figure 2 is a complex data object (CDO) graph drawing, which illustrates a company object and some of its related objects (coφorate address object and some of its departments and employees), as well as relationships between the objects. Relationships of all three types: 1 to 1 (1-1), 1 to many (1-M) and many to many (M- M) are shown in this CDO graph. More specifically, FIG. 2 illustrates a CDO graph drawing presenting an instance of a company object 100 having a 1 to 1 relationship (650) with its coφorate address object 700, and a 1 to many relationship (collectively 150, 250, and 350) with the three company department objects 200, 300 and 400, respectively. Since employees of this company may work for more than one of the company's departments, the company department objects 200, 300 and 400 in FIG. 2 are three instances (many) of company department objects having relationships (425, 450, 550 and 575, respectively) with two (many) employee objects (respectively, 500 and 600). The cross-assignment of employee object 500 to both company department objects 200 and 300, and of employee object 600 to both company department objects 300 and 400, illustrate a complex many to many (M-M) relationship of departments to employees for this company.
DESCRIPTION OF THE INVENTION
The present invention provides a system for creating or maintaining persistence for all or a part of a complex data object graph model when a user is creating, maintaining, accessing and navigating complex data objects as a complex data object graph model. In one embodiment, the system comprises a computer system having a user interface, a working memory storage area and at least one device for permanently storing information, and said system being loaded with at least one portion of a computer software program, wherein said software program comprises at least one user access interface and a set of programming routines designed for creating or maintaining transparent persistence when a user is creating, maintaining, accessing and navigating complex data objects as a CDOG model. In a preferred embodiment, the present invention provides such a system that can persist any part or all of a CDOG model instance, and to resolve and persist any changes to the model or to the repository for the CDOG model. Most preferred is such a system providing a point and click graphical user interface.
The present invention provides a method for creating, maintaining, accessing, navigating and persisting complex data objects stores as a CDOG model and providing transparent persistence in a distributed environment, comprising the steps of: a) creating or accessing a CDOG representation definition or accessing an instance of the CDOG, b) monitoring and recording any changes to the CDOG or a portion thereof on a local or distributed computer system, and c) persisting any changes to the CDOG on a local or distributed computer system by updating the CDOG or CDOG representation definition to reflect and changes to any copies of the CDOG or CDOG representation definition, and saving a copy of the updated CDOG representation definition to a data source or to another type of information repository.
In a preferred embodiment, the present invention provides such a method wherein the information data is a data store managed by an EJB Enteφrise server. In a further preferred embodiment an EJB Enteφrise Java Bean is the software component having the ability to access a CDOG repository file, an UML XMI file or an instance of the at least one portion of the CDOG in a computer's memory or on a distributed network and provide the transparent persistence for the CDOG model.
The present invention provides a computer software program having at least one user interface and having at least one feature that provides for at least one action selected from the group consisting of creating or maintaining transparent persistence when a user of a CDOG model is creating, maintaining, accessing or navigating a CDOG model. In a preferred aspect of the invention, the present invention provides a software program, or an association with a software program, having a feature for displaying, printing or displaying and printing a representation of the CDOG model as a graph, or as a set of tables representing a CDOG model. In a further preferred embodiment, such a software program has an editing interface for editing the CDOG model, or has an editable input or source, such as a file, that can be modified to implement changes to the complex data object CDOG model (or has both an interface for editing and an editable input or source, such as a file).
The present invention also provides an application programming interface ("API"), as a preferred embodiment, wherein the API can be accessed to create, maintain, access, navigate and persisting complex data objects as a CDOG model. In one aspect the API can be accessed by an independent computer software program, or by a computer software program module that is part of a software package including the API, to provide at least one action selected from the group consisting of creating, maintaining, accessing, navigating and persisting complex data objects as a CDOG model. In a preferred aspect, the present invention provides such an API as part of a software tool package that provides a method for displaying or printing a representation of the CDOG model as a graph or set of tables representing the CDOG model (or providing methods for both displaying and printing a representation of the CDOG model). In another preferred aspect, such a software tool package that includes the API provides an editing interface for editing the CDOG model, or has an editable input or source, such as a file, that can be modified to implement changes to the CDOG model (or provides both an editing interface and an editable input or source, such as a file,).
A preferred embodiment of the present invention provides a software tool comprising the API according ( as described above), adapted for a local network or a distributed network environment, wherein said software tool provides persistence in an object oriented language environment transparently by implementing a configurable network component capable of acquiring and persisting CDOGs through network APIs.
In another preferred embodiment, the CDOG API is the CocoNavigator API (or the more automated CBFacade API) which provides support for manipulating complex objects in conjunction with the THOUGHT Inc. CocoBase Enteφrise Object/Relational (O/R) database (hereinafter "CocoBase") mapping tool (see U.S. Patent 5,857,197 (incoφorated herein in its entirety), for concepts upon which the CocoBase mapping tool is based). An object is considered to be complex when it has established or potential relationships (i.e. links) to other objects. For instance, a Company object instance may be linked to an instance of its coφorate address and instances of a Department object, which in turn may be linked to a set of instances of Employee objects. An example of such an CDOG is shown in FIG.2, for example. The combination of these objects and their links constitute a graph of objects (CDOG model) that can be manipulated using the CocoNavigator API. Since the CocoNavigator API (or the CBFacade) works in a Java Programming language environment, this CDOG example may also be referred to as a JDOG example.
In one embodiment, the invention provides a system for creating or maintaining transparent persistence of a member selected from the group consisting of a data object, an object graph model and a portion of an object graph model when a user of the system is creating, maintaining, accessing or navigating complex data objects as a CDOG model, comprising: a) a set of definitions for the relationships between a data source schema and objects capable of sotring data for an object language application, wherein the set of definitions is stored in a repository; b) a set of definitions for the relationships between objects for an object language application, c) an object name, a list of objects, or a set of objects that are to be persisted, d) an object or set of objects as a programming module that contains logic capable of persisting an indicated object or set of objects, e) an input method to inform the programming module of d) with the location of information related to a), b) and c), and f) at least one data source to which persisted data may be stored.
A preferred system as described above, is such a system that does not require any modifications to an object model or the inclusion of any persistence byte code in the object model in order to provide persistence for all or a portion of the CDOG model. More preferred is such a system that provides persistence for a CDOG model on a distributed network environment. Even more preferred is such a system for creating or maintaining transparent persistence of a member selected from the group consisting of a data object, an object graph model and a portion of an object graph model when a user of the system is creating, maintaining, accessing or navigating complex data objects as a CDOG model, wherein d) comprises a generic ejb stateful session bean. Even more preferred is such a system that provides persistence for a CDOG model on a distributed network environment.
In a particularly preferred embodiment, such a system as described above does not require any modifications to an object model or the inclusion of any persistence byte code in the object model in order to provide persistence for all or a portion of the CDOG model, wherein d) comprises a generic ejb stateful session bean.
In a further embodiment, the invention provides a software module, or set of modules, for creating or maintaining transparent persistence of a member selected from the group consisting of a data object, an object graph model and a portion of an object graph model when a user of the system is creating, maintaining, accessing or navigating complex data objects as a CDOG model, comprising: i) a software module for creating a set of definitions for the relationships between a data source schema and its stored data to objects in a object language application, ii) a software module for creating set of definitions for the relationships between objects in an object language application, iii) a software module providing an input means for an object name, a list of objects, or a set of objects that are to be persisted, iv) a software module containing the programming logic to persist an object or set of objects based upon access to (a) a set of definitions for the relationships between a data source schema and objects capable of storing data for an object language application, (b) a set of definitions for the relationships between objects for an object language application, and (c) an object name, a list of objects, or a set of objects that are to be persisted, and v) a software module having an input method to inform iv) of the location of the information related to iv)(a), iv(b) and iv(c).
A preferred embodiment of the above invention comprises a software module, or set of modules, as described above, for creating or maintaining transparent persistence of a member selected from the group consisting of a data object, an object graph model and a portion of an object graph model when a user of the system is creating, maintaining, accessing or navigating complex data objects as a CDOG model, comprising software code for generating, accessing, or maintaining a generic ejb stateful session bean object as part of the software module of iv). Preferred is such a software module, or set of modules that does not require any modifications to an object model or the inclusion of any persistence byte code in the object model in order to provide persistence for all or a portion of the CDOG model, comprising software code for generating, accessing, or maintaining a generic ejb stateful session bean object as iv). More preferred is such a software module, or set of modules that provides persistence for a CDOG model on a distributed network environment.
In another preferred embodiment, the invention provides a software tool comprising the API according to the invention or interfacing therewith, wherein the software is adapted for performing the following steps: a) reading a source programming object logic model or a database definition in a format selected from the group consisting of a Unified Modeling Language ("UML") data file, an XML Metadata Interchange ("XMI") data file, and an Extensible Markup Language ("XMI") file; and b) converting the information of (a) into a target member selected from the group consisting of a database definition XML file, a database mapping definition file, and a CDOG definition file. In a further preferred embodiment, the present invention provides a software tool as described above that is adapted for performing at least one of the following additional steps: a) displaying a representation of a source programming object logic model or a database definition file in a format selected from the group consisting of a UML data file, a XMI data file, and a XML file; b) storing a representation of a source programming object logic model or a database definition file in a format selected from the group consisting of a UML data file, a XMI data file, and a XML file; c) printing a representation of a source programming object logic model or a database definition file in a format selected from the group consisting of a UML data file, a XMI data file, and a XML file; d) displaying the target information of (b); e) storing the target information of (b); and f) printing the target information of (b).
In a still further preferred embodiment the software tool described above provides target information that is at least one member selected from the group consisting a CocoBase database definition repository file, a CocoBase map, a CocoNavigate (or CBFacade) CDOG definition, a CocoNavigate (or CBFacade) object link descriptor, and a CDOG object graph definition data file. Further preferred is such software, wherein the source is a UML/XMI document containing sufficient DTD information to exchange modeling information with a UML modeling tool.
In one embodiment of the software tool according to the invention, the software tool can be set to automatically generate a persistence layer that corresponds to the source UML class diagrams provided by an exported source file from a case tool capable of exporting UML/XMI, such as Rational Rose, Together and ArgoUML.
An easy way to understand the job performed by a CDOG Navigator API, such as the CocoNavigator API, is to imagine it as a monitor that can provide at least one object to intercept any accesses to the data objects and their relationships that constitute the CDOG, as well as any changes to the data source upon which the CDOG depends, in order to provide a means to persist any changes to the CDOG (or CDOG model) or related data in the data source. Any changes to the CDOG (or CDOG model) can then be propagated by the CDOG Navigator API to a persistent data source through a CocoBase Enteφrise O/R connection. Similarly, persistent data that updates a data source can be utilized to create a CDOG model or to update a CDOG model.
Each CDOG (or CDOG model) managed by the CDOG Navigator API (or CBFacade) can be associated by the CDOG Navigator API (or CBFacade) with a CDOG descriptor (such as a file) that may be utilized to represent all or part of a "navigation model". In this respect, a navigation model may be abstractly described as essentially a namespace in which a set of data objects and a set of link descriptions (i.e., relationship types between data objects) are each defined. In a preferred embodiment, a data source, data field, data field size and data field type are listed for each data object in the set of data objects. In another preferred embodiment, at least one link description for two data objects, or for a single data object having a circular link (where the link description is utilized in conjunction with the CocoNavigator API and CocoBase mapping tool) contains one or more of the following types of information (however other related information may be utilized):
- at least one link type (e.g., 1:1, 1 :M, M: 1 and M:M) between data objects
- at least one link qualifier (currently supported qualifiers are STD and BEAN)
- at least one associative CocoBase map (optional, for M:M links only)
- the names of the CocoBase maps related to each of the data objects (usually two maps that are not necessarily distinct), and
- information that may be obtained for each of the CocoBase maps related to the relationship between two data objects, including:
- the name of a relationship link between the two data objects
- the names of the fields (i. e. , keys) in a CocoBase map that are used to establish a relationship link between two data objects
- the name of a data source for each of the fields (i. e. , keys) in a CocoBase map that are used to establish a relationship link between two data objects - the names of the fields (i.e., keys) in the associative CocoBase map (optional, for M:M links only)
- the names of a data source for each of the fields (/. e. , keys) in the associative CocoBase map (optional, for M:M links only) the name(s) of any java classes corresponding to fields that would impact upon the relationship between two data objects a setting parameter indicating whether the a loading of a particular
CocoBase map that will impact upon a relationship between two data object should be cascaded to other related map(s) a setting parameter indicating whether a deletion of information from a particular CocoBase map that will impact upon a relationship between two data object should be cascaded to other related map(s)
- a setting parameter indicating whether an insertion of information into a particular CocoBase map that will impact upon a relationship between two data object should be cascaded to other related map(s), and
- a setting parameter indicating whether an update of information in a particular CocoBase map that will impact upon a relationship between two data object should be cascaded to other related map(s).
Some preferred features provided by the CocoNavigator API and its associated software, when utilized with the CocoBase mapping tool, or with a similar mapping tool, are as follows:
(a) provides multiple navigation models for the same CDOG model
A preferred embodiment of the CocoNavigator API or an associated program module is configured to allow many navigation models to be used with the same set of java classes and CocoBase maps that are associated with a CDOG model. This preferred embodiment API, or an associated computer program module, may also be configured to permit a user to switch dynamically from one such navigation model to another. Thus, while a given application is being executed, it is possible to completely change the relationships between data objects and how CDOGs of a CDOG model should be managed. (b) circular link definitions
A preferred embodiment of the CocoNavigator API, or an associated computer program module, is configured to permit a user to create, access, support and correctly manage circular data object links. In a navigation model, a circular link may be defined as occurring when a data object is directly or indirectly linked to itself as part of a CDOG. Such relationships can be created, accessed, supported and correctly managed via the CocoNavigator API.
(c) bi-directional and oriented links
A preferred embodiment of the CocoNavigator API, or an associated computer program module, is configured to permit a user to create, access, support and correctly manage links between data objects as either a bi-directional link or as an oriented link. In this embodiment links between data objects are usually bi-directional links and can be navigated back and forth as an un-oriented navigational model of the CDOG model. With such a bi-directional link feature activated, any object in the navigation model in a given CDOG model can be used as a navigation entry point. In an oriented link navigation model, the link may be set as an oriented link accessible from a single direction. Thus, changes must be made from top down or from bottom up on a relationship tree representation of the navigation model, and some actions may need to originate from a pre-set node of the relationship tree. In this embodiment, such types of links can be created, accessed, supported and correctly managed via the CocoNavigator API.
(d) dynamic link proxy properties
In a preferred embodiment, the CocoNavigator API, or an associated computer program module, is configured to permit a user to populate any object property (e.g. , public field or a getter/setter pair) having its type declared as an object class with special dynamic proxies that can monitor and update the state of a relationship link. Examples of such types of object classes are thought.Cocobase.navapi.LinkObjProxy of CocoBase and the Sun Microsystems java class, java.util.Vector. Bi- directional or single directional object references can be consistently maintained in this manner, or by other similar logical mechanisms.
(e) automatic synchronization of object properties
In a preferred embodiment, the CocoNavigator API, or an associated computer program module, can be configured to automatically merge a data object and its properties into a CDOG navigation model representation when the class of object being navigated (being created, accessed, supported or maintained) has a property (e.g. , a field or a getter/setter pair) with a name matching the name of a corresponding link as defined in the navigation model.
(f) pure object models
In a preferred embodiment, the CocoNavigator API, or an associated computer program module, can be configured to include a data object as a relationship link to another data object in a navigation model without the need to declare fields and properties for the data object. Such links should be limited however to cases where no computer code dependency will exist between the java classes that will be associated with such linked data objects of the navigation model. Thus, such a navigation model can be a pure abstraction, and more reusable than just a populated version or single hypothetical instance of the abstraction.
(g) customized link visitors
In a preferred embodiment, the CocoNavigator API, or an associated computer program module, can provide an interface which can be configured to permit a visitor object to use this interface to visit (e.g. , access or change) a data object that is part of a CDOG navigation model. In conjunction with CocoBase, an example of CocoNavigator API implementing this concept might using a LinkVisitor object (class). Other similar classes may be defined for this puφose. The visitor interface provides a way for a user to customize and adapt the software, and thereby allows a user to extend the functionality of the CocoNavigator API, or the functionality of an associated computer program module, to provide a desired customizable behavior in their CDOG navigation model.
(h) distributed environments
In a preferred embodiment, the CocoNavigator API, or an associated computer program module, can be configured to operate as a tool to create, access, support and correctly manage a CDOG navigation model in a server environment (e.g., in an EJB container) and to persist any changes to the CDOG navigation model when a navigation model is distributed across a local network or when the navigation model involves a distributed network (e.g., a navigation model distributed across internet connections). In one aspect, on the server side of the network, a CDO or a CDOG model of any complexity sent by clients (e.g., serialized copies) across a local network, or across a distributed network, can be correctly merged into a CDOG model by the CocoNavigator API, or by an associated computer program module. Additionally, the CocoNavigator API, or an associated computer program module, can be configured to send a CDO or CDOG model to a client along with link proxies serialized with parts of the CDO or CDOG model that are being monitored by such link proxies. By sending the CDO or CDOG model copy along with such link proxies and associated parts of the CDOG or CDOG model to a client, dynamic link proxies (described above in (d)) can be used by the client side. Accordingly, a CDOG navigation model can be created, accessed, supported, managed and persisted over a distributed network.
(i) group loading or lazy loading of links
In a preferred embodiment, the CocoNavigator API, or an associated computer program module, can be configured to monitor some or all of the data objects (and associated relationship definitions) participating in links of a CDOG navigation model. In a more preferred embodiment, the data objects (and associated relationship definitions) participating in links of a CDOG navigation model can be loaded as they are needed (lazy loading) from a persistent data source or from another type of information repository. This lazy loading feature can permit a very large CDOG navigation model to be loaded in a per-link basis as needed. In a more preferred embodiment, the lazy loading feature can be configured to prevent a link from being loaded twice and can be configured to detect cycles of related loads that have been previously loaded. Such configuration adaptability can be exploited to provide the more efficient use of the resources for a computer system or network or for a distributed computer network.
Some examples of preferred features that can be provided by the CocoNavigator API and its associated software, which are particularly enhanced when utilized with the currently existing CocoBase mapping tool, are as follows: (aa) CocoBase transactions
A preferred embodiment of the CocoNavigator API or an associated program module is configured to bind a data object or data object relationship of a CDOG navigation model with a CocoBase transaction. Such configurations may be utilized to optimize access to the database server and to enhance performance of the computer system, or systems, involved with the CDOG navigation model.
(bb) non-CBProp objects
The CocoNavigator API or an associated program module can be configured to automatically detect non-CBProp objects (objects with classes that do not implement the CocoBase interface known as the CBProp interface), and automatically create proxies in order to persist such objects as part of a CDOG navigation model.
(cc) virtual foreign key fields
The CocoNavigator API or an associated computer program module can be configured to use proxy classes of CocoBase, such as the CocoProxyM classes, when appropriate. Implementing proxy classes such as the CocoProxyM classes can provide a system for creating, accessing, supporting, properly maintaining and persisting virtual foreign key fields (i.e., foreign key fields do not need to be defined in the object class for Java programming implementations) by the CocoNavigator API, or by an associated computer program module.
(dd) transparent persistence
The CocoNavigator API or an associated computer program module can be configured to use a configurable network component capable of acquiring and persisting CDOGs through network APIs and thereby provide persistence transparently with respect to the applications that are using the CDOGs. In a preferred implementation, there is provided a software tool comprising the CocoNavigator API that is adapted for a local network or for a distributed network environment, wherein the software tool provides persistence in an object oriented language environment transparently by implementing a configurable network component capable of acquiring and persisting CDOGS. Such a concept may be referred to as transparent persistence in the context of this API, because persistence can be obtained without requiring reconfiguring of an existing CDOG model or software application in order to provide such persistence to a computer software application.
(ee) transparent persistence with automated APIs that may be further optionally utilized with a local or distributed implementations such as a session bean implementation
The CBFacade or other modules containing high level API's can be utilized that can function in place of the CocoNavigator API (or coordinate with it) to automate many of the transparent persistence functions. Such a software module or modules can be utilized in concert with a local or distributed implementation such as a session bean to provide an easier and quicker establishment of transparent persistence. The CBFacade can provide the functions as defined in (dd) and the session bean can provide a communication link between modules such as a transaction API and the navigation API (and/or with the CBFacade) to assure that transparent persistence occurrs as required. Such transparent persistence in the context of this API can be obtained without requiring reconfiguring of an existing CDOG model or software application in order to provide such persistence to a computer software application.
From the above description of features of the API, and the features of the CocoNavigator API programming routines described below, an object computer language programmer can produce an API having the functionality of the CocoNavigator API described herein. Essentially the CocoNavigator API has an at least one user access interface, at least one data source access interface and at least three main programming modules consisting of the following programming modules or routines:
I. A programming module or routine constructed to operate on a computer system and to provide the following features to a user or to a software program module of the computer system: a) a computer programming sub-routine or sub-module for obtaining from a member selected from the group consisting of a data source, an information repository, and an input device, sufficient information to construct a CDOG model containing one or more CDOGs, b) a computer programming sub-routine or sub-module for constructing and loading into the memory registers of the computer system a CDOG or a CDOG model representation definition from a data source or other repository, and c) a computer programming sub-routine or sub-module for sending a copy of some portion or all of the CDOG representation definition to a user or to a software program module on a local computer system or on a distributed network;
II. A programming module or routine constructed to operate on a computer system and to provide the following features to a user or to a software program module of the computer system: a) a computer programming sub-routine or sub-module for monitoring a user or a software program module on a computer system that has accessed or changed a portion of a CDOG or CDOG model, which is included in the CDOG, or CDOG model, representation definition of (I), above, and obtaining any changes to the CDOG or CDOG model, b) a computer programming sub-routine or sub-module for monitoring a user or a software program module on a computer system who has obtained a copy of any portion of the CDOG, or CDOG model, representation definition, and for obtaining a copy of any changes that the user might have made to any portion of the CDOG, or CDOG model, representation definition, and c) a computer programming sub-routine or sub-module for comparing a copy of a CDOG, CDOG model, or a representation definition of either the CDOG or CDOG model, to an original stored version of the CDOG, CDOG model, or an original stored representation definition for the CDOG or CDOG model, and for updating the original to incoφorate any changes to a CDOG or a representation definition that are made by the user or by a software program module; and
III. A programming module or routine constructed to operate on a computer system and to provide the following features to a user or software program module of the computer system: a) a computer programming sub-routine or sub-module for storing a new CDOG or CDOG model, or storing a definition of either the CDOG or CDOG model, in a data source or in another information repository, and b) a computer programming sub-routine or sub-module for persisting (saving to permanent storage) either a changed portion of an updated CDOG, an updated CDOG model, or an updated definition representation for either a CDOG or a CDOG model, to a data source or to another type of information repository.
In a more preferred embodiment, the CDOG API according to the invention, (a preferred embodiment is the CocoNavigator API) can be written with an interface that accesses and uses functionalities of the CocoBase mapping tool, associated programming routines, or associated class libraries. Both the object code and the source code of the CDOG API are contemplated as part of this invention.
In another preferred embodiment, the above described CDOG API can be accessed to create, maintain, access, navigate and persisting complex data objects as a CDOG model. In a particularly preferred aspect, the API can be accessed by a computer software program such as the CocoBase mapping tool, or by a computer software program module that is part of a software package including the API, to provide at least one action selected from the group consisting of creating, maintaining, accessing, navigating and persisting complex data objects as a CDOG model. In an even more preferred aspect, the present invention provides such an API as part of a software tool package having a feature or method for displaying or printing a graph or set of tables representing a CDOG or a CDOG model. In yet another preferred aspect, such a software tool package including the API provides an interface for editing a CDOG, a CDOG model, or for editing a representation definition for a CDOG or a CDOG model to provide a modification that implements a change to a CDOG, or to its definition.
As described above, a software component according to the invention that is capable of persisting all or a portion of a CDOG may be an Enteφrise Java Bean selected from the group consisting of Stateless, Stateful or even Entity Beans. CocoBase Enteφrise Beans (CBEBs) are a preferred embodiment of the invention and constitute a set of Enteφrise Java Beans build upon or accessing CocoBase Runtime and EJB APIs to provide persistence in a generic, efficient and transparent way. Distributed transparent persistence can be provided without the need for any object model changes or byte code modifications. CBEBs can be directly deployed on an EJB server with or without customized settings and are capable of persisting virtually any Java Object, any Java Object graph or any portion of the Object graph. The Java Objects of any complexity that are arbitrarily created by client applications can be persisted, and the corresponding object classes can be properly mapped to a CocoBase repository or other object repository such as a UML XMI repository. Copies of the Java Object, any portion of an Object Graph, or all of an Object Graph can be automatically reconciled and the changes can be persisted to a storage repository.
The CocoBase Navigation API maps database foreign key -primary key relationships to object references. The relationship maps (sometimes referred to herein as navigation models), like the database maps, are stored in a special CocoBase repository, or may be converted into an XML file (or files) and stored in a stand-alone file or directory. The Navigation API supports 1 to 1, 1 to M, and M to M links in both the object and relational spaces. For M to M relationships, an associative table and a corresponding associative map are required, since relational databases do not directly support M to M relationships.
A navigation model must be created, or properly reference, before CocoBase links can be defined. A navigation model is a namespace used to categorize and store a set of link definitions. Generally, a single navigation model is sufficient for simple applications. Multiple navigation models are useful if an application switches between several relationship configurations. This allows different views of complex object data for the same set of underlying database tables. Having relationship mapping separated from table mapping is unique to CocoBase. Since maps can be used with multiple link models, it provides reusability at the mapping level.
Below is an example of how a client application on an EJB Server could connect to and use at least on CBEB to provide transparent persistence, in a local non- distributed environment.
Example 1
II Set up the connection class
CBFacade cbf = CBFacade.create("thought.CocoBase.CBFacadeLocal");
Properties props = new Properties(); props.put("cocosource.name",thought.CocoBase.CocoPowderPlugin20); props.put("cocosource.jdbcdriver","oracle.jdbc.driver.OracleDriver"); props.put("cocosource.ur ',"jdbc:cocoprop=jndiurl=java:comp/env/jdbc/sfcmbh ome"); props.put("cocosource.user","SCOTT"); props.put("cocosource.password","TIGER"); props.put("cocosource.navmodel","CompanyExample"); cbf.connect(props);// create a complex object having myObj as the root of the tree
// create an example object
My Object myObj = new MyObject(); myObj .setSomeField(someNalue); // now ask the Facade to load the object that matches the set fields (QBE) myObj = cbf.load(myObj);
// create an example object myObj.setSomeOtherField(someOtherNalue);
// now ask the CBFacade to save the changed values cbf. save(myObj);
// do some more changes to myComplexObject and save it again
cbf. save(myObj ) ;
Implemention of Examples 2-4, below, collectively provide persistence via a session bean as described generally by the following text.
The CBSession EJB
The CBSession EJB is a Stateful Session Bean that works as an abstraction layer for CocoBase runtime classes. It provides generic transparent persistence to Java objects of any complexity in a simple yet elegant way. It is designed to run in any Java Application Server, thus combining CocoBase transparent object persistence capabilities with most features provided by such servers, such as transaction management, security, resource pooling and so forth.
The CBSession bean is very simple and easy to use. Here is an illustration of how the session bean of Examples 2-4, below might be implemented and used:
Context ic = new InitialContext(...); Object ref = ic.lookup("CBSession"); CBSessionHome home = (CBSessionHome) PortableRemoteObject.narrow (ref,CBSessionHome.class);
String cocourl = "CBSession;cocorep=corιfigresource:/resources/MyConfϊgFile.properties:cocoprop=pri marykey.lookup=false,dynamic.queryingHTue,jndiurl=java:comp/env/jdbc/demoPoor'
// connects to a CBSession CBSession cbSession = null; ry { cbSession = home.create(cocourl,"MyNavModel",null); cbSession.setDebugLevel(l ); } catch (Exception e) {
System.out.println("Could not open CBSession due to " + e); return;
}
MyComplexObject obj = new MyComplexObject();
// populate values for querying obj.setValues(...);
// load object graph obj = (MyComplexObject) cbSession.load(obj,"MyMap");
// do some changes to obj graph
// save changes cbSession.save(obj,"MyMapM);
See CBSession interface for more details. Deploying the CBSession bean
Requirements:
- coco_home/classes and coco_home/demos must be in your App Server classpath.
- Ant 1.2 or later must be installed in order to compile/regenerate deployable jar files.
The Ant script build.xml will generate a deployable jar file with the CBSession bean for a particular server. Make sure the entry in the beginning of the build.xml file has the entry
<property name- 'cocohome" value="c:/thought/cocodemo3tier31 " /> correctly specified.
Targets currently defined include WebLogic 6.1, JBoss 2.4 and a generic jar file. Each subdirectory corresponds to a server, containing the standard descriptor and proprietary descriptors for that server. These descriptors can be modified in case it is required to do so.
For example, the jar file for JBoss can be generated as follows: os-prompt> ant jboss
See build.xml for available targets.
IMPORTANT: In order to have CBSession working for a particular application model, all the required java classes and resources (i.e. the map pre-load configuration properties file, the navigation model properties file) must be in the classpath (for example, these classes and resources could be copied to the coco_home/demos/resources directory, provided this directory is included in the app server classpath). Another alternative would be to add all needed classes and resources to the CBSession bean jar file. This can be done simply by copying these classes and resources to the directory corresponding to the target server and running the ant script again. For example, for JBoss, the following directory structure would generate ajar file with all classes and resources: cbsession
jboss ejb-jar.xml jboss.xml resources
MyConfigFile.properties MyNavModel.properties my app package
AppClassl. class AppClass2.class AppClass3. class
Examples 2-4, source code for CBSession Bean and its use are as follows:
Example 2
Source Code File Name = CBSession.java
package thought.CocoBase.ejbs.cbsession;
import j ava.rmi.RemoteException; import javax.ejb.EJBObject;
/**
* CBSession remote interface * <p>
* Copyright (c) 2001 THOUGHT Inc. All Rights Reserved.
* @author Alexandre Jonatan Martins
* ©version 0.9, August 2001 */ public interface CBSession extends EJBObject {
/**
* Invokes <code>load(Object,String)</code> sending
* <code>object.getClass().getName()</code> as the <code>mapName</code>
* @param obj the example object
* @return the loaded object */ public Object load(Object obj) throws RemoteException;
/* *
* Loads an object from the database
* @param obj the <i>example</i> object
* @param mapName the map name corresponding to the class of obj
* @return the loaded object */ public Object load(Object obj, String mapName) throws RemoteException;
/**
* Invokes <code>save(Object,String)</code> sending
* <code>object.getClass().getName()</code> as the <code>mapName</code>.
* @param obj the example object */ public void save(Object obj) throws RemoteException;
/* *
* Saves an object to the database
* @param obj the <i>example</i> object * @param mapName the map name corresponding to the class of obj
* @return the loaded object */ public void save(Object obj, String mapName) throws RemoteException;
/**
* Invokes <code>delete(Object,String)</code> sending
* <code>object.getClass().gefName()</code> as the <code>mapName</code>.
* @param obj the example object */ public void delete(Object obj) throws RemoteException;
/**
* Deletes an object from the database
* @param obj the <i>example</i> object
* @param mapName the map name corresponding to the class of obj */ public void delete(Object obj, String mapName) throws RemoteException;
/**
* Returns app server session debug level
* @return <code>true</code> if debug is on; <code>false</code> otherwise
*/ public int getDebugLevel() throws RemoteException;
/**
* Sets app server session debug level as follows:
* <p><code><pre> * 1 - prints basic session response
* 2 - prints navigation info + level 1 info
* 3 - prints detailed navigation info + level 2 info
* 4 - prints cocobase transaction info + level 3 info
* 5 - prints cocobase driver and jdbc info + level 4 info
* </pre></code></p>
* @param debug the debug level
* @param mapName the map name corresponding to the class of obj */ public void setDebugLevel(int level) throws RemoteException;
Example 3
Source Code File Name = CBSessionHome.java
package thought.CocoBase.ejbs. obsession;
import j ava.rmi.RemoteException; import javax.ejb.CreateException; import javax.ejb.EJBHome;
import j ava.util.Properties;
/**
* CBSession home interface
* <p>
* Copyright (c) 2001 THOUGHT Inc. All Rights Reserved.
* @author Alexandre Jonatan Martins
* @version 0.9, August 2001 */ public interface CBSessionHorne extends EJBHome { * Creates a CBSession. Properties will be read from the evironment entries in
* the ejb descriptor. The following properties are recognized:
* <p><code><pre>
* cocosource.url = cocobase_connection_url_string
* cocosource.name = cocobase_driver_name_string
* cocosource.user = user_name_string
* cocosource.password = user_password_string
* cocosource.autoclose = "true" | "false"
* cocosource.autotrans = "true" | "false"
* cocosource.navmodel = navigation_model_string
* </pre></code></p>
*/ public CBSession create() throws RemoteException, CreateException;
/**
* Creates a CBSession. The behavior of the session data source can be customized by
* a properties object containing specific configuration details. The following
* properties are recognized:
* <p><code><pre>
* cocosource.name = cocobase_driver_name_string
* cocosource.user = user_name_string
* cocosource.password = user_password_string
* cocosource.autoclose = "true" | "false"
* cocosource.autotrans = "true" | "false"
* </prex/code></p>
* @param cbUrl the CocoBase connection url * @param navModel the name of the navigation model (if not provided, uses default navigation model)
* @param props configuration properties */ public CBSession create(String cbUrl, String navModel, Properties props) throws RemoteException, CreateException;
}
Example 4
Source Code File Name = CBSessionBean.java
package thought.CocoBase.ejbs. obsession;
import j ava.util.Enumeration; import java. util.Properties; import java.rmi.RemoteException; import javax.ejb.CreateException; import j avax.naming.InitialContext; import javax.naming.Context; import javax.ejb.SessionBean; import javax.ejb.RemoveException; import javax.ejb.SessionContext; import thoughtCocoBase.CocoDriver; import thought.CocoBase.CocoProxyM; import thought.CocoBase.CBProp; import thoughtCocoBase.CocoDriverlnterface; import thought.CocoBase.CocoFactorylnterface; import thought.CocoBase.CocoFactoryDefinelnterface; import thought.CocoBase.navapi.Navigator; import thought.CocoBase.navapi.LinkI-oaderInterface; * This is the ejb bean class for the CBSession ejb stateful session bean * <p>
* Copyright (c) 2001 THOUGHT Inc. All Rights Reserved. *
* @author Alexandre Jonatan Martins
* @version 0.91, January 2002 */ public class CBSessionBean implements SessionBean {
/**
* This flag determines if we auto close the db connection after
* every database related call in the bean. This should typically
* be set to true since any EJB servers require this for connection
* pooling and scaling management. If this is set to false, the
* connection will only be closed on ejbPassivate, so each bean
* will retain an open connection to the database while it is active. */ protected boolean autoCloseFlag = true;
/**
* This CocoBase Transaction object is used in the bean exclusively
* to provide update buffering. It is generated only when
* transaction management is requested during code generation.
* The puφose of this object is to track changes to non-bean
* instances, and commit those changes in the ejbStore method.
* It leaves all 'actual' transaction issues to the Container as per
* the EJB specification via its 'commitconnection=false' flag. */ protected thought.CocoBase.Transaction cocoTxn = null;
/**
* Info for Database, Connections managed by the Container and OTM. */ protected CocoDriverlnterface dataSource = null;
/#*
* the navigator that manages the graph of objects */ protected transient Navigator nav = null;
/**
* the reference to the session context */ protected SessionContext sessionContext;
/**
* the reference to the initial context */ protected transient Context initialContext = null;
private boolean _DEBUG = false; private int debugLevel = 0;
private LinkLoaderlnterface localLoader;
public CBSessionBeanO { if _DEBUG) System.out.println("CBSession(" +this.hashCode() + ") - contractor invoked");
}
/* == = remote interface =====*/
public Object load(Object obj) throws RemoteException { return this.load(obj,obj .getClass().getName()); }
public Object load(Object obj, String mapName) throws RemoteException { if (JDEBUG) System.out.println("CBSession(" +this.hashCode() + ") - load invoked; obj = " + obj + " map = " + mapName); try { this.opeiiDataSource(); return this.loadLinks(obj, mapName); } catch (Exception e) { throw new RemoteException("CBSession Error: load failed with exception " + e,e);
} finally { if (this.autoCloseFlag) { this.closeDataSource(); } } }
public void save(Object obj) throws RemoteException { this.save(obj,obj.getClass().getName());
}
public void save(Object obj, String mapName) throws RemoteException
{ if _DEBUG) System.out.println("CBSession(" +this.hashCode() + ") - save invoked; obj = " + obj + " map = " + mapName); try { this.openDataSourceO; if (this.nav.findObject(obj,mapName) == null) {
// we make sure to have the links loaded for the state instance this.loadLinks(obj ,mapName);
} this.nav.updateAllLinks(obj,mapName,true); // update all links cocoTxn.commit(); // this should commit changes done to the navigator instance!
} catch (Exception e) { throw new RemoteException("CBSession Error: save failed with exception " + e,e);
} finally { if (this.autoCloseFlag) { this.closeDataSourceO;
} } }
public void delete(Object obj) throws RemoteException { this. delete(obj ,obj . getClass() .getName()) ;
}
public void delete(Object obj, String mapName) throws RemoteException { if (JDEBUG) System.out.println("CBSession(" +this.hashCode() + ") - delete invoked; obj = " + obj + " map = " + mapName); try { this.openDataSourceO; if (this. nav.fmdObject(obj, mapName) = null) {
// we make sure to have the links loaded for the state instance this .loadLinks(obj ,mapName) ;
} this.nav.deleteAULinks(obj,mapName,true); // delete all links cocoTxn.commitO; // this should commit changes done to the navigator instance!
} catch (Exception e) { throw new RemoteException(" CBSession Error: delete failed with exception " + e,e);
} finally { if (this.autoCloseFlag) { this.closeDataSourceO;
} } }
public void setDebugLevel(int level) throws RemoteException { this.debugLevel = level; this._DEBUG = this.debugLevel > 0; if (this.nav != null) { this.nav.setDebugLevel(this.debugLevel - 1);
} if (this.cocoTxn != null) { this.cocoTxn.setDebug(this.debugLevel >= 4);
} if(this.dataSource != null) { this.dataSource.setDebug(this.debugLevel >= 5);
} }
public int getDebugLevel() throws RemoteException { return this.debugLevel;
} : private section ===== */
/**
* Loads the state instance from the database and its links.
* Assumes there is a valid connection between the data source
* and the navigator. */ private Object loadLinks(Object obj, String mapName) { if CDEBUG) System.out.println("CBSession(" +this.hashCode() + ") - loading links...");
// load the matching instance from the datasource Object navlnstance = this.nav.findObject(obj,mapName); if (navlnstance != null) { // if obj has a corresponding instace in the graph if CDEBUG) System.out.println("CBSession(" +this.hashCode() + ") - instance graph already loaded; returning loaded instance"); return navlnstance; // return instance in the graph
}
Object dbobj = null; if (obj instanceof CBProp) { dbobj = this. dataSource.select(obj, mapName); } else { dbobj = this.dataSource.select(new CocoProxyM(obj),mapName);
} if (dbobj = null) { // object is not in the database,; return null; if (_DEBUG) System.out.println("CBSession(" +this.hashCode() + ") - object is not in the database; returning null"); return null;
}
Object loadedObj = this.nav.loadAllLinks(dbobj,mapName,true);
// load all links if (loadedObj != null) { // root is not automatically bound to transaction this.cocoTxn.bind(loadedObj); // so we have to explicitly bind it
} if (loadedObj instanceof CocoProxyM) { // if loaded instance is wrapped by a proxy loadedObj = ((CocoProxyM)loadedObj).getObject(); // unwrap it
} if (_DEBUG) System.out.ρrintln("CBSession(" +this.hashCode() + ") - links loaded!"); return loadedObj ; // and return loaded instance }
/**
* This method checks and closes the non-null dataSource - database
* connection and sets the dataSource variable to null. */ private void closeDataSourceQ { try {
// Make sure connection isn't null before closing. if(dataSource != null) { if (JDEBUG) System.out.println("CBSession(" +this.hashCode() + ") - data source closed"); this.dataSource.close();
} } catch (Exception e) {
} this.dataSource = null;
} /**
* Establishes a connection to our datasource if one doesn't exist,
* otherwise a new instance is created!
* @exception RemoteException Thrown if the instance could not perform
* the function requested by the container because of a
* system-level error. */ private void openDataSource() throws RemoteException{ if (this.dataSource == null) {
// we may need to get properties from the environment, so let's get a handle to the Context
Context envContext = null; try { this.initialContext = new InitialContext(); } catch (Exception re) { throw new RemoteException("CBSession.openDataSource: cannot get InitialContext", re);
} fry { envContext = (Context)initialContext.lookup("java:comp/env");
} catch (Exception re) { throw new RemoteException("CBSession.openDataSource: cannot get environment context", re);
} try { if (this.prop_url == null) { this.prop_url = (String)envContext.lookup("cocosource.url");
} } catch (Exception re) { throw new RemoteException("CBSession.openDataSource: cannot get cocosource.url from context", re);
} if (this.prop_url == null || this.prop_url.length() = 0) { throw new RemoteException("CBSession.openDataSource: cocobase url missing!\n\tPlease specify the environment entry cocosource.url in your descriptor");
}
fry { if (this.prop_driver = null) { this.prop_driver = (String)envContext.lookup("cocosource.name"); if (this.prop_driver = null || this.prop_driver.length() == 0) { this.prop_driver = "thought. CocoBase. CocoPowderPlugin20";
}
} } catch (Exception re) { this.prop_driver = "thought.CocoBase.CocoPowderPlugin20"; if C_DEBUG) {
System.out.println("CBSession.openDataSource: cannot get cocosource.name from context due to " + re);
System. out.println(" Assuming cocosource.name = " + this.prop_driver);
} } try { if (tbis.prop_user = null) { this.prop_user = (String)envContext.lookup("cocosource.user"); if (this.prop_user = null || this.prop_user.length() == 0) { this.prop_user = "";
} } } catch (Exception re) { this.prop_user = ""; if _DEBUG) {
System.out.println("CBSession.openDataSource: cannot get cocosource.user from context due to " + re);
System.out.println("Assuming cocosource.user = " + this.prop_user);
} }
try { if (this.prop_password == null) { this.prop_password = (String)envContext.lookup("cocosource.password"); if (this. prop jpassword == null || this.prop_password.length() == 0) { this.prop_password = "";
} } } catch (Exception re) { this.prop_password = ""; if .DEBUG) {
System.out.println("CBSession.openDataSource: cannot get cocosource.password from context due to " + re);
System. out.println(" Assuming cocosource.password = " + this.prop_password);
} }
try { if (this.prop_autoTransactions == null) { this.prop_autoTransactions = (String)envContext.lookup("cocosource.autotrans"); if (this.prop_autoTransactions == null || tlιis.prop_autoTransactions.length() = 0) { this.prop_autoTransactions = "false";
} } } catch (Exception re) { this.prop_autoTransactions = "false"; if (_DEBUG) {
System.out.println("CBSession.openDataSource: cannot get cocosource.autotrans from context due to " + re);
System.out.println(" Assuming cocosource.autotrans = " + this.prop_autoTransactions);
} }
try { if(this.prop_autoClose = null) { this.prop_autoClose = (String)envContext.lookup("cocosource.autoclose"); if (this.prop_autoClose == null || this.prop_autoClose.length() == 0) { this.prop_autoClose = "true"; } } } catch (Exception re) { this.prop__autoClose = "true"; if (_DEBUG) {
System.out.println("CBSession.openDataSource: cannot get cocosource.autoclose from context due to " + re);
System.out.println(" Assuming cocosource.autoclose = " + this.prop_autoClose);
} }
try { if (this.propjtiavModel = null) { this.prop_navModel = (String)envContext.lookup("cocosource.navmodel"); if (this.prop_navModel == null || this.prop_navModel.length() == 0) { this.prop_navModel = "";
} } } catch (Exception re) { this.prop_navModel = ""; if C.DEBUG) { System.out.println("CBSession.openDataSource: cannot get cocosource.navmodel from context due to " + re);
System.out.println("Assuming cocosource.navmodel = " + this.prop_navModel);
}
} try { if CJDEBUG) {
System.out.println(" CB S ession("
+this.hashCode() + ") - connecting to data source...");
System.out.println("\tProperty settings: ");
System.out.println("\tcocosource.name
= " + this.prop_driver); System.out.println("\tcocosource.url =
" + this.prop_url); System.out.println("\tcocosource.user: =
" + this.prop_user); System.out.println("\tcocosource.password
= " + this.prop__password); System.out.println("\tcocosource.autotrans
= " + this.prop_autoTransactions); System.out.println("\tcocosource.autoclose
= " + this.prop_autoClose);
System.out.println("\tcocosource.navmodel = " + this.propjtiavModel);
} this.dataSource = CocoDriver.getCocoDriver(this.prop_driver,"",tlιis.prop_url5this.prop_user,this.prop_p assword); if(this.dataSource instanceof thought.CocoBase.CocoPowder) { thought.CocoBase.CocoPowder.setSilentFlag(true);
} this.dataSource.setThrowExceptions(true); this.dataSource.setDebug(this.debugLevel >= 5); this.dataSource.setThis(this);
CocoFactorylnterface proxyFactory = new
CocoFactoryInterface() { public Object getInstance(Object src,
Object props, String objectName) { ry {
Object myObj = null;
// We want to handle proxy objects with special care here. if(src instanceof thought.CocoBase.CocoProxyM) {
// Create a new instance of proxy class myObj = src.getClass().newInstance();
// Create a new instance of contained class
Object newContainedObject = ((thought.CocoBase.CocoProxyM)src).getObject().getClass0.newInstance();
// Set myObj to contain newContainedObject
((thought.CocoBase.CocoProxyM)myObj).setObject(newContainedObje ct);
} else { // Create an instance of non-proxy, CBProp class myObj = src . getClas s() . ne wlnstanceO ;
}
// Populate the objects attributes if(myObj instanceof
CBProp)
((CBProp)myObj).setPropObjectData((Properties)props);
// Return instance of
CBProp class return myObj; } catch (Exception e) { e.printStackTrace();
} return null;
}
};
// comment out this line if a proxy factory is not required
((CocoFactoryDefineInterface)this.dataSource).setFactory(proxyFactory
); this.dataSource.connect(); if(this.prop_autoClose != null && this.prop_autoClose.equalsIgnoreCase("false")) this.autoCloseFlag = false; else this.autoCloseFlag = true; if(this.prop_autoTransactions != null && this.prop_autoTransactions.equalsIgnoreCase("true")) { tMs.dataSomce.setAutoCommit(true); if fJDEBUG) System.out.println("CBSession(" +this.hashCode() + ") - transactions disabled; presuming non-OTS compatible source!");
}
} catch (Exception e) { throw new RemoteException("CBSession.openDataSource: cannot connect to " + this.prop_driver, e);
} } if (this.cocoTxn = null) { if (JDEBUG) System.out.println("CBSession(" +this.hashCode() + ") - creating CocoBase transaction"); this.cocoTxn = new thought.CocoBase.Transaction(false);
Properties cocoTransProps = new Properties(); cocoTransProps.put("preserveCommit'V'true"); cocoTransProps.put("commitconnection", "false"); cocoTransProps.put("throwExceptions","true"); this.cocoTxn.setProperties(cocoTransProps); this.cocoTxn.setDebug(this.debugLevel >= 4); this.cocoTxn.beginO;
} cocoTxn.setDatabase(dataSource);
if (this.nav = null) { if .DEBUG) System.out.println("CBSession(" +this.hashCode() + ") - creating CocoBase navigator"); Properties navProps = new Properties(); navProps.setProperty("useCurrentTransaction", "false"); navProps.setProperty("alwaysCreateProxies","true"); this.nav.setDebugLevel(this.debugLevel - 1); this.nav = new Navigator(this.prop_navModel); this.nav.setClassForLoader(this.getClass()); this.nav.setProperties(navProps);
} this.nav.setConnection(this.dataSource); this .nav. setTransaction(this . cocoTxn);
// this is where we set it up for distributed lazy load
this.nav.setLiιιkLoader((CBSession)this.sessionContext.getEJBObject())
}
// this is for distributed lazy loading only public Object loadLink(Object object, String mapName, String linkName) throws RemoteException { if (JDEBUG) System.out.println("CBSession(" +this.hashCode() + ") - loadLink called - distributed lazy load in use!"); try { this.openDataSourceO; return tlύs.nav.loadLink(object,mapName,linl-iName,true,true,true);
} catch (Exception e) { throw new RemoteException("CBSession Error: loadlink failed with exception " + e,e);
} finally { if (this.autoCloseFlag) { this.closeDataSourceO;
} }
}
/*======== javax.ejb.EntityBean implementation
public void ejbCreate() throws RemoteException, CreateException { if _DEBUG) System.out.println("CBSession(" +this.hashCode() + ") - session created. Properties will be read from descriptor."); }
public void ejbCreate(String cbUrl, String navModel, Properties props) throws RemoteException, CreateException { if .DEBUG) System.out.println("CBSession(" +this.hashCode() + ") - session created. Setting properties..."); this.prop_url = cbUrl; this.prop_navModel = navModel; if (props != null) {
Enumeration keys = props.keys(); while (keys.hasMoreElements()) {
Object key = keys.nextElement();
Object value = props. get(key); if ("cocosource.name". equals(key)) { this.prop_driver = (String) value; } else if ("cocosource.user". equals(key)) { this.prop_user = (String)value; } else if ("cocosource.password". equals(key)) { this.propjpassword = (String)value; } else if ("cocosource.autotrans".equals(key)) { this.prop_autoTransactions = (String)value;
} else if ("cocosource.autoclose". equals(key)) { this.prop_autoClose = (String)value; } } } }
public void ejbActivate() throws RemoteException { if _DEBUG) System.out.println("CBSession(" +this.hashCode() + ") - session activated");
}
public void setSessionContext(SessionContext context) throws RemoteException { if (JDEBUG) System.out.println("CBSession(" +this.hashCode() + ") - setting session context"); this.sessionContext = context; }
public void ejbPassivate() throws RemoteException {
//we close our connection closeDataSource(); this.nav = null; // we reset all navigation info so that it won't be serialized this.cocoTxn = null; // we do the same for the trasaction if (_DEBUG) System.out.println("CBSession(" +this.hashCode() + ") - session passivated");
}
public void ejbRemove() throws RemoteException { // we close our connection closeDataSourceO; if (_DEBUG) System.out.println("CBSession(" +this.hashCode() + ") - session removed");
}
// private properties
// cocosource.autoclose = "true" | "false" private String prop_autoClose = null;
// cocosource.autotrans = "true" | "false" private String prop_autoTransactions = null;
// cocosource.name = coco_driver_name private String prop_driver = "thought.CocoBase.CocoPowderPlugin20";
// cocosource.navmodel = cocobase_navigation_model private String prop_navModel = null;
// cocosource.password = "true" | "false" private String prop jpassword = null;
// cocosource.url = cocobase_url private String prop_url = null;
// cocosource.user = "true" | "false" private String prop_user = null;
The CBFacadeRemote
The CBFacadeRemote is a Wrapper API that works with the CBSession EJB (described in detail previously) It provides a high level API that simplifies the task of remote programming and distributed usage in a very elegant API. It is compatible with an interface which makes it possible to swap out Local and Distributed implementations at will, and at runtime. It is designed to run in any Java Application Server, thus combining CocoBase transparent object persistence capabilities with most features provided by such servers, such as transaction management, security, resource pooling and so forth. Example 4
Source Code File Name = CBFacadeRemote.java package thought.CocoBase;
import java.util.*; import java.rmi.*; import j avax.naming. * ; import j avax.transaction. * ; import j avax.rmi. * ; import thought.CocoBase.ejbs. obsession.*;
/**
* <H3>This CBFacade implementation uses a Session bean and runs within an J2EE server.</H3>
* This is an example of a facade implementor that accessed the runtime through the
* generic session bean. * <p>
* Copyright (c) 2002 THOUGHT Inc. All Rights Reserved.
* @author Alexandre Jonatan Martins
* @author Ward Mullins
* @version 0.9, June 2002 */ public class CBFacadeRemote extends CBFacade {
private Context ic = null; private CBSession cbSession = null; private UserTransaction tx = null; private String txjndiname = null; private Properties connProps = new Properties(); /**
* Default constructor - this is required for all CBFacade
* implementations - but generally is called by CBFacade
* itself, and not directly by the user. */ public CBFacadeRemote() { }
/**
* Opens a connection to the runtime. The set of valid properties depends on the
* implementor subclasses, but at least the following properties are expected:
* <p><code><pre>
* cocosource.url = cocobase_connection_url_string
* cocosource.name = cocobase_driver_name_string
* cocosource.jdbcdriver = jdbc_driver_name_string
* cocosource.user = user_name_string
* cocosource.password = user_password_string
* cocosource.navmodel = navigation j-nodel_string
* cocosource.autoclose = "true" | "false"
* cocosource.autotrans = "true" | "false"
* cocosource.autoidentity = "true" | "false"
* cocosource.factory = factory_name_string
* cocosource.jndiname = cbsessionjndi_lookup_string
* cocosource.txjndiname = user_transactionJndi_lookup_string
* </prex/code></p> */ public void connect(Properties connectionProps) throws CBFacadeException { this.connProps = connectionProps; try { this.ic = new InitialContext(System.getProperties());
} catch (Exception e) { throw new CBFacadeException(" Cannot get initial context",e); } try {
String jndiName = "CBSession"; f (connectionProps != null) { jndiName = (String) connectionProps. get("cocosource.jndiname"); if (jndiName == null) { jndiName = "CBSession";
} this.txjndiname = (String) connectionProps. get("cocosource.txjndiname"); if (this.txjndiname == null) { this.txjndiname = "java:comp/env/UserTransaction";
}
}
Object ref = this.ic.lookuptjndiName);
CBSessionHome home = (CBSessionHome) PortableRemoteObject.narrow (ref,CBSessionHome.class); this.cbSession = home.create(null,null,connectionProps); } catch (Exception e) { throw new CBFacadeException(" Cannot connect to session bean",e);
} }
/**
* Close the connection to the runtime and releases all runtime resources. */ public void close() { if (this.cbSession != null) { try { this.cbSession.remove(); } catch (Exception ignore) {}
} this.cbSession = null; this.ic = null; this.tx = null; }
/**
* Starts a new transaction in the runtime. The new transaction will buffer
* the changes until commit() is called. This method won't have any effect if
* a transaction has already been started. */ public void beginTransaction() throws CBFacadeException { if (this.cbSession = null) throw new CBFacadeException("Cannot connect - session is invalid. Use reset() or connect() to validate the session.",null,CBFacadeException.CB_INNALIDSTATE_ERROR); this.tx = null; try { this.tx = (UserTransaction) this.ic.lookup(this.txjndiname); } catch (Exception ignore) {}
// fail over code: switch to the other possible names for a user transaction if the lookup failed
if (this.tx == null) { try { this.tx = (UserTransaction) this.ic.lookup("java:comp/UserTransaction"); this.txjndiname = "java:comp/UserTransaction"; } catch (Exception ignore) {}
} if (this.tx = null) { try { this.tx = (UserTransaction) this.ic.lookupC'javax.transaction.UserTransaction"); this.txjndiname = "j avax.transaction.UserTransaction" ;
} catch (Exception ignore) {}
}
if (this.tx == null) { try { this.tx = (UserTransaction) this.ic.lookup("java:comp/env/UserTransaction"); this.txjndiname = "java:comp/env/UserTransaction"; } catch (Exception e) { e.printStackTrace(); throw new CBFacadeException("transaction management not supported: couldn't create user transaction", e);
} }
try { this.cbSession.startSessionSynchronizationO; this.tx.begin(); } catch (Exception e) { throw new CBFacadeException("cannot initiate client transaction" ,e); } }
/** * Commits the connection associated with the runtime. If a transaction has been started
* in the runtime by beginTransaction(), all buffered changes will also be committed and
* the transaction terminates. */ public void commitO throws CBFacadeException { if (this.cbSession = null) throw new CBFacadeException("Cannot connect - session is invalid. Use reset() or connect() to validate the session.",null,CBFacadeExceρtion.CB_INVALIDSTATE_ERROR); if (this.tx != null) { try { this.tx.commitO; } catch (Exception e) { this.close(); throw new CBFacadeException("Cannot commit changes; session invalidated",e,CBFacadeException.CB_INNALIDSTATE_ERROR);
} finally { this.tx = null;
} } }
/* *
* Undo all changes not yet committed. If a transaction has been started in the
* runtime by beginTransaction(), all buffered changes will be discarded and the
* transaction terminates. */ public void rollback() throws CBFacadeException { if (this.tx != null) { try { this.tx.rollbackO; } catch (Exception ignore) {}
} this.tx = null; this.reset(); }
/**
* Inserts an object. This method should be more efficient than <code>save</code> in cases
* where the object is know to be new as it is not supposed to verify the current
* persistence state for that object. However, it may result on duplicate instances being
* inserted or unique constraint violations when a copy of the object was saved earlier.
* @param obj the <i>example</i> object
* @param mapName the map name corresponding to the class of obj */ public void insert(Object obj, String mapName) throws CBFacadeException { if (this.cbSession = null) throw new CBFacadeException("Cannot connect - session is invalid. Use reset() or connect() to validate the session.",null,CBFacadeException.CB_INNALIDSTATE_ERROR); try { this.cbSession.insert(obj,mapΝame); } catch (RemoteException e) { this.closeO; throw new CBFacadeException("insert() failed; session invalidated",e,CBFacadeException.CB_INNALIDSTATE_ERROR);
} }
/**
* Loads objects that matches the ql query passed in. * @param String the <i>query</i> string
* @param params the parameters which get bound into the query
* @return the loaded objects */ public Nector executeQLQuery(String qlstring, Nector params) throws CBFacadeException { if (this.cbSession == null) throw new CBFacadeException("Cannot connect - session is invalid. Use reset() or connect() to validate the session.",null,CBFacadeException.CB_IΝNALIDSTATE_ERROR); try { return this.cbSession.executeQLQuery(qlstring,params); } catch (RemoteException e) { this.closeO; throw new CBFacadeException("load() failed; session invalidated",e,CBFacadeException.CB_IΝNALIDSTATE_ERROR); }
}
/**
* Loads an object that matches the example object passed in.
* @param obj the <i>example</i> object
* @param mapName the map name corresponding to the class of obj
* @return the loaded object */ public Object load(Object obj, String mapName) throws CBFacadeException { if (this.cbSession = null) throw new CBFacadeException(" Cannot connect - session is invalid. Use reset() or connect() to validate the session.",null,CBFacadeExceρtion.CB_IΝNALIDSTATE_ERROR); try { return this.cbSession.load(obj,mapΝame); } catch (RemoteException e) { this.closeO; throw new CBFacadeException("load() failed; session invalidated'',e,CBFacadeException.CB_INNALIDSTATE_ERROR); } }
/* *
* Loads an collection of objects that match the example object passed in.
* @param obj the <i>example</i> 'QBE' object
* @param mapName the map name corresponding to the class of obj
* @return the loaded objects */ public Nector loadAll(Object obj, String mapName) throws CBFacadeException { if (this.cbSession == null) throw new CBFacadeException(" Cannot connect - session is invalid. Use reset() or connect() to validate the session.",null,CBFacadeException.CB_IΝNALIDSTATE_ERROR); try { return this.cbSession.loadAll(obj ,mapΝame); } catch (RemoteException e) { this.closeO; throw new CBFacadeException("loadAll() failed; session invalidated",e,CBFacadeException.CB_INNALIDSTATE_ERROR);
} }
/**
* Saves an object.
* @param obj the <i>example</i> object
* @param mapName the map name corresponding to the class of obj */ public void save(Object obj, String mapName) throws CBFacadeException { if (this.cbSession = null) throw new CBFacadeException(" Cannot connect - session is invalid. Use resetO or connectO to validate the session.",null,CBFacadeException.CB_INNALIDSTATE_ERROR); try { this.cbSession.save(obj ,mapΝame); } catch (RemoteException e) { this.closeO; throw new CBFacadeException("save() failed; session invalidated" ,e,CBFacadeException.CB_INVALIDSTATE_ERROR);
} }
/**
* Deletes an object.
* @param obj the <i>example</i> object
* @param mapName the map name corresponding to the class of obj */ public void delete(Object obj, String mapName) throws CBFacadeException { if (this.cbSession == null) throw new CBFacadeException("Cannot connect - session is invalid. Use reset() or connect() to validate the session.",null,CBFacadeException.CB_rNNALIDSTATE_ERROR); try { this.cbSession.delete(obj,mapΝame); } catch (RemoteException e) { this.close(); throw new CBFacadeException("delete() failed; session invalidated",e,CBFacadeException.CB_INNALIDSTATE_ERROR);
} }
/**
* Sets debug level as follows: * <pXcode><pre>
* 1 - prints basic info
* 2 - prints navigation info + level 1 info
* 3 - prints detailed navigation info + level 2 info
* 4 - prints cocobase transaction info + level 3 info
* 5 - prints cocobase driver and jdbc info + level 4 info
* </pre></codex/p>
* @param debug the debug level */ public void setDebugLevel(int level) { try { this.cbSession.setDebugLevel(level); } catch (Exception e) { throw new RuntimeException("getDebugLevel() failed due to " + e + "; please reconnect using connect() or reset()"); }
/**
* Returns the debug level.
* @return the debug level */ public int getDebugLevel() { try { return this.cbSession.getDebugLevel(); } catch (Exception e) { throw new RuntimeException("getDebugLevel() failed due to " + e + "; please reconnect using connect() or reset()"); }
/** * Resets the connection to its initial state. Should be usually called
* when the runtime state is invalid due to a CBFacadeException */ public void reset() { boolean reconn = this.cbSession = null; if (i.reconn) { try { this.cbSession.reset(); } catch (Exception e) { reconn = true; }
} if (reconn) { this.closeO; try { this .connect(this. connProps) ; } catch (Exception e) { throw new RuntimeException("reset() failed due to " + e + "; please reconnect using connect()");
} }
}
The present may be embodied in specific forms other than those particularly described above or illustrated by the appended drawings. Upon viewing the present application preferred embodiments and other descriptions herein of the present invention, variations and other implementations that do not depart from the spirit and scope of the present invention will be apparent to one of routine skill in this field. Such variations and other implementations are considered part of the present invention and within the scope of the appended claims. Accordingly, reference should be made to the appended claims, rather than to the forgoing specification and drawings, as indicating the scope of the present invention. Appendix 1
From SQL to Transparent Persistence using CocoBase Enterprise OR
This document is a brief overview of how to create Java applications that use CocoBase Transparent Persistence features starting from SQL database tables. Such Transparent Persistence can be run locally on a system instead of in a distributed environment. A local application server or a JSP server such as TomCat can be utilized to connect a JSP to a database and provide persistence of objects in the model or database.
Table Mapping
Suppose a set of database tables was defined as follows:
CREATE TABLE COMPANY (
ID NUMERIC,
NAME VARCHAR(50) ,
PRIMARY KEY(TD) )
CREATE TABLE DEPARTMENT)
ID NUMERIC,
NAME VARCHAR(5ϋ) ,
COMPANY NUMERIC,
PRIMARY KE (ID) ,
FOREIGN KEY (COMPANY) REFERENCES COMPANY (ID)
CREATE TABLE EMPLOYEE (
ID NUMERIC,
NAME VARCHAR(50) ,
SALARY REAL,
DEPARTMENT NUMERIC,
MANAGER NUMERIC,
PRIMARY KEY (ID) ,
FOREIGN KEY (DEPARTMENT) EFERENCES
DEPARTMENT (ID) )
The steps to create a CocoBase Map from a given table are detailed below.
1) Connect to the CocoBase Repository
Launch CocoBase and go to File->Open New DB Connection to open the login dialog In the dialog, select the JDBC driver/user/password to be used to connect to the CocoBase repository and click on the Login > button presented in the dialog box or window.
2) Create Map from Table
If login was successful, a dialog box will appear indicating a successful login and providing a number of task options and/or a tool bar with pull down windows.
Check the box Generate New Map From Table in the dialog box or window and click on the button Launch.
A window will appear with a tree indicating connections and tables that are available.
Expand the branches on the tree in the dialog to see the tables available in the database and then select one of the tables. Click on the button Next > to go to the window with the Map field details, verify if the information is correctly matching the table definition and that the Map name is appropriate. The Map can be modified at this point by changing the names or types of the fields and inserting or deleting fields.
Click on the button Finish to create the new Map from the selected table. A dialog will be prompted asking to confirm the creation of the Map. Click on the button Continue Map Create to confirm the creation of the new Map. A message will be prompted confirming that the Map was successfully generated and is already in the CocoBase repository.
Click on the button Ok button of the pop-up dialog to continue. This procedure must be repeated for all the tables containing information relevant to your application. To start again in the Map creation Window of the earlier present dialog (or at the top of the tool bar on the interface), select the menu item
File -> New Map from Table.
3) Verify the results
Go to File->Edit Map in the dialog to open the Map editor and verify if the Maps were created accordingly. Relationship Mapping
Once all necessary database tables are mapped, it is possible to create Link definitions between the Maps so that 1-1, 1-M and M-M relationships between objects can be transparently managed by CocoBase. The steps to create a Link definition are detailed below.
1) Choose Link Model
Before creating a Link, it is necessary to have a Link model created. A Link model is a set of Link definitions. Multiple Link models are useful when an application needs to switch between several relationship configurations, since it allows different views of complex object data over the same set of underlying tables. The idea of having relationship mapping separated from table mapping is unique of CocoBase. It provides reusability at the mapping level, since a given Map can be reused across multiple Link models.
Usually, one single Link model is sufficient for a simple application. To create a link model, right click on the Links branch in the Map editor tree. A pop-up menu like the following will appear giving options such as New Model, Import Model, Save, Save to location, Reload, and the like.
Select the option New Model... and enter the name of the new Model in the input dialog that will appear next.
The new Link model will be inserted as a sub-node in the editor tree.
2) Create Link Definition
In order to create a new Link for that model, right click on the model to activate the model popup menu and select the menu item New Link in the dialog.
After clicking on the menu, a new empty Link definition will be inserted in the selected model. Expand the model branch and click on the new Link definition to see its details in a detail dialog.
Although totally unconstrained, a Link definition would normally be created for each foreign- primary key relationship in the database tables or, in the case of many-to-many relationships, for each associative table.
A Link definition is basically a combination of two roles, each having the following information: Map Name - the name of the Map participating in the relationship
Link Name - the name of the link that connects to the Map in the opposite role. It normally matches the name of the object property (field or get/set method pair) that holds instances of the related objects. Key Fields - the comma-separated list of fields defined according to the following guidelines:
» If this role is on the "one" side of a one-to-one or one-to-many link, this is the list of the fields in the map that correspond to the primary key defined in the underlying table
■ If this role is on the "many" side of a one-to-many link, this is the list of the fields in the map that correspond to the foreign key defined in the underlying table
■ If this is a role of a many-to-many links, this is the list of the fields in the map that correspond to the primary key defined in the underlying table
Java Class - the full qualified name of the Java class that will be instantiated when the relationship is loaded from the database. This is normally a class corresponding to the Map specified in the opposite role.
Cascade Load - indicated if this role is going to load related object instances.
Cascade Insert - indicated if this role is going to insert related object instances.
Cascade Delete - indicated if this role is going to delete related object instances.
Cascade Update - indicated if this role is going to update related object instances.
M:M Key Fields - This is relevant only for many-to-many Link definitions and is the comma-separated list of the fields in the associative map that refer to the Key Fields of this role. In this case, the name of associative map must be specified in the box M:M Map Name.
Examples of Link definitions are given in published CocoBase literature. Click on the appropriate boxes to edit the Link definition for the model being defined. Repeat this procedure for each table relationship that is relevant to the application being developed.
3) Save Link Definitions
Once Link definitions are complete, select the branch Links in the editor tree right and click on it to access the pop-up menu. Click on the option Save to save your work.
Note that unlike CocoBase Maps, Link models are not kept in the CocoBase repository in the current release. Instead, for each Link model, CocoBase will create a property file called modelname.properties containing all the Link definitions for that model. This property file is stored under the demos/resources directory (by default - although this can be overridden). As long as the property file describing the Link model is in the classpath (either directly or in a subdirectory called resources), CocoBase runtime classes will load the model and register the navigation information. CocoBase Transparent Persistence
In the previous sections show above in this appendix, it was demonstrated how to map database tables and relationships using CocoBase. In this section, it is shown how CocoBase runtime classes can be used to provide transparent persistence to a Java Object Model which corresponds to the created Maps and Links.
Transparent Persistence with CocoBase Maps and Models
CocoBase accomplishes transparent persistence with java object models without using bytecode manipulation, proprietary interfaces or class hierarchy intrusion. This means that no special classes or interfaces are needed in the Object Model in order to do persistence with CocoBase. The only requirement is that they must have a default constructor with no arguments.
There are 3 basic Runtime components that are involved in the transparent persistence of objects:
■ The CocoBase Runtime O/R mapping class that wrappers the JDBC driver and issues queries and does the actual persistence calls. This is a class such as thought . CocoBase . CocoPo der or thought . CocoBase . CocoPowder Plugin20 (for jdbc 2.0 connections).
■ The thought . CocoBase . Transaction object that can track changes of instances, and acts as a change 'buffer'. If a Transaction object is used, then it only calls a CocoBase Runtime driver - O/R mapping runtime class - when the txn.commitQ is called.
■ The thought . CocoBase . navapi . Navigator object that can track and detect changes in relationships based on Link definitions.
The Navigator class can function in conjunction with a Transaction object or it can function standalone. While complex object graphs can be transparently managed directly by the Navigator and without the Transaction object, the use of the Transaction object is generally preferred because of its buffering and update optimizations which only persist those attributes that have changed. Creating Applications with CocoBase Transparent Persistence
Once Links and Maps are properly created, go to File->Generate Java Code in the main CocoAdmin Dialog to generate Java classes. The 'Default CocoNavigate Java Object' code generation target will generate a pure java class with no CocoBase interfaces.
After classes have been generated and compiled, CocoBase runtime classes can be used to persist instances of these classes. First, open a CocoBase connection as follows:
CocoDriverlnterface myBase = CocoDriver . getCocoDriver ( "thought . CocoBase . CocoPowder" , "org . hsql . j dbcDriver " , " jdbc : HypersonicSQL : hsql : //localhost ; cocoprop=cocofactory=CocoProxy Factory
) if (myBase. connect () == -1) {
System. out.println ("Failed connect!") ;
System. exit (1) ; }
Then create a CocoBase transaction object to manage any objects that are retrieved. Notice how the transaction object is configured through parameters and property settings.
thought . CocoBase . ransaction cocoTxn = new thought . CocoBase . Transaction (myBase, false) Properties cocoTransProps = new Properties ( ) ; cocoTransProps . pu ( "preserveCommit" , "true" ) ; cocoTransProps . put ( "commitconnection", "true") ; cocoTransProps . put ( "throwExceptions" , "true" ) ; cocoTransProps .put ( "updateOnlyChangedColumns", "true" ) ; cocoTxn. setProperties (cocoTransProps ) ;
// Begin a new transaction. cocoTxn . begin ( ) ;
Then open a CocoBase Navigator object with the Navigation model to be used and also we register the Transaction object with the Navigation model: // Instantiate a Navigator with the Link model created from
// the UML/XMI document thought.CocoBase.navapi.Navigator navigator = new thought.CocoBase.navapi. avigator (myBase, "company") ;
// Assign the current transaction to the Navigator navigator. setTransaction (cocoTxn) ;
Now select the top level node to work with. Notice our use of a CocoProxyM class which 'wrappers' the pure java object model class and gives the class the compatibility with CocoBase through java reflection instead of requiring any special interfaces in the java class itself:
// Setup our object to query Department dept = new Department () ; department. setName ("SALES") ;
// This will read & bind all 'Department' objects to the transaction. Vector deptVector = myBase. selectAll (
new thought. CocoBase. CocoProxyM (dept) , "Department") ;
Now it is possible to step through each of these objects and tell the retrieved object to be navigated through the loadAllLinks method which does the automatic navigation for that object:
for(int i=0; i< deptVector. size () ; i++) {
Department d = (Department) deptVector. elementAt (i) ;
// Because the cascadeLoad flag is set to true in the direction
// Department->Employees, the employees link will load automatically d = navigator. loadAllLinks (d, "Department") ;
Vector emps = d.getEmployees () ; for (int j=0; j<emps . size ( ) ; j++) { // raise salaries by 20% emp.setSalary(emp.getSalary () *1.2) ; // Once changes are made to an object graph those changes can be // synchronized using the updateAllLinks method such as:
navigator.updateAHLinks (d, "Department", true) ;
You can then commit the buffered changes with: cocoTxn. commit ( ) ;
These code introductions are quite small, and can be done entirely server side with Entity or Session beans in J2EE environments with no model or object model intrusion. And for local non-j2ee apps the application intrusion is incredibly small with only the 'load', 'synchronize' and 'persist' operations requiring a single method call for each root node.
The Navigator supports one-to-one, one-to-many & many-to-many link definitions with cycle detection. It also detects this locally or by reconciling serialized or copied objects without object model or bytecode intrusion. This is truly transparent persistence that's architected and designed for the NM oriented Java language. There are also more advanced applications included in the demos/pguide/navapi subdirectory that demonstrate all of the mapping one-to- one, one-to-many & many-to-many relationships as well as an EJB using the Navigator system to manage a graph of java objects.
Conclusion
This Appendix is an Example describing how to add CocoBase Transparent Persistence to Object Models and applications from SQL database tables (graphic dialogs have been omitted for simplicity, and the options and dialogs may vary somewhat with new releases). This can be done in a local non-distributed environment. A wrapper can be used to wrapper objects and the CBSession class objects (Transparent Persistence mechanism). It is only a brief overview of what can be done with CocoBase. The architecture and implementation presented here is uniquely suited to work in every application from the tiny local application to the enterprise J2EE and to do so with superior performance and manageability.

Claims

I CLAIM:
1. A system for creating or maintaining transparent persistence of a member selected from the group consisting of a data object, an object graph model and a portion of an object graph model when a user of the system is creating, maintaining, accessing or navigating complex data objects as a CDOG model, comprising: a) a set of definitions for the relationships between a data source schema and objects capable of sotring data for an object language application, wherein the set of definitions is stored in a repository; b) a set of definitions for the relationships between objects for an object language application, c) an object name, a list of objects, or a set of objects that are to be persisted, d) an object or set of objects as a programming module that contains logic capable of persisting an indicated object or set of objects, e) an input method to inform the programming module of d) with the location of information related to a), b) and c), and f) at least one data source to which persisted data may be stored.
2. A system according to claim 1 , that does not require any modifications to an object model or the inclusion of any persistence byte code in the object model in order to provide persistence for all or a portion of the CDOG model.
3. A system according to claim 2, that provides persistence for a CDOG model on a distributed network environment.
4. A system for creating or maintaining transparent persistence of a member selected from the group consisting of a data object, an object graph model and a portion of an object graph model when a user of the system is creating, maintaining, accessing or navigating complex data objects as a CDOG model, wherein d) comprises a generic ejb stateful session bean.
5. A system according to claim 1, that does not require any modifications to an object model or the inclusion of any persistence byte code in the object model in order to provide persistence for all or a portion of the CDOG model, wherein d) comprises a generic ejb stateful session bean.
6. A system according to claim 2, that provides persistence for a CDOG model on a distributed network environment, wherein d) comprises a generic ejb stateful session bean.
7. A software module, or set of modules, for creating or maintaining transparent persistence of a member selected from the group consisting of a data object, an object graph model and a portion of an object graph model when a user of the system is creating, maintaining, accessing or navigating complex data objects as a CDOG model, comprising: i) a software module for creating a set of definitions for the relationships between a data source schema and its stored data to objects in a object language application, ii) a software module for creating set of definitions for the relationships between objects in an object language application, iii) a software module providing an input means for an object name, a list of objects, or a set of objects that are to be persisted, iv) a software module containing the programming logic to persist an object or set of objects based upon access to (a) a set of definitions for the relationships between a data source schema and objects capable of storing data for an object language application, (b) a set of definitions for the relationships between objects for an object language application, and (c) an object name, a list of objects, or a set of objects that are to be persisted, and v) a software module having an input method to inform iv) of the location of the information related to iv)(a), iv(b) and iv(c).
8. A software module, or set of modules, according to claim 7, for creating or maintaining transparent persistence of a member selected from the group consisting of a data object, an object graph model and a portion of an object graph model when a user of the system is creating, maintaining, accessing or navigating complex data objects as a CDOG model, comprising software code for generating, accessing, or maintaining a generic ejb stateful session bean object as part of the software module of iv).
9. A software module, or set of modules, according to claim 7, that does not require any modifications to an object model or the inclusion of any persistence byte code in the object model in order to provide persistence for all or a portion of the CDOG model, comprising software code for generating, accessing, or maintaining a generic ejb stateful session bean object as iv).
10. A software module, or set of modules, according to claim 9, that provides persistence for a CDOG model on a distributed network environment.
11. A software module, or set of modules, according to claim 9, that further comprises software logic providing to a user the ability to query against the CDOG model or object graph using an object query facility or syntax.
12. A method according to claim 11 , wherein the object query facility utilizes EJB- QL query syntax or similar syntax.
13. A method according to claim 12, wherein the object query facility utilizes the EJB-QL query syntax.
14. A method according to claim 11 , wherein the object query facility utilizes a query syntax similar to a EJB-QL query syntax and including expanded functions not provided by EJB-QL querying.
PCT/US2003/006987 2002-03-07 2003-03-07 Session bean implementation for distributed transparent persistence of complex data objects WO2003077113A1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
AU2003220077A AU2003220077A1 (en) 2002-03-07 2003-03-07 Session bean implementation for distributed transparent persistence of complex data objects

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
US36234502P 2002-03-07 2002-03-07
US60/362,345 2002-03-07

Publications (1)

Publication Number Publication Date
WO2003077113A1 true WO2003077113A1 (en) 2003-09-18

Family

ID=27805161

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/US2003/006987 WO2003077113A1 (en) 2002-03-07 2003-03-07 Session bean implementation for distributed transparent persistence of complex data objects

Country Status (2)

Country Link
AU (1) AU2003220077A1 (en)
WO (1) WO2003077113A1 (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5857197A (en) * 1997-03-20 1999-01-05 Thought Inc. System and method for accessing data stores as objects
US6263498B1 (en) * 1998-12-03 2001-07-17 International Business Machines Corporation Method and apparatus for enabling server side distributed object modification
US6269373B1 (en) * 1999-02-26 2001-07-31 International Business Machines Corporation Method and system for persisting beans as container-managed fields
US6298478B1 (en) * 1998-12-31 2001-10-02 International Business Machines Corporation Technique for managing enterprise JavaBeans (™) which are the target of multiple concurrent and/or nested transactions
US6327628B1 (en) * 2000-05-19 2001-12-04 Epicentric, Inc. Portal server that provides a customizable user Interface for access to computer networks
US6334117B1 (en) * 1996-11-27 2001-12-25 Diebold, Incorporated Automated banking machine and system

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6334117B1 (en) * 1996-11-27 2001-12-25 Diebold, Incorporated Automated banking machine and system
US5857197A (en) * 1997-03-20 1999-01-05 Thought Inc. System and method for accessing data stores as objects
US6263498B1 (en) * 1998-12-03 2001-07-17 International Business Machines Corporation Method and apparatus for enabling server side distributed object modification
US6298478B1 (en) * 1998-12-31 2001-10-02 International Business Machines Corporation Technique for managing enterprise JavaBeans (™) which are the target of multiple concurrent and/or nested transactions
US6269373B1 (en) * 1999-02-26 2001-07-31 International Business Machines Corporation Method and system for persisting beans as container-managed fields
US6327628B1 (en) * 2000-05-19 2001-12-04 Epicentric, Inc. Portal server that provides a customizable user Interface for access to computer networks

Also Published As

Publication number Publication date
AU2003220077A1 (en) 2003-09-22

Similar Documents

Publication Publication Date Title
US7167862B2 (en) Session bean implementation of a system, method and software for creating or maintaining distributed transparent persistence of complex data objects and their data relationships
US7103600B2 (en) Displayable presentation page and SQL searchable relational data source implementation of a system, method and software for creating or maintaining distributed transparent persistence of complex data objects and their data relationships
US20030046266A1 (en) System, method and software for creating or maintaining distributed transparent persistence of complex data objects and their data relationships
US7043481B2 (en) System, method and software for creating, maintaining, navigating or manipulating complex data objects and their data relationships
Bernstein Repositories and object oriented databases
US6985912B2 (en) Dynamic object-driven database manipulation and mapping system having a simple global interface and an optional multiple user need only caching system with disable and notify features
US20030167456A1 (en) Architecture for building scalable object oriented web database applications
US20080189240A1 (en) System, method and software for creating or maintaining local or distributed mapping and transparent persistence of complex data objects and their data relationships
CA2361523A1 (en) A system and method for accessing data stores as objects
US20070055647A1 (en) Dynamic class inheritance and distributed caching with object &lt;-&gt;relational mapping and Cartesian model support in a database manipulation and mapping system
US20090064093A1 (en) System for Navigating Beans Using Filters and Container Managed Relationships
JP2006504194A (en) Transparent EJB support and horizontal data partitioning
WO2004107162A1 (en) Dynamic object-driven database manipulation and mapping system
Schmoelzer et al. The entity container-an object-oriented and model-driven persistency cache
EP1040432B1 (en) Method and apparatus for loading stored procedures in a database corresponding to object-oriented data dependencies
Mak et al. Hibernate Recipes: A Problem-Solution Approach
WO2003077113A1 (en) Session bean implementation for distributed transparent persistence of complex data objects
Habela Metamodel for Object-Oriented Database Management Systems
WO2003077123A1 (en) Displayable presentation page
CA2429154A1 (en) Dynamic object-driven database manipulation and mapping system
Wetherbee et al. Entities and the Java Persistence API (JPA)
Lin Object-oriented database systems: A survey
Guide et al. v6. 0
Wetherbee et al. Entities and the Java Persistence API
Myatt Creating Java Enterprise Projects

Legal Events

Date Code Title Description
AK Designated states

Kind code of ref document: A1

Designated state(s): AE AG AL AM AT AU AZ BA BB BG BR BY BZ CA CH CN CO CR CU CZ DE DK DM DZ EC EE ES FI GB GD GE GH GM HR HU ID IL IN IS JP KE KG KP KR KZ LC LK LR LS LT LU LV MA MD MG MK MN MW MX MZ NI NO NZ OM PH PL PT RO RU SC SD SE SG SK SL TJ TM TN TR TT TZ UA UG US UZ VC VN YU ZA ZM ZW

AL Designated countries for regional patents

Kind code of ref document: A1

Designated state(s): GH GM KE LS MW MZ SD SL SZ TZ UG ZM ZW AM AZ BY KG KZ MD RU TJ TM AT BE BG CH CY CZ DE DK EE ES FI FR GB GR HU IE IT LU MC NL PT SE SI SK TR BF BJ CF CG CI CM GA GN GQ GW ML MR NE SN TD TG

121 Ep: the epo has been informed by wipo that ep was designated in this application
122 Ep: pct application non-entry in european phase
NENP Non-entry into the national phase

Ref country code: JP

WWW Wipo information: withdrawn in national office

Country of ref document: JP