CN100552625C - Transparent EJB supports and horizontal data is cut apart - Google Patents

Transparent EJB supports and horizontal data is cut apart Download PDF

Info

Publication number
CN100552625C
CN100552625C CNB038257335A CN03825733A CN100552625C CN 100552625 C CN100552625 C CN 100552625C CN B038257335 A CNB038257335 A CN B038257335A CN 03825733 A CN03825733 A CN 03825733A CN 100552625 C CN100552625 C CN 100552625C
Authority
CN
China
Prior art keywords
database
class
code
characteristic
ejb
Prior art date
Legal status (The legal status 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 status listed.)
Expired - Fee Related
Application number
CNB038257335A
Other languages
Chinese (zh)
Other versions
CN1729448A (en
Inventor
马尼什·莫德
马吉德·阿尼
詹姆斯·泽维尔
桑迪普·马瑟
普拉萨德·班德里迪
杨少雄
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Commerce One Operations Inc
Original Assignee
Commerce One Operations 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 Commerce One Operations Inc filed Critical Commerce One Operations Inc
Priority to CN200910163430.4A priority Critical patent/CN101630259B/en
Publication of CN1729448A publication Critical patent/CN1729448A/en
Application granted granted Critical
Publication of CN100552625C publication Critical patent/CN100552625C/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/20Software design
    • 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/22Indexing; Data structures therefor; Storage structures
    • G06F16/2282Tablespace storage structures; Management thereof
    • 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
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/54Interprogram communication
    • G06F9/541Interprogram communication via adapters, e.g. between incompatible applications

Abstract

The present invention relates to the application development of a kind of employing public object framework (COF).Specifically, the present invention relates in fact COF is used for and aspects such as the component model of measured server end and remote method invocation (RMI) protocol-compliant.Others of the present invention relate in the intermediary service application layer, promptly on database layer database is carried out level cuts apart.Other aspects of the present invention are included in the international combination of segmentation in the object, change histories and field.Concrete aspect of the present invention is described in claim, instructions and the accompanying drawing.

Description

Transparent EJB supports and horizontal data is cut apart
Copyright notice/
The disclosed part of patent document comprises content protected by copyright.The copyright owner does not oppose to duplicate this patent documentation or patent publication like that according to patent document that occurs in patent and the trademark office or record, otherwise keeps all copyrights.
Technical field
The present invention relates to the application development of a kind of employing public object framework (COF).Specifically, one aspect of the present invention relates in fact COF is used for component model and remote method invocation (RMI) protocol-compliant with measured server end.Others of the present invention relate in intermediary service application layer, i.e. horizontal partition data storehouse on database layer.Being included in segmentation in the object, change histories and the international combination of field is other aspects of the present invention.Concrete aspect of the present invention is described in claim, instructions and the accompanying drawing.
Background technology
Multilayer is used the common method that has become with distribution, reliable and scalable mode configuration service logic.In multilayer (multi-tiered) system, system services layer provides database, transaction processing program and other infrastructure.The middle layer provides the path that arrives service logic.Client layer is visited this service logic.Client layer can be the user with simple or complicated client computer, or such as the program of web services client computer.Multilayer is used especially very useful from many clients of single application platform to supporting.Multilayer is used the data that can be used to many clients to handle similar structureization, and its advantage comprises code reuse and flexible.
J2EE and Enterprise JavaBeans TM(EJB) as encapsulation in the multilayer environment and service logic is provided, be the architecture of the integrated mechanism that is used for data management and occurring.Application server provides the path of access system service and basic facilities.Application management server is to the storage or the maintenance of the object that encapsulated service logic and data.Referring to Sun, Simplified Guide to the Java TM2 Platform, EnterpriseEdition (1999).The competition architecture of Microsoft is known as .NET framework and DCOM.Monson-Haefel,Richard,Enterprise?JavaBeans?3d?Ed.,p.17?O’Reilly(2001)。Older framework with some similar characteristics is known as CORBA.
The life cycle of service application multilayer, encapsulation comprises initial exploitation and maintenance subsequently.(in this article, service application is used to comprise commerce and non-commercial applications, and they comprise the middle layer of one or more resident so-called service logics.) the initial exploitation of service application multilayer, encapsulation can begin in Object-Oriented Visual analysis and modeling instrument, develop into the relational database mapping by object and handle, and be configured to service application multilayer, encapsulation.Maintenance can comprise the service application assembly that segmentation (staging) and configuration (deployment) have been upgraded.Configuration may need the dynamic data of internationalization (be abbreviated as I18N: " i " and " n " adds 18 middle letters) such as name of product and description.
The instrument that is used for initial exploitation comprises visual analyzing and modeling tool, and it is observed unified modeling language (UML) and produces application program that this language will use and the OO model of data.RationalRose is main visual analyzing and modeling tool.Other products comprises the Enterprise Studio of VisualAge, Boland of IBM and the NeuArchitect of NeuVis.Design tool can also be used for visual analyzing and modeling, as Visio or Flowcharter.
The OR instrument also can be used for exploitation, and OO model is mapped as relational database.TopLink has been the main tool that OO model is mapped to relational database.Competitive tools is produced by SunMicrosystems, IBM, Borland, Oracle, Microsoft, Thought company and Tibco.The modeling tool that comprises some OR mapping functions is very limited usually, and can not perform well in supporting the scope of availability database.
Be used for multilayer, the encapsulation service application application server can with J2EE standard or similar operating such.The application server that is used for J2EE and EJB2.0 is provided by Sun, JBoss.org, Borland, IBM, BEA Systems, Warp Solutions, Macromedia, Oracle and other a lot of companies.Application server can rely on various databases to obtain continuation, and the database that is provided by Oracle, Microsoft, IBM, Siebel, Sysbase and other company is provided.
Two weakness of the instrument that is provided are the limited integrated and supports that lacks useful properties in maintenance and the configuration.The limited integrated user of meaning need re-enter data or follow detailed Programming Guide, thereby exploitation and the application program of shining upon in the OR instrument just can meet the competition test of the service application configuration of a multilayer, encapsulation in visual analyzing and modeling tool.Thereby can be used for supporting to make the developer not need to utilize the manual feature that realizes of existing instrument to comprise the internationalization of segmentation, configuration history and dynamic data.Segmentation can comprise the module of testing at live data test new module and configuration.History is meant this configuration of record and writes down segmentation alternatively and/or the test new module.By specifying the language or the country that will add in one or more basic languages or the country, the added field and the tabulation of the foreign language translation of supporting dynamic data added in the internationalization support of dynamic data.
The feature of an expectation that had not manifested in current system is to divide equally in water in intermediate layer to cut data, thereby data can be arranged in a plurality of physical databases independent of each other, even can be arranged in a plurality of databases that are based upon on the different vendor platforms, as oracle database and SQL Server2000.This and below, version " 2000 " is only with for referencial use, and do not mean that to limit and can be used for implementing software version of the present invention.Existing, by database supplier being used for of providing mechanism that level cuts apart closely adopt a plurality of physical volumes in the system of management at one, all these volumes are all by supplier's database manager control.For example horizontal cutting techniques, referring to Klein, U.S.Pat.No.6453313, Database Management System and Method forDequeuing Rows Published to a Database Table (1992); People such as Lohman, U.S.Pat.No.6112198, Optimization of Data Repartitioning During Parallel QueryOptimization (2000); People such as Baru, U.S.Pat.No.5970495, Method and Apparatus forAchieving Uniform Data Distribution in a Parallel Database System (1999).As what Klein explained, the transparent water of large database table divide equally cut be used between the node of group's machine and equipment flexible and disperse calculated load.Level is cut apart and is meaned and table is divided or be divided into two or more files that each part is all stored the record (tuples) with corresponding key value scope.For example, each part in two or more parts of client table may be used to the record of the customer name that begins corresponding to the corresponding scope with alphabetical A-L.Table can also be cut apart according to cryptographic hash.For example, the hash function of employing recording indexes can have any one in N (for example 4) value, and a table can be divided into N part, and hash function is used for determining wherein to store the part of each table row.In addition, each part can be stored in the different nodes or physical equipment of system, to help Distribution calculation load in this system.
Level cut apart be integrated into may be to supporting that with same application a plurality of clients are useful in middle layer rather than the database manager.
When having added more client or having cut apart database again, transparent water is divided cut branch equally and is held and can make the developer avoid revising their service logic.
Therefore, from visual analyzing and modeling to configuration with safeguard that supporting has better all appearred in each stage multilayer, the encapsulation service application and the chance of integrated exploitation.
Summary of the invention
The present invention relates to the application development of a kind of employing public object framework (COF).Specifically, one aspect of the present invention relates in fact COF is used for component model and remote method invocation (RMI) protocol-compliant with measured server end.Others of the present invention relate in intermediary service application layer, i.e. horizontal partition data storehouse on database layer.Being included in segmentation in the object, change histories and the international combination of field is other aspects of the present invention.Concrete aspect of the present invention is described in claim, instructions and the accompanying drawing.
Description of drawings
Fig. 1 is the high level block diagram that multilayer is used.
Fig. 2 illustrates and how to adopt the EJB that provides on the J2EE in the middle layer server to realize the public object framework.
Fig. 3 illustrates object and the relation that simple shopping cart is used Visualization Model.
Fig. 4 illustrates the CBOF label 401 that adds in the pop-up window that is used to specify class feature.
Fig. 5 illustrates the CBOF label 401 that adds in the pop-up window that is used to specify operating characteristic.
Fig. 6 illustrates the CBOF model that can be used for the EJB shell.
Fig. 7 illustrates the class figure of the aspect of the class CmoBase701, the CmsBase702 that are used to support EJB and J2EE and CmoAttribute703.
Fig. 8-10 illustrates COF instrument and model being suitable for EJB and J2EE support.
Figure 11 briefly shows level and cuts apart.
Figure 12 illustrates and is used in the class of cutting apart in middle layer realization level in the TopLink environment.
Embodiment
Following detailed is made with reference to accompanying drawing.Preferred embodiment has illustrated the present invention, but is not limited to scope defined by the claims.Those skilled in the art can know various of equal value change the to describing below.
Fig. 1 illustrates J2EE and the EJB standard of being initiated by Sun, and they can be used for one embodiment of the present of invention.Referring to people's such as Bodoff The J2EE Tutorial, Addison Wesley (2002) p.10.Sun is explained as follows the module among Fig. 1.Part when J2EE server 120 is operations of J2EE product.The J2EE server provides Enterprise Java Bean container 125 and Web container 121, and management is to the visit of underlying database layer 130.125 management of Enterprise JavaBeans (EJB) container are to the execution of enterprise's beans (enterprise beans) of J2EE application.Enterprise's beans 126,127 and container 125 thereof move on J2EE server 120.Web container 121 is managed the JSP page or leaf 123 that is used for the J2EE application and the execution of servlet 122 assemblies.Web assembly 122,123 and container 121 thereof move on J2EE server 120.The execution of application client container 113 management application client 112 assemblies.Application client 112 and container 113 thereof move on client computer 110.The execution of Applet Container Management applet.This container comprises the java plug-in program of web browser 111 and one or more operations on client computer 110.
More put it briefly, Fig. 1 illustrates the component model and the remote method invocation (RMI) agreement of measured server end..NET framework and the CORBA of Microsoft comprise similar assembly.Monson-Haefel,EnterpriseJavaBeans,pp.5-18。Aspect of the present invention and operating such, wherein these aspects are with any version or the derivant indicated here or current version when submitting the application or version subsequently meet this standard.The essence compatibility is of great use, need not whole compatibilities.Have realized that and the fully compatible feature that needs to realize being considered to unwanted standard sometimes of standard that this cost is too big or come and go.In addition, recognizing also that some enforcement can comprise being introduced into strengthens product and may and become off-gauge feature along with standard evolution and user adhere to the law support.Standard means that covering such as EJB etc. is by the standard of council's control and such as the standard by supplier's control such as .NET framework.
Fig. 2 illustrates and how to adopt the EJB that provides on the J2EE in the middle layer server to implement the public object framework.The a lot of assemblies of Fig. 2 and the assembly of Fig. 1 mate, and indicate according to Fig. 1.In Fig. 2, the content of web container and enterprise's beans has been described.In web container 121, use comprise that public object framework (COF) 240A, role use 241, web service-Engine 242 and cooperating process manager 243.COF is for continuing object and provide support and visit to it is provided, and uses the needs that 241 developer handles continuation, transaction management and inter-related task to reduce the role.By the method for describing in the application of adopting the application and merging by reference, COF can support segmentation, change histories, internationalization and level to cut apart alternatively.Web service engine 242 and cooperating process manager are to be used to provide the web assembly of service by Commerce One; The details of these application in the web container is unimportant to the present invention.But, cooperating process manager 243 is connected to the filled arrows of COF240A and CPM243 is connected to the option that service that being shown in dotted line of COF240B and EJB127 provide with Enterprise Java Bean container 124 and data support replace the service that the COF240A code in the web container 121 provided.COF code in the Web container 121 and enterprise's beans 126 are labeled as 240A, 240B similarly mean that expression COF code can be packed and be used for EJB and handle, and seldom or not rewrite the interface that has the EJB compatibility under the situation of COF code changing.As shown in the figure, COF can obtain in web container or Enterprise Java Bean container.Application can be visited two COF assemblies in the container.Application can or be carried out active session concomitantly with two cover COF assemblies whiles.Though Fig. 2 is illustrated in the enforcement in the linguistic context of EJB environment, those skilled the in art will appreciate that identical method can be used for other measured server-side component model and remote method invocation (RMI) agreement, as DCOM.
So-called public object framework is provided for the basic realization and the instrument of the whole software life cycle of management service object, and this has more detailed description in the application that merges.This comprises that design, uml model, complete code and database produce, and these all comprise transparent internationalization, segmentation, change histories and custom attributes.For the maintenance of ongoing code to dependency database, data and pattern provides instrument.The kind of public object frame assembly comprises utility routine (utilities) storehouse, business object framework and system management facility.The utility routine library component comprises the utility routine of common code level, as Exceptions (international) (exception), Logging (daily record), Cryptography (password) and Configuration (configuration) visit.The utility routine library component also comprises the internationalization function, as explorer, date, numerical value and text.The business object framework is used to design business object, produce be used to continue, internationalization, data sementation, vncsion history, dynamic custom attributes and create/read/upgrade/delete the code of (CRUD) function fully.This framework also comprises expanding any business object, striding the synchronous support and the scheduler program of high-speed cache of a plurality of servers.System management facility is based upon on the basis of business object framework, comprises being used to create database, loading data, renewal database schema and the data management instrument of the release change of new data more.Also be useful on the extraction procedure and the installation procedure of internationalization and localization tool bag.
The COF of EJB compatibility or the COF of operating such can be realized and alternatively be realized with them by various component softwares.The generation of the design of object model and code or metadata (machine-readable data) can with Rational Rose 2001a or more highest version realize.This and below, version " 2001a " also only is used for reference, and does not mean that the version to the software that can be used for implementing aspect of the present invention limits.When using Rational Rose, an additive term is installed function shown in Fig. 4-5 and that explain below is provided.Can adopt TopLink3.6.1, SQL Server 2000, Oracle 8.1.7 or DB2 and such as the suitable JDBC driver of I-netOPTA4.15, Seropto or IDS JDBC Lite3.5.4 shine upon, establishment and accessing database.Can adopt Enterprise Java Bean container such as WebSphere and WebLogic7.0.
Available multiple useful mode makes up new and module enhancing of the COF of EJB compatibility.These modules generate long-range and local EJB interface, thereby any COF object can resemble accessed and use the EJB.They adopt TOPLink4.0 as the OR mapping tool, provide the visit as the EJB-QL of the query language that is used to find object.These module management database server sessions, visit and the level of data cut apart when comprising support to a plurality of database.Relation between the database can't be supported.These modules provide client session to the application that any object is conducted interviews.They provide configurable retry mechanism for the database of losing connects.Their support with based on the affairs of EJB JTA and between database server unique unique connecting object identifier carry out integratedly, cut apart with object of reservation identifier and realization level when between database, moving.Object changes the configurable incident generation of event message as Object Creation, renewal and deletion.Provide check to the object of realizing, refresh and the deletion of preceding object with Object Creation, the renewal of preceding object, back object after being used for.For Rational Rose provides design and code Core Generator.The database initialize instrument generates database or DDL script based on the design of visual modelization.Instrument is that the EJB that is generated produces the application server configuration describer.Support WebLogic6.1sp2 and WebSphere 5.0 (needing the support of EJB2.0spec).
Fig. 3 illustrates the object and the relation of the simple shopping cart application of visual modelization.Model among this figure is that unified modeling language (UML) symbol that is used for class figure is created.In this embodiment, CmsCart object 301 is used to provide a plurality of methods that expose.Adopt CmsCart rather than CmoCart object to mean that this object exists during session, and a back session is not continued, this is opposite with client and order, and the latter continues.Shopping cart 301 can be related with CmoOrder object 303 by order 311.In this embodiment, an order object relates to a shopping cart.CmoOrder object 303 should be related with client 313 by CmoCustomer object 302 after finishing.Along the opposite direction of this relation, continuing client 302 can be related with a more than order 303 with 312.Order 303 comprises one or more CmoProductLineItem objects 305.Relational term 314 links to each other order 303 with its line project 305.Line project 305 has been filled the product 304 that is connected to this line project by product 315 relations.
In UML, can be modeled as a class such as the object of shopping cart.Under the situation of acquiescence, the lasting object of in embodiments of the present invention all top (promptly not having parent) is all inherited from the basic object that is called CmoBase, as what below will explain in the context of Fig. 5.Perhaps, temporary object can be inherited from the object that is called CmsBase.This basic object can provide in CAT (or unit) file, and this document can be loaded in the object modeling program, and by other class reference.The purpose of this basic class is that the object to all general common interfaces and realization provides basic function.
The model of setting up the class of UML form with the object modeling program can may further comprise the steps.At first, create bag (package) level, with specify such should and the bibliographic structure that produces there.Can specify class name, class document and generic attribute then.The generic attribute that adopts as shown in Figure 4 and instrument explained later to support comprises: continue, interim, summary, generating code, database table name, sectional, maximum version number, top layer (Table-Level) constraint database (for example compound unique constraint), demonstration in GUI, display name, demonstration describe, generate and generate EJB.
Attribute that below can specified class.Can the specified attribute name, whether null value and this attribute of type, document, database column name, database column length, permission unique.In addition, attribute can be static, final and/or interim.Attribute can be defined as shielded (protected), thereby subclass and reflection code can be visited these attributes.But other class and application code can only be by getter and these attributes of setter way access.Support following attribute type: int, boolean, float, long, short, double, char, String, Date, Time, Timestamp, Interger, Boolean, Float, Long, Short, Double, BigInterger, BigDecimal, Character, Object, byte, Byte, char, Character, EncryptedString, HashedString and TranslatebleString.
These types can suitably be hinted obliquely at for Java fundamental type, and the latter can be mapped as the type specific to database.Object, byte, Byte can be mapped as BLOB type in the database with the memory word throttling.Char, Character can be mapped as CLOB type in the database to store big character stream.EncryptedString, the HashedString type is a specific type, they are character string, but the code that is produced this value of meeting encryption/Kazakhstan rare (hash) before setting a property, and this code can be deciphered this value when returning this attribute by getter and setter method.The TranslatableString attribute also only is a character string, but the code that is produced also produces an add list, and row are wherein represented the translation value of this attribute.These a plurality of translation values that make the particular community of class that must appointment demonstrate this attribute can exist for the object value of supporting localization to be stored in the database.
Relation that then can specified class.In UML, adopt the straight line that has from an object to the arrow of another object to come specified relationship or association.Each side of this association is called the role.Role name equals the attribute-name of the class of this association " source " side.The role should be protected control (as an attribute).Each role can specify diversity.Support " 0...1 ", " 1 " and " 0..* "." 0...1 " specifies in 0 of object of this role side or an example can be in this relation.Equally, " 1 " specify proper what a example of the object of this role side should be in this relation (representative and this relation that is generally comes the related row of the class of source side to specify the non-NULL constraint).Equally, 0 of " 0...* " appointed object or more examples can be in this relations.This is equivalent to the relation that comprises an affiliated partner set.
Relation also can be two-way.This means that each related side can see the opposing party.Multifarious any displacement of appointment above in bidirectional relationship, can existing.In addition, one of this relation can be shown as set (the relation come represent with the opening rhombus on the source side).Set relations are specified the example of proprietary " purpose " class of " source " class.Thereby the example of creating and delete " purpose " class is the responsibility of " source " class.
The object modeling program allows to define the bells and whistles that can be arranged on each independent bag, class, attribute, relation and the relationship role.To every type object, can " CBOF " label be added in the attribute by the object modeling program, as shown in Figure 3.This label is listed and can be the specific properties of every kind of object setting.Generation can be visited any characteristic of any object corresponding to the module of the metadata of visual model or machine-readable data.Therefore, by adding characteristic, the bells and whistles that class can be set customizes the generation of later code, and to such other support.
Specifically, Rational Rose object modeling program allows to add the expansion that comprises the bells and whistles value that is used for various objects.When creating object model (having), can on these object models, specify and/or be provided with one group of characteristic such as features such as class, attribute, associations.This group characteristic can be expanded for the purpose that customizes and add.Fig. 4 illustrates and adds the CBOF label 401 that is used to specify class feature in the pop-up window to.Can select 402 feature collections or characteristic subclass to handle.For model characteristics, there are characteristic title 411, value 412 and originate 413 (for example being shown as acquiescence or covering).The control user handles these characteristics.Characteristic with non-default value is runic, highlighted demonstration or shows emphatically.
Below description list and can be the characteristic that various types of objects add, and one or more generation that is used for control routine and to the mode of other support of class:
1.Project Properties (project characteristic): think that an object model is one " project ".Therefore, some can be set is the characteristic of the overall situation for whole corresponding item objects.
The copyright notice that CopyrightNotice (copyright notice)-covering is exported with the code that generates.
ProjectName (project name)-covering is with the class name of the OR map entries class that is generated.
ProjectDescription (item description)-be provided with is with the description that is stored in as static variable in the OR map entries class of generation.
2.Class Properties (class feature): a class can comprise a uml class object of creating according to class figure.By clicking one group of standard feature, can add the new label that is called " Cmo ", it has following properties:
Generate (generation)-be set to "No" is avoided some class generating code of existing for the file purpose for only.
GenerateEJB-is set to "Yes" and generates one or more EJB interfaces with class.
TableName-covers the acquiescence table name of class.Under default situations, 27 characters in the front of this capitalization class name can be table names.
IsStageable-is set to " vacation " and avoids to this certain kinds generates any segmentation ability, and is as will be described in detail below.
MaxNumVersions-is set to greater than 0 so that the number that changes to be set over, to keep specific class example.
ReplaceClass-specifies such to realize the complete trails class name of the existing class replaced.
WrapperPackageName-specifies the bag name that generates shell (ImplC) class.
ImplPackageName-specifies and generates the bag name that continues realization and main shell (Impl and ImplW) class thereof.
StageablePackageName-specifies to generate and continues the bag name that sectional is realized (ImplS).
Constraint1 to Constraint7-specifies the top layer constraint to a class.For example " UNIQUE (name, owningMember) ".
Whether IsDisplayed-specifies need be shown to the user with class name in given user interface.
DisplayName-covers such acquiescence display name.Under default situations, class name is that any by eliminating " Cmo " prefix generates followed by the insertion space, capitalization place of lowercase then in the back.
DisplayDescription-is provided with the description that should be such demonstration.
3.Attribute Properties (attribute characteristic): can in certain kinds, add attribute for the attribute of above-mentioned fundamental type.Attribute can have the new label that is called " Cmo ", has following characteristic:
ColumnName-covers the acquiescence row name of this attribute at the table that is used for this Attribute class.Under default situations, 30 characters in front of separating the capitalization attribute-name of word boundary with ' _ ' can be the row names.
I18NConstraintName-is covered as the DEFAULT constraint name (unique if this attribute is set to) of this row interpolation _ IN table.
4.Association Properties (associate feature): association can be added between two certain kinds.Association can comprise two sides, and they are called as the role.Related itself can have the new label that is called " CBOF ", has following characteristic:
Represent multi-to-multi or unidirectional many-one relationship if RelationTableName-is related, then can add middle or " relation " table.This characteristic is set with the specified relationship table name.Under the default situations, this concerns that table name attempts to get this class name that concerns both sides and uses " TO " in the centre.If this title oversize (surpassing 27 characters) then uses the back to follow the class name initial (initial of word boundary) of the character string hash sign indicating number of this class name.
5.Role Properties (role's characteristic): the role represents a related side.An association has role side A and role side B.Therefore, if add characteristic to character object, then can add two additional labels to associate feature, i.e. " CBOF A " and " CBOF B " has following characteristic:
ColumnName-covers the acquiescence row name in this table that is associated in this association class.Under the default situations, 30 characters in front of separating the capitalization role name of word boundary with ' _ ' can be the row names.
GenerateForeignKeyConstraint-is set to " vacation ", does not generate the foreign key constraint if do not should be this related side.
ForeignKeyConstraintName-covers related this side's acquiescence foreign key constraint name.
Discuss as following, level is cut apart and be can be used as project characteristic and come to divide to be equipped with and comprise a group objects, or divides to be equipped with as class feature and comprise related object.In case all classes, attribute and relation be modeling all, code has just generated.
Also can assigned operation, and the characteristic of these operations distributed as shown in Figure 5.CBOF additive term label 501 is shown.At least two characteristics 521 can be accessed, and whether its expression generates EJB local interface and/or EJB remote interface.Title 511, value 512 all are shown and originate 513 for each characteristic.Say that more roughly local interface is followed first agreement with less expense, be applicable to reside in calling and invoked object in same web container 121 or the same bag.Remote interface is followed second agreement with big expense, is applicable to remote method invocation (RMI).The remote method invocation (RMI) agreement is for such as CORBA, JavaRMI, and MicrosoftTransaction Server, Microsoft COM/DCOM, standard and the product of Microsoft.NET Framework and Enterprise JavaBeans (EJB) provide.Exposing of expense and/or interface called in the selection control that generates local and remote interface.
Fig. 6 illustrates the CBOF model that can be used for the EJB encapsulation.With reference to figure 6, the block diagram of object-oriented framework 610 is shown according to embodiments of the invention.In alternate embodiment, object-oriented framework 610 can comprise various other assemblies or configuration, to replenish or to replace the assembly that those are discussed in conjunction with the embodiment of Fig. 6.
The useful aspect that COF/CBOF realizes comprises following combination: Rational Rose is used to set up the model of object, but is not restricted to the object model design; The code that has placeholder or dash line for the service logic method generation of customization; Produce when code comes the operation of support target and create, read, upgrade and delete (CRUD), and need not to adopt the reverse engineering of Rational Rose; Except the user states mapping parameters, with a small amount of or do not have the user alternatively to carry out object to relation (OR) mapping; Generate and continue map information so that business object is continued (persist) to relational database; Definition and establishment relation table and constraint comprise need being used to create the information of database schema and using this information creating and/or the instrument of transplanting database; Can be by one group of standard A PI straightforward procedure visit, that create, read, upgrade and delete (CRUD) when being used to move, thus can easily in this framework, create, read, upgrade and delete any business object.Use the affairs example to create, upgrade and delete one group of object that uses atomic transaction in this database.The life-span of affairs can be very long, because database also was not affected before the delivery time and has used and optimized locking.Data sementation is to change business object under the situation that is supported in the existing production version that does not influence this object, up to testing, ratify and dispose this change; Data variation is historical to be supported, comprises that the monitoring of the base attribute variation of any object is followed the tracks of; Produce code and information and create the database schema that can be used for transparent storage and save the string attribute translated of business object; Dynamically Add New Attribute when being supported in operation, and do not influence this database schema to any object; Support target changes announcement, comprise business object is configured to have in establishment, the option of the incident of upgrading or generating when deleting this object, these incidents last till database, and can manage by the event notification service, and after business object at first makes up in storer (init ()), after in inserting database (postInsert ()), after adding the affairs that are used for upgrading to (postAddForUpdate ()), in affairs, be updated to (preCommit ()) before the database, after loading from database/refreshing (postRefresh ()), before deletion from database (preDelete ()), this business object itself also can realize carrying out the method for certain action at last.
In the embodiment of Fig. 6, one group of 5 basic class is presented on the transverse axis 614, and can preferably include and enliven object class CmoBaseImpl630, basic interface class CmoBase634, basic segmentation class CmoBaseImplS638, internationalize class CmoBaseI18N642 and basic shell class CmoBaseImplW644 substantially substantially.The function of these basic classes and using in the application diagrammatically be described in by reference and merge.
In the embodiment of Fig. 6, one group of root class is presented between transverse axis 614 and the transverse axis 618, and can preferably include from the corresponding basic class of front and inherit and each root class of coming.In the embodiment of Fig. 6, the root class can preferably include root and enliven object class AbstractXImpl646, root interface class AbstractX650, root segmentation class AbstractXImplS654, root internationalization class AbstractXI18N658, root shell class AbstractXImplW662, root customization class AbstractXImplC666.
In the embodiment of Fig. 6, one group of subclass is presented under the transverse axis 618, and preferably includes from the corresponding basic class of front and root class and inherit and each subclass of coming.In the embodiment of Fig. 6, subclass preferably includes son and enlivens object class XImpl670, sub-interface class X674, sub-segmentation class XImplS678, son internationalization class XI18N682, subshell class XImplW686 and son customization class XImplC690.
In addition, in Fig. 6, above-cited interface class series is presented at the left side of the longitudinal axis 622.Shell class series is presented between the longitudinal axis 622 and the longitudinal axis 626.In addition, continue to be stored in the right side that a category in the database 120 is presented at the longitudinal axis 626.Interface is the public Java interface that exposes to this system user.The method of these interface definition acquisitions, setting, interpolation, deletion and custom service logic.The java document that these interfaces also comprise API for your guidance.Generate these interfaces, and can not manual modification, because manual modification can not allow to regenerate the code of back.
In one embodiment, these classes are with mutual as the TopLink of component software.Although the explanation of back is specific to TopLink, those skilled in the art is to be understood that identical method can be used for other Database Mapping and administration module.Lasting class is to describe the realization class of giving TopLink, as comprising the class that continues attribute and be mapped to relational database.Three kinds of lasting classes comprise Impl, ImplS and I18N.The definite effectively version of the object in the Impl class representation database.Covering or the segmentation version of effective object in the ImplS class representation database.All acquisition/setting/interpolation/delet methods of describing in interface class are all realized in these classes.All service logic API UnsupportedOperationException that all dishes out.The I18N class comprises interpretable string attribute and translation place.Impl and ImplS class and I18N class are the relations of one-to-many.No matter when call the acquisition/method to set up that to translate string attribute, all visit the suitable example of I18N class according to the current place that on thread, is provided with.Generate these classes and can not manually change.
The shell class realizes affairs support, segmentation, change histories and custom service logic function.There are two class shell classes: ImplW and ImplC.The ImplW class is a kind of abstract class, and its enforcement is from the acquisition/setting/interpolation/delet method of interface class.These methods suitably check whether retrieve or be provided with the Impl object, the value of ImplS object or their suitable TOPLink transactional replication product.Setting/interpolation/delet method CeNotInTransactionException that dishes out does not add this example if having because of the renewal in the affairs.If attempt to visit the clone's shell outside affairs, then preparation method will be dished out and be had the CeRuntimeException of " having visited invalid shell " message.When visit or create when continuing object arbitrarily, the ImplC class is the concrete class of instantiation.Such is inherited from corresponding ImplW class.The ImplC class can manual modification, to comprise the realization of any custom service logical method.The ImplW class produces fully along with regenerate at every turn.The ImplC class usually generates once, then as the personalization files that can keep and the control of adding source.Note the succession structure of ImplW and ImplC class.The ImplW class is inherited from the ImplC of its superclass.ImplC inherits from its corresponding ImplW class.Be also noted that ImplW is not implemented in the service logic API that describes in the interface class.These API are realized by the ImplC class.Class can state in model abstractively that this can make that the ImplC class is abstract.
Be also noted that continuing class can quote its corresponding shell with relevant TOPLink transactional replication product.Lasting example in the TOPLink buffer memory points to the read-only version of its shell.Duplicate points to the version write of its shell.When having provided duplicate and merge in the buffer memory example of TOPLink, it is invalid that corresponding shell becomes.The shell of duplicate can be quoted the read-only shell of its correspondence, and this can obtain by this shell being called getReadOnlyObject () method.
Need the level of basic class to describe this document group.Fig. 6 illustrates the embodiment of this basic class hierarchy.Top at figure exists 5 basic class: CmoBaseImpl630, CmoBase634, CmoBaseImplW644, CmoBaseImplS638, CmoBaseI18N642.
CmoBase634 is the interface class that all objects 332 are all inherited and realized from it.This interface comprises all necessary all base attributes implemented of all objects 332 and the description of operation.The various features of this object-oriented framework 610 comprise the attribute and the method for adding in this interface, thereby can realize these attributes and method in all objects.The approach of the object 332 that CmoBase634 is also generated by the mechanism that provides in this framework with marking.Can provide and replace class CmsBase702, as shown in Figure 7, not needing be used for the temporary object that continues.
The CmoBaseImplW644 representative comprises and will other be realized object (CmoBaseImpl, CmoBaseImplS, the realization shell object that visit CmoBaseI18N) is packed.The CmoBaseImplW class realizes the CmoBase interface.The purpose of CmoBaseImplW class is which example of determining Impl (for enlivening object) or ImplS (for segmentation object) should be called to implementation and operation.Such has 4 important relationship.LiveObject has the example of CmoBaseImpl object, mainly enlivens business object in latter's representation database.ShadowObject has the example of CmoBaseImplS object, enlivens covering or the segmentation version of business object in latter's representation database.After putting into the affairs that are used for creating or upgrade as clonedObject, this object has the duplicate of liveObject or shadowObject.When clonedObject comprises the duplicate of shadowObject when this object of segmentation (this occur in for renewal in affairs and establishment and), liveClonedObject has the duplicate of liveObject.
LiveObject has read-only shell.By add read-only shell to affairs shell can be write, this returns a new shell, comprises the duplicate of the liveObject that can be modified under the situation that does not influence other user who is just visiting liveObject.When submitting affairs to, this duplicate is used for sending renewal to database, and these variations are merged among the liveObject.Can write shell in case submitted to, this can be write shell and just die on, and must visit read-only shell (this feasible shell of can writing becomes rubbish to save storer).When implementing action arbitrarily (creating, read, visit relation and renewal), such example returns to the user.
The active object that continues in the CmoBaseImpl630 representation database.Such comprises the characteristic of controlling object and relationship map.This information allows establishment to comprise table, is listed as, constrains in interior form.Such is included in the attribute that defines in the object model, comprises the attribute of representation relation (or having the single-relation of this object type or many relations of employing aggregate type).Such also realizes CmoBase interface 634.Implement obtaining and being provided with of attribute and relation, to visit relevant attribute or relation.Other service logic methods (describing in model) UnsupportedOperationException that dishes out prevents cold call to this method.Have only the ImplW class should visit such, and it should not call any service logic method to the Impl class.
CmoBaseImplS638 is exactly the duplicate of CmoBaseImpl class in essence, but represents covering or " segmentation " value of Impl strength.These fragmentation values are stored in the independent table, and are independent examples, therefore provide an independent class to represent and have been mapped to this segmentation of table separately.The use of CmoBaseImplS638 is also being discussed in the application that merges by reference.
CmoBaseI18N642 is the basic class that is used to internationalize and supports.Such has all and has the base attribute that the table that can translate string value all needs.When the Impl of formation object time-like, the inner classes of coming from the CmoBaseI18N642 succession also is generated, and can translate string attribute if such has.The example of CmoBaseI18N642 is corresponding to the language translation of the string attribute translated of Impl class.For the fragmentation value of this translation provides additional example.The translation tabulation is kept at each level of class layering.This makes can add at any time/delete can translate string attribute, and need not the hierarchy of CmoBaseI18N class and table.These features are recorded in by reference and in the application that merges in more detail.
When formation object (for example AbstractX646), the class that is generated has been expanded suitable basic class.As shown in Figure 6, AbstractX646 inherits and next interface from the CmoBase basic interface.AbstractXImplW 662 inherits from CmoBaseImplW 644.AbstractXImpl 646 inherits from CmoBaseImpl 630.AbstractXImplS 654 inherits from CmoBaseImplS 638.In addition, owing to there is the string attribute translated of AbstractX, AbstractXI18N 658 inherits from CmoBaseI18N 642.
Also have another customization class that is called AbstractImplC 666, it is inherited from AbstractXImplW 662.The ImplC class comprises the business logic codes specific to the user of the service logic method that is used for adding to the model interface.This allows ImplC can only generate once, can only upgrade when needs interpolation, change or deletion business logic codes then.The type of other class (interface, ImplW, Impl, ImplS I18N) always regenerates from object model 320 when each model changes.This has solved and has generated the code that needs manual customization to need the change of reverse design in the model arbitrarily, realizes but also allow to write the service logic that can change along with the past of time.The code that is generated just can use under the situation that can write the code among the ImplC.ImplC provides the place for the service logic method specific to the user to be achieved.
In addition, Fig. 6 illustrates another class that is called X and how to further expand the AbstractX class.Each of X generates the type of class and all inherits from the suitable class type of AbstractX.Yet XimplW686 inherits from AbstractXImplC666, thereby the enforcement of XimplC686 can cover any service logic method of AbstractX class, just look like such be that direct subclass is such.One aspect of the present invention is automatically to handle to be used to manage the succession structure that concerns between these classes and the complicacy of code.On directly perceived, the user only need be concerned about that the object of visual modeling and the business logic codes among the ImplC realize.
Fig. 7 illustrates the class CmoBase701 that is used to support EJB and J2EE, CmsBase702, the class figure of the aspect of CmoAttribute703.Continue, the modifiable object of user inherits from CmoBase701.But a lot of attributes can be interim and can not be changed by the user, so their quiescent value can be distributed to the work duplicate of the object of creating in the storer.These interim attributes can be inherited from CmsBase702, and the latter has and is applicable to provisional characteristic and attribute.Lasting, user in the attribute level can change object and comprise title, description, version maximum number, notice behavior.CmoBase class 701 comprises main key word, i.e. " id " that generates automatically.ID is unique to the delegation in a DB and the type.Therefore, be connected database identifier, type and id field with the unique ID of the overall situation fully.The unique identifier of this connection satisfies the requirement of the current EJB2.0 of unique ID.The level that the unique identifier that connects also is used for discussing is below cut apart, because the ID among the CmoBase701 only guarantees that be unique in a database and type.The adeditive attribute of CmoBase701 comprises shown state, versioned and segmentation attribute.As shown in figure 10, structure is inherited or corresponding to such CmoBaseLocal and CmoBaseRemote class from CmoBase.CmoAttribute703 supports to be the object custom attributes, as by reference and described in the application that merges.
The COF instrument is shown Fig. 8-10 and model is used for EJB and J2EE supports.Preferably, the business object interface in the system should expand from the javax.ejb.EJBLocalObject1013 of Figure 10.This mode of extension provides on the EJB object that moves in same Java Virtual Machine device (JVM) and has called the approach of method, and can not cause the expense relevant with remote access.Each need be required title identical with local interface and be placed on " ejb " independent interface under wrapping by remote access business object.Remote interface has been expanded avax.ejb.EJBObject1012 and only comprised can be by remote access method.Except local and remote interface, the ejb explanation needs the family expenses interface to create and find the ejb object, as shown in Figure 9.Each business object has the local family expenses interface 912 of expansion javax.ejb.EJBLocalHome911 and the remote domestic interface 902 of expansion javax.ejb.EJBHome901.
The bean class that comprises the code of implementing service logic is named by docking port title interpolation suffix " ImplC " usually.For example in Fig. 8, PersonImplC842 and EmployeeImplC862 are the objects that is intended to comprise corresponding to the service logic of Person and Employ interface 821,841.Not that all operational approaches in " ImplC " can remote access.But parameter and the rreturn value of remote method by nation method is set to serializing (must do like this in order to meet EJB) and implements.In order to realize this point, framework generates in the place that can implement additional long-range operational approach has the class of suffix " Bean " (for example PersonBean).Except service logic enforcement is provided, also implement a plurality of answers specific to EJB.These javax.ejb.EntityBean interfaces 1011 of answering by implementing in the CmoBaseImplW class (644 among Fig. 6) offer lasting object.Be used to provide the answer of EJB function to comprise ejbCreate (), ejbPostCreate (), ejbFindByPrimaryKey (PrimaryKey key), ejbLoad (), ejbStore (), ejbRemove (), ejbActivate (), ejbPassivate (), setEntityContext (EntityContext ctx) and unsetEntityContext ().In these are answered, when calling create () method on the family expenses interface, client computer calls ejbCreate () method.EJB (Enterprise Java Bean) container is created the example of bean (ImplC class) and call ejbCreate () method on this bean.Enforcement should provide method to be used for: obtain or create CmoTransaction; Add this bean to these affairs; Initialization shell object; Allocate object ID in advance; Submit affairs to; Return the PrimaryKey object.Need this method that overloads under many circumstances, so that intrafascicular approximately by initialization object parameters needed in the non vacuum data storehouse.
This container calls ejbPostCreate () method immediately after calling ejbCreate () method.This method should and ejbCreate () have the argument of as much, and additional initialization is provided and is distributed in the resource that needs in its life-span.
When calling findByPrimaryKey () on the family expenses interface, client computer calls ejbFindByPrimaryKey (PrimaryKey key) method.This realization should provide method to be used for: indication does not need affairs; In database, find this object (adopting CmoClientSession.findById () method) according to object id; And return the PrimaryKey object.This method needs overload to custom-built query.
EjbLoad () answer method is roughly corresponding to " reading " function of entity bean.Among the embodiment aspect realizing the present invention, during create () or find () method, adopt TOPLink OR to shine upon this bean of initialization usually, so this method can be used for some post-processing operation.
EjbStore () answer method is roughly corresponding to " renewal " function of entity bean.This function has been encapsulated among our CmoTransaction, except CmoTransaction need to be activated and this object need to be added to this fact in these affairs in order upgrading.
EjbRemove () answer method has been deleted this object from Data Store.CmoTransaction is activated and adds in this object for deletion.
During activating processing, the ejbActivate () method on the bean example is called, and EjbLoad () method is followed in the back.In case bean is activated and its state is write down synchronously then operational approach continuation by appropriate with underlying database.Anyly subsequently calling of this operational approach all directly entrusted to the bean example.
EjbPassivate () uses between deactivation period.During Passivation Treatment, container calls ejbStore () on the bean example.The Bean example is responsible for more new database.Behind database update, container calls ejbPassivate () method on the bean example, allows oneself have an opportunity to discharge any resource that before had been assigned with before passivation bean.
During the bean initialization, call setEntityContext (EntityContext ctx) method with the linguistic context of bean.This linguistic context is stored and is used for application in the future.UnsetEntityContext () replenishes this linguistic context is set.If container decision discharges the resource of being used by bean, then container can resemble and collect the bean that collects merging the rubbish, and affairs can be returned non-existent state in this case.In this conversion method, container calls this method.This method discharges any resource of being used by this bean.
The CBOF object model that Fig. 8 illustrates compatible EJB is applied to personnel and employee's simple object, and it has local and remote visit and interface.Person821,824 and Employee841,834 objects implement from EJBLocalObject811heEJBObject814.Visit enforcement support this locality, that reduced expense of native object.The remote object visit is supported in the enforcement of EJBObject.The standard feature of native object is inherited from CmoBase812, as mentioned above.In Fig. 8, suffix ImplW and ImplC are used for shell and create and implement.EntityBean813 implements by CmoBaseImplW822.The enforcement of Person821 and Employee841 object is inherited from CmoBaseImplW822.These enforcements comprise PersonImplW832, PersonImplC842, EmployeeImplw852 and EmployeeImplC862.Discuss in the context as Fig. 9, for local and remote interface provides two family expenses object EJBLocalHome853 and EJBHome833.The enforcement of these family expenses objects comprises PersonLocalHome863, and PersonHome 843, EmployeeLocalHome 864 and EmployeeHome 844.
Fig. 9 has summarized the part of Fig. 8, and illustrates and need to give the example of the conventional EJB compatibility in a residence of object.Provide the place for long-range respectively with native object and interface 901,911.Each business object has the remote domestic interface 902 of having expanded javax.ejb.EJBHome 901 and the local family expenses interface 912 of having expanded javax.ejb.EJBLocalHome 911.Long-range and local family expenses interface 902,912 is also expanded by CmoApplicationConfigRemoteHome 903 and CmoApplicationConfigLocalHome 913.
Figure 10 has also summarized the part of Fig. 8, and the additional mechanism of supporting EJB is shown.Object javax.ejb.EJBObject1012 and javax.ejb.EJBLocalObject1013 expand to CmoBaseRemote1022 and CmoBaseLocal1023.
The relation of EJB inter-entity is supported in the EJB2.0 explanation.3 fundamental relation radixes (one-to-many and multi-to-multi one to one) are all supported.In addition, can adopt the new query language of EJB2.0 explanation to handle these relations.Relation can be managed by abstractions device method.Diversity at related object is that the parameter of abstractions device or rreturn value type are to represent the collection class of this relation in the relation how.This collection class is implemented java.util.Collection or java.util.Set interface.Optionally, these explanations can be added java.util.Map and java.util.List as return type.In the diversity of collection class was one relation, the parameter of abstractions device or rreturn value type were the single-instances of relevant object.
Relation visitor among the COF has as the parameter of corresponding objects array or rreturn value type.In order to make them to be visited by ejb, the addition method of relation should be provided in remote interface and in ImplW, implement by remote interface.For example, Employee To Address Relationship can be one-to-many and be two-way.Local and remote method may be embodied as the relation of crossing, as Employee To AddressRelationship example.For example, nation method can comprise: public Address[] getAddresses (); Public void setAddresses (Address[] address); Public voidaddAddressElement (Address address); With public BooleanremoveAddressElement (Address address).Remote method can comprise and can comprise: publicCollection getAddressesRemote (); Public void setAddressesRemote (Collectionaddress); Public void addAddressElementRemote (Address address); With publicBoolean removeAddressElementRemote (Address address).The objectId tabulation of all address objects relevant with the Employee object is obtained in the support of getAddressesRemote () method.Can adopt CmoQueryCursor mechanism, because do not need to cushion any address object.Therefore, be created from CmoQueryCursor new class expansion, that be called CmoObjectCursor, to support the long-range indication of EJB example.This method support utilizes the remote domestic interface to find or creates the ejb object, and they are stored in the set.This method is returned the set of ejb object.Corresponding ejb object is created or found to the local family expenses interface of setAddressesRemote (Collection address) method support utilization.This method with object storage in array.The nation method of this method call correspondence upgrades.
The affairs support is the important basic service that is provided by the J2EE platform.This declarative description JavaTransaction API (JTA).JTA provides the interface of visit bottom task manager.Some main interfaces comprise: javax.transaction.UserTransaction and javax.transaction.TransactionManager.UserTransaction exposes to application component, and the bottom between J2EE server and the JTATransactionManager is transparent to this application component alternately.TransactionManager implements the control of back-level server to (container is distinguished) transaction boundaries.The affairs support of JTA TransactionManager and JDBC all is available concerning the J2EE application component.The J2EE platform is supported two kinds of transaction management examples: the statement sexual behavior is engaged in distinguishing and planned affairs are distinguished.In the differentiation of statement property, container is responsible for startup, submission and rollback affairs.Container all starts affairs to user's each operation on bean.Client computer can be obtained the JTA affairs and carry out some operations in the affairs.The dirigibility that this will provide reinforcement to have dependent certain service logic between operation.Transaction attributes support statement sexual behavior is engaged in distinguishing, and the planned transaction behavior of passing on relevant EJB assembly method to container.
The affairs of Container Management are distinguished support 6 transaction attributes: Required, RequiresNew, NotSupported, Supports, Mandatory and Never.Method with Required transaction attributes is carried out in the JTA affairs; According to circumstances, can maybe cannot create new affairs linguistic context.If invocation component is related with the JTA affairs, then container will be invoked at the method in the described affairs linguistic context.If there are not affairs related with invocation component, then container will be created new affairs linguistic context automatically, and attempt to submit to when this method is finished this things.Carry out in new affairs linguistic context according to the method that the RequiresNew transaction attributes is arranged.If invocation component is related with the affairs linguistic context, then create new affairs linguistic context, this method is carried out in new affairs linguistic context, restarts the affairs of this invocation component after this method is finished.Method with NotSupported transaction attributes is not the part of affairs.If invocation component is related with the affairs linguistic context, then container suspends this affairs, calls not related with affairs method, and restarts the affairs of invocation component when this method is finished.Method with Support transaction attributes is supported the transaction status of invocation component.If invocation component is without any the affairs linguistic context, then container will be carried out this method, just look like its transaction attributes be NotSupported.If invocation component is related with the affairs linguistic context, then container will be carried out this method, be Required as its transaction attributes.Method with Mandatory transaction attributes is called from the affairs linguistic context of this invocation component.Otherwise, the container javax.transaction.TransactionRequiredException that will dish out.Method with Never transaction attributes never should be called from the affairs linguistic context of invocation component.
It is the hard code of the transaction management in the application code that planned transaction is distinguished.Planned transaction is distinguished Session EJB, and servlet and Jsp assembly are feasible options.Planned transaction can be JDBC or JTA affairs.For the Session EJB of Container Management, can (although not recommending) mix JDBC and JTA affairs at all.
One aspect of the present invention is can the segmentation production data.In order to separate the problem that never in database, repeats work, in the database that fragmentation value is stored in effectively production value is identical of an embodiment with these data.But, in the table that this fragmentation value should not be present in effectively production value is identical.If segment data is in identical table, then Biao performance and size all can be affected.Therefore, need the object of segmentation ability, can have two tables in the database for each.Owing to need add list then, so the OR mapping tool needs another java class to represent this table.For the Impl class of sectional, there is corresponding ImplS class.Because class formation and OR mapping is handled in establishment together automatically with sheet format, therefore need the effort of interpolation add list and/or class in fact to be reduced.
Copy in the new object existing object properties normally very direct simple.But, the change that segmentation also concerns between the support target.In order to support all segmentation features, need the definition several rules:
1. active production object instance can be quoted its fragment instance.Can only be at certain time object by segmentation once (in other words, the relation between this object and its fragment instance is man-to-man two-way privately owned relation).
2. in case, just can not revise its effective example with object fragments.If can change this effective example, the variation and the effective value that then need to carry out in the fragmentation value merge.Usually, variation need be by segmentation or is directly revised enlivening on the object, can not the both carry out.
3. relation is at effective example, rather than at fragment instance.Otherwise, a lot of relationship map just must obtain managing (effectively to segmentation, effectively to effective, segmentation to effective and segmentation to segmentation).In addition, on the contrary when object from segmentation change to effectively or, only need manage this variation at the relation of this object.This rule simplifying these problems.In addition, the effective example that is cited can segmentation, and quotes its fragment instance, has therefore in fact still supported various relations, but has not been direct.
4. the segmentation variation must be the part of sectional project.The method of managing set of segmentation variation is that they are combined in the same container.The sectional project is followed the tracks of all objects of segmentation.Can dispose this project then and be used for test, or delete it.
5. can only be once at certain time object by segmentation, and be the part of single sectional project.Management merges and does not generally also need.
Support one-one relationship in segmentation table because above-mentioned regular #3 is easily.All relations all refer to effective example, and the segmentation tabular that therefore points to another object only need point to effective example of this another object.Relation table in the middle of many-one relationship must be used is even this relation is two-way.This has prevented to enliven Object table must understand any relation with fragment instance.
Many-to-many relationship also has the middle relation table that fragment instance is linked to effective example.Relation tables must be with existing to enliven the object relationship table different in the middle of these.If many-to-many relationship is two-way, then need to create two middle relation tables, one is used for each direction.This is because this relation can be from either party of this relation by segmentation, and has different values.The additional relationships table generates automatically and effectively.
Other aspects of the present invention are to cut apart in the level in middle layer, as being that database layer is relative with so-called reserve office.Figure 11 briefly shows level and cuts apart.In this embodiment, object model comprises that assembly 1 (1101) is to n (1102), account 1102 and BI1104.Assembly 1 is mapped to main 1111 databases, and the latter is single database.By being cut apart by level between database, assembly n is mapped to master 1111 and main 1112 databases.Assembly n can be a single object or a group objects.Be used to wrap and specify this group objects is carried out instrument that level cuts apart may be of great use.Described this instrument that is used to be provided with project characteristic above, and be very familiar for the user of Rational Rose.Perhaps, can be provided for object is distributed to one or more groups, then the group default properties can not be capped or the instrument of group global property is set.In any one embodiment, make a group objects be subjected to (or not being subjected to) level as the result of single setting and cut apart and be usefulness very.The mapping of assembly 1...n can be disposed by database description in this embodiment.The table of finishing such as the user or the illustration method of user readable (for example XML) configuration file can be used to specify the logical name of database and/or the logical name of database is connected with group of objects with object.In this embodiment, account and BI have been mapped to safety 1113 and BI1114 database respectively.
Be supported in the middle layer and carry out the class that level cuts apart and be applicable to and the interface of database or data basic structure, be applicable to interface in this example with TopLink.Figure 12 illustrates and can be used for the class cut apart at the middle layer carrying out horizontal.This figure begins to be easy to allow the people understand with CmoServerSession1221 on left top.The database that this object has this basic structure to be needed connects and information.Because the logical identifier of database is static, so this object can have static data and static method, and can be shared by a plurality of users.CmoSystemSession1231 can obtain from server session 1221.Only need create single system session object for server, CmoClientSession object 1241 has at each user's of this server linguistic context and status information.This object has the information specific to the user, for example user's locality and registration.Keep being similar to the status information of the status information that keeps into http session.Method getDb and setDb are used to be provided with language ambience information.Client session can relate to the plurality of data storehouse.The #dbClientSessions that concerns between client session 1241 and any alive data storehouse session 1242 is the 0...* relation.It is effective not having the database client session when obtaining client session.Between the lifetime of client session, a lot of database client sessions can become effective.
The data that CmoTransaction 1251 target caches in the figure will be cut apart by level.The role of CmoTransaction is the state that keeps affairs, comprises the affairs that the life-span is very long, till these affairs are ready to submit to.Owing to compile this affairs, therefore collect and allow new or amended object to belong to the information of the decision of which database.When these affairs were ready to submit to, it can be submitted to by one or more examples of CmoDatabaseTransaction 1252 in one or more databases.
Level is cut apart support, comprise that middle column object 1212,1222,1232,1242 and 1252 can add the existing arrangement of base interface 1223,1243,1253 to and the session 1221,1241,1251 that exposes in, but and can not change the mode that these sessions expose or change the object operation service logic that these sessions expose.For example, level is cut apart the automaker F and the G that can be used to support two use same code and software.All data that are used for F can for example be split into oracle database, and the data of the G that is useful on can be split into SQL database.In case for example be provided with linguistic context F or G when the user logins, cutting apart concerning system of data is exactly transparent.All carry out at oracle database calling all of F data, and all carry out at SQL database calling all of G data.Can use identity logic, and no matter this data, services provides to F or G.Implement the code of service logic even can be shared, because have only linguistic context that the data of just identification or differentiation F and G are set.The data of cutting apart meeting isolation client on this grade.Less database can be by more efficiently processing.Even in reserve office is the database server level, the search that F carries out also will never be considered the data of G.Can be from more than return data the database with the mixing of SQL, QL or other data base querying code, this can reduce the chance that a client obtains to visit other customer datas.This is particularly useful in race condition, for example when some assembly of lawyer's shared data bank of plaintiff and defendant but wish their work product strictness is kept apart, perhaps use the service and the service supplier that have added identical value to wish to guarantee that two clients' (rival) data are all very safe as the rival.When client's data and other client kept apart, the periodic maintenance function can be finished by the system manager of repeat specification in a plurality of client's linguistic context.
Middle column object 1212,1222,1232,1242,1252 is supported based on linguistic context a plurality of access of database, the example that the level of wherein a plurality of database storing same object is cut apart.CmoDatabaseServerSession object 1222 exists for each active data storehouse on server.The identification of logic is to CmoDatabaseServerSession object 1222 by logical name for database, and the key attribute dbName that this logical name can be used as this object is keeping.The getAllVersions method is supported version management.This method can be returned the version or the format version of the object in database.The code of the code of accessing database or this database of granted access should check that version is compatible.CmoClassConfiguration object 1212 is connected to database with object.Addressable object in CmoClassConfiguration object 1212 representation databases.CuDatabaseConfig1232 has the physical database configuration information corresponding to the logical data base title.This information can be used for being provided with according to linguistic context a plurality of physical databases is connected to a logical name.CmoDatabaseServerSession object 1222 is connected to basic object ServerSession 1223 by the #serverSession relation.CmoDatabaseClientSession1242 considers the linguistic context of this client computer (F in this embodiment or G) simultaneously with the session of basic object ClientSession1243 administration client.
Again visit the operation of CmoTransaction1251, when being ready to submit affairs to, CmoTransaction calls CmoDatabaseTransaction1252 with suitable linguistic context setting.CmoDatabaseTransaction1252 connects the UnitOfWork among basic object 1253, for example TopLink, to handle one or the submission of two stages of this object.
The submission of two stages is a kind of transaction protocol that changes in a plurality of physical datas of submitting to atomic way.In one embodiment, the component software of supporting for two stages submitted to comprise that distribution affairs in Application Server based on the JTS App Server of J2EE1.3 compatibility (any with), the JDBC driver (for example Opta2000 and Seropto) are supported and database in the distribution affairs of (for example SQL Server and Oracle) support.COF and COF/EJB use TopLink to support to carry out the affairs fusion with task manager (being provided by the J2EE application server usually) based on JTS (service of Java affairs).The use that two stages submitted to is an option.The cost that two stages submitted to is very big, therefore only uses when needed.Common two phase commit transaction of using of user's business that influence a plurality of objects and cross over a plurality of physical databases.When EJB object and COF object need be submitted in affairs, the submission of two stages was suitable.Object that this agreement can be cut apart with COF object, level and EJB object any combines use.
Attention level is cut apart and is not depended on that it still is to be encapsulated in EJB or the encapsulation of other remote method invocation (RMI) that COF or another agreement are directly used.The level of middle layer encapsulation process between self contained data base cut apart, and do not rely on database manager.This level that can be cited as loose coupling is cut apart, because self contained data base even can be and the incompatible database of disparate databases supplier.
Less relatively service logic or system code also need to change, so that cut apart with level.Some primitive rules are listed as follows.
1. if in configuration file, have only a database to use, this means that the value of characteristic " database.projects " is single, then this database will always be used.
2. if there is a more than database in the configuration file, clear or analytical database information vaguely when executable operations then.The clear analysis meaning is to call " setDb (CuDatabaseConfig) " on CmoClientSession object and/or CmoTransaction object.The CuDatabaseConfig object is created when system start-up usually.Be used to total system to obtain the tabulation of availability database object.For certain kinds, " CmoServerSession.getDbObjectsForClass (Class aCLass) " and " CmoServerSession.getDbObjectsForClass (String aCLassName) " returns the tabulation of " class " resident CuDatabaseConfig object.The fuzzy analysis meaning is which database CmoClientSession and/or CmoTransaction object can find handled cleverly and need not to call especially " setDb (CuDatabaseConfig) " in application code, and is as described below.
3. when data message can not be known analysis on CmoClientSession and CmoTransaction object, session object attempted to adopt all related objects to analyze this information.If related any object has some database informations (non-NULL), then the database information of this information and correlating sessions object compares.If the database information that is used for session object is for empty, then this database information is set to the data message from this object; This information difference then provides unusual else if.This logic all continues all related objects.Be used to operate and/or the database information of things in order to help to discern, COF has introduced new interface " CmoDbConflictResolver ".It is a project configuration CmoDbConflictResolver object.This can be at key word: carry out in the configuration of database.Conflictresolver.{full class name of project}={fullclass name that implements CmoDbConflictResolver interface}.
4. the in the end possible moment is called analyzer, and the meaning is if create object, then can not call this analyzer before attempting to submit this object to.This means that analyzer can estimate that all properties of this object all is for establishment is provided with, and they can be used for determining which database this object should belong to.
For situation about finding, by expression or attribute query or best property of attribute mapping inquiry, thereby which data base querying analyzer can be determined at based on the attribute of just being inquired about.We never are supported in searching across data bases in the single inquiry.The object that only ought also not call setDb on clientSession and just inquired about has been configured to be present in more than just doing like this in the database.
The approach that can realize CmoDbConflictResolver is to use some configuration informations or other to illustrate that some object properties values are mapped to specific physics database dynamic data.This should be simple as much as possible.For example, use the id that organizes of this object to determine to name which database or which database, thereby this is a single mapping based on orgId.These database-names are " logic " titles, are to determine to be used for when configuration/installation to title of database with such as the configuration information of its position etc.Therefore, so the title that we use is logical name, and the database-name that visits of representative configuration, rather than the actual physics database name in data system.
On client session, can obtain 4 functions and come the control data library information.They are: setDb (CuDatabaseConfig); GetDb (); OverrideDb (CuDatabaseConfig); ResetDb ().GetDb () only returns the current database that is arranged on the clientSession object; OverrideDb (CuDatabaseConfig aNewdb) and resetDb () use storehouse mechanism to follow the tracks of the variation of the database information on the clientSession.OverrideDb (CuDatabaseConfig aNewdb) pushes storehouse with current db, and current db " aNewdb " that be set to enter.If the storehouse non-NULL, then the current db of resetDb () is set to the top element of storehouse; Otherwise do not do anything.The current db of setDb (CuDatabaseConfig aNewdb2) is set to " aNewdb2 " and empties storehouse.Therefore, if call setDb () when storehouse has some information, then storehouse just is cleared.System users chance words object as particular client chance words uses these 4 functions to each thread basis.Therefore irrelevant at database information on the thread and the database information on another thread.
OverrideDb (CuDatabaseConfig) and resetDb () function can not be called on CmoTransaction, although this is the subclass of CmoClientSession.
CmoDbConflictResolver API comprises: public CuDatabaseConfigresolveCreate (CmoDbResolverinfo aDbResolverInfo) dishes out CeDbNameConflictResolveException; Public CuDatabaseConfigresolveFind (CmoDbResolverinfo aDbResolverInfo) dishes out CeDbNameConflictResolveException.CmoDbResolverinfo API comprises: publicCmoClientSession getClientSession (); Public Class getMainclass (); Public HahMapgetAttValuePairs (); Public CmoFindObject getFindObject (); Public CmoBasegetNewlyCreatedObject ().
After the class of having developed enforcement CmoDbResolverinfo interface, the getNewlyCreatedObject () in CmoDbResolverinfo can be used for helping to implement resolveCreate (CmoDbResolverinfo); Equally, getAttValuePairs () in CmoDbResolverinfo and/or getFindObject () can be used to implement resolveFind (CmoDbResolverinfo).
From foregoing description, it will be apparent to those skilled in the art that various system and methods can make up from aspect of the present invention and part.An embodiment is one embodiment of the present of invention, comprises the method that generates the application development code.This method can also be embodied as system or the device of carrying out this method step in addition.This system or device can comprise some embodiment, have made up step, aspect, option and the alternative embodiment of this method.This method can also be embodied as the magnetic medium that is carved with the program of carrying out this method step.The generation of exploitation code particularly can be used for the professional applied environment of encapsulation of multilayer.This method is based on the model of object, relation and the operation of OO application programming.Can adopt graphical tool and realization visually to the modeling of these objects, relation and operation.The characteristic of distributing to object, relation and/or operation can comprise whether expression generates first characteristic with the interface of modeling object.Comprise also whether expression generates and this locality of assigned operation and/or second characteristic of remote interface.From this model, generate machine-readable data corresponding to this model and characteristic thereof.These data can realize in inner model or output model.This model can also be discerned by the mankind by machine recognition.Machine-readable data is used for model is mapped as database.In one embodiment, database is a relational database.Adopt mapping and machine-readable data to generate the application development code.The application code that is generated can comprise the code that continues object in the accesses database.The interface that can also comprise the code of object in this lasting accesses database of exchange.This is consistent with first characteristic.Can also comprise and the interface of assigned operation that this is consistent with second characteristic.With the interface of described code and assigned operation in fact can with the component model and the remote method invocation (RMI) protocol-compliant of measured server end.Substitute, the application development code can be in fact with Enterprise JavaBean (EJB) standard 2.0 or upgrade edition compatibility.Continue and the code of visit EJB object can be in fact with continue (BMP) protocol-compliant by the bean management.Substitute, the application development code can be in fact compatible with the DCOM explanation of Microsoft.In another aspect of this invention, OO Application Design can be in fact and unified modeling language (UML) operating such.
An aspect of application and development code method comprises the method fragment that generates interpolation custom service logic.In order to realize this aspect of the present invention, the code that generates when modification is used for the OO model of system is kept apart with the code that comprises the custom service logic, and should not be capped or regenerate when revising OO model.
Another aspect of the present invention also comprises a plurality of the 3rd characteristics of object and relation, the 3rd Characteristics Control mapping step.These characteristics are used for object and relationship map are the underlying database such as relational database.These the 3rd characteristics can comprise the segmentation of whether supporting the configuration of modeling object.The change histories that also comprises the configuration of whether writing down modeling object.Comprise that also one or more fields in the Dynamic Array modeling object whether are with these fields that internationalize.Interrelate with the aspect that the present invention relates to the Dynamic Array field, code lasting and the visit modeling object can be analyzed which element of retrieving Dynamic Array based on appointed language.This language can be specified by existing data in the just processed object are fuzzy, or specifies by language is clear.
Another aspect of the present invention is that the user can specify which application code of generation, and generating machine-readable data, mapping and the additional method step that generates can continue under the situation of the further action that does not have the user.
Another aspect of the present invention is that a kind of set is supported the method for the affairs that the database manager of issued transaction is handled by at least one.Replace, this method can be implemented as system or the device of carrying out this method step.This system or device can comprise some embodiment, have made up step, aspect, option and the alternative embodiment of this method.This method can also be embodied as the magnetic medium that is carved with the program of carrying out this method step.The object oriented framework of the method for the issued transaction support visit that provides by database manager and duration data can be provided this method.In addition, also provide in fact and the component model of measured server end and the object oriented framework of remote method invocation (RMI) protocol-compliant.The example of the component model of measured server end and remote method invocation (RMI) agreement comprises Enterprise JavaBean (EJB), distributed Common Object Model (DCOM) and CORBA.The method of set affairs can also comprise accept or buffer memory at the activity relevant of one or more databases with affairs.This acceptance or buffer memory can be simultaneously compatible version by OO framework and this OO framework carry out.The aspect of this embodiment is to accept step can comprise cache object, and when affairs were submitted in indication to, this method comprised that also calling database manager comes processing transactions.This aspect comprises by the mechanism of non-database manager accepts the activity relevant with affairs.This aspect of the present invention can realize with above-mentioned any standard, comprise EJB, DCOM and CORBA.
Other embodiments of the invention are that a kind of set is supported the method for the affairs that the data management system machine of issued transaction is handled by at least one.As mentioned above, this method can also be embodied as method, installs or comprise the magnetic medium of the program of this method of enforcement.The replacement method of this embodiment is the approximate distortion of above-mentioned collection approach.The object oriented framework of the method for the issued transaction support visit that provides by database manager and duration data is provided in a kind of distortion.This method also comprises providing and is applicable to and the processing of EJB operating such and the object oriented framework version that calls.This method also comprise simultaneously by object oriented framework with the object oriented framework version of EJB operating such accept relevant with affairs, at the activity of one or more databases.In other two distortion of this embodiment, object oriented framework is applicable to and DCOM or CORBA compatibility.In any one distortion, the thing of acceptance may comprise cache object and call database manager and handle this affairs when submitting affairs to.
Another embodiment makes the lasting method of being handled by at least one database manager of data.As mentioned above, this method can also be embodied as method, installs or comprise the magnetic medium of the program of this method of enforcement.The object oriented framework that provides by the method for database manager visit and duration data is provided this method of duration data.Also comprise the method that provides by data management system visit and duration data, and the interface of operating such.The interface of these and operating such can with EJB, DCOM or CORBA compatibility.This method also comprises simultaneously to be accepted to ask with continuing at the object accesses of one or more databases by object oriented framework with the interface of operating such.When standard was EJB, object requests can be submitted to Java affairs service-Engine by OO framework with the interface of EJB operating such.
The aspect that can be used for any the foregoing description of the present invention is that object oriented framework is applicable to that the object with precision lasts till database.With the interface of operating such, comprise and the interface of EJB operating such, be applicable to the object in the affairs is lasted till in the more than database.
Another embodiment of the present invention is that set will be supported the method for the things that the database manager of issued transaction is handled by at least one.As mentioned above, this method can also be embodied as method, installs or comprise the magnetic medium of the program of this method of enforcement.Issued transaction support visit and the method for duration data and the object oriented framework of the method for implementing additional function that provides by database manager is provided this method.This additional function can be in order to test and to add production system to and with object fragments.This additional function can also be the change histories of tracing object in production system.Perhaps, can be in object, field to be carried out Dynamic Arrayization with these fields that internationalize.These additional functions can make up in pairs or all.The object oriented framework version that provides in addition in fact with measured server-side component model and remote method invocation (RMI) protocol-compliant also is provided the method for set affairs, and this version also comprises one or more above-mentioned additional functions.Independent embodiment comprises combination and whole 3 additional functions of single additional function, paired additional function.The standard of the compatibility of the present invention of set affairs can be EJB, DCOM or CORBA.
Another embodiment of the present invention is a kind of method of the multilayer service application that generates database and cut apart by level.As mentioned above, this method can also be embodied as method, installs or comprise the magnetic medium of the program of this method of realization.This method comprises object and relationship modeling, and the operation of specifying the object-oriented Application Design, and wherein this Properties of Objects comprises whether level is cut apart the object of striding a plurality of databases.This method can be applied to object or group of objects.Group of objects can be represented by a logical name.This method also comprises the machine-readable data of generation corresponding to model, comprises characteristic.This machine-readable data can also be discerned by the people by machine recognition, as the XML explanation.This method also comprises the database that model is mapped as a plurality of these machine-readable datas of use, and generates the application and development code in addition from this mapping and machine-readable data.This application and development code comprises the code that continues and visit the object of striding a plurality of databases.Code lasting and access object is the part of the interlude layer on database layer.Another aspect of the present invention is to continue can call a plurality of self contained data bases with the code of access object.These self contained data bases can be provided by different database suppliers, also can independent operating although perhaps provided by a database supplier.This embodiment can comprise the database that a plurality of cutting objects thereon are described on the other hand, and one or more fields that are used for object or group of objects are divided into certain database are described.
Another embodiment of the present invention is a kind ofly to stride the method that a plurality of self contained data bases come horizontal cutting object in comprising the multilayer service application of database layer and intermediary service application layer at least.As mentioned above, this method can also be embodied as method, installs or comprise the magnetic medium of the program of this method of realization.This embodiment is included in the one or more fields that can be used for special object is assigned to certain database of explanation at least one object of being cut apart by level.This method comprise set up with a plurality of objects of being cut apart by level under being connected of database, although all databases under the object that does not need and cut apart by level connect.Before or after connecting, this method comprises the one or more objects that find, create or remain to be found or create of remaining of buffer memory, comprises the object of being cut apart by level.When finding or create, utilize the field of explanation to analyze certain database under this object, and call this certain database in the database layer, find or create with execution.Similarly embodiment is a kind of method that a plurality of self contained data bases come horizontal cutting object of striding, comprise set up may be affiliated with at least one object of being cut apart by level being connected of a plurality of databases.In addition, be provided with or object that the identification level is cut apart under certain database.Before or after step was set, buffer memory is one or more to remain the object that finds, create or remain to be found or create, comprises the object of being cut apart by level.When finding or create, call this certain database in the database layer and find with execution or create.A plurality of databases under the object of being cut apart by level can be marked with a logical name jointly.Employing is come certain database in a plurality of databases of logical mappings by one or more attributes of horizontal cutting object.These attributes can be the fields of this horizontal cutting object.
Though, be appreciated that these examples are unrestricted for explanation by disclosing the present invention with reference to preferred embodiment and above-mentioned example.Area of computer aided is handled and is implicitly included among the described embodiment.Therefore, the present invention can also be implemented in method, the system that comprises the logic of implementing this method, the medium that is carved with the logic of this method of enforcement that are used for area of computer aided and handle, the data stream of logic or by the processing service of computer access with this method of enforcement.Those skilled in the art may expect modification and the combination in the scope of spirit of the present invention and claim.

Claims (14)

1. one kind is the method for the service application generation application code of multilayer, encapsulation, comprising:
Visually with object, association and relationship modeling to form visual model and to specify the operation of Object-Oriented Design, wherein the characteristic of this object, association, relation and/or operation comprises:
Show first characteristic that whether generates to the interface of this modeling object;
Show whether generate to this locality of assigned operation and/or second characteristic of remote interface; And
Association between data object;
Generation comprises the characteristic of described object, association, relation and/or operation corresponding to the machine-readable data of this visual model;
Adopt this machine-readable data that this visual model is mapped to database; And
From this mapping and machine-readable data, generate application code in addition, comprising:
Continue and this database of visit and related unanimity between described data object in the code of modeling object;
With this interface that continues and visit the code of described object, it meets described first characteristic; And
With the interface of assigned operation, it meets described second characteristic.
2. method according to claim 1, wherein, described application code in fact with EnterpriseJavaBeans standard 2.0 or above edition compatibility.
3. method according to claim 2, wherein, described continue and the code of access object in fact with Bean Managed Persistence protocol-compliant.
4. method according to claim 1, wherein, described application code in fact with .NET framework specification compatibility.
5. method according to claim 1, wherein, described OO Application Design in fact with the unified modeling language operating such.
6. method according to claim 1, wherein, the characteristic of described object, association, relation and/or operation also comprises the described object of controlling described mapping step and a plurality of the 3rd characteristics of relation.
7. method according to claim 6, wherein, the 3rd characteristic of described control mapping step comprises the segmentation of whether supporting described modeling object configuration.
8. method according to claim 7, wherein, the 3rd characteristic of described control mapping step also comprises the change histories that whether writes down the modeling object configuration.
9. method according to claim 1, wherein, described Properties of Objects comprises also whether one or more expressions carry out four characteristic of Dynamic Arrayization with these fields that internationalize to the one or more fields in the modeling object.
10. method according to claim 9, wherein, described which element that continues will retrieve based on the language analysis of appointment described Dynamic Array with the code of access object.
11. method according to claim 1 wherein, specifies what generates by the user, just can proceed and generate the further action that machine-readable data, mapping and other generation step need not the user.
12. method according to claim 1, wherein, described database is a relational database.
13. a method that generates database in the multilayer service application of being cut apart by level comprises:
To object and relationship modeling and specify the operation of OO Application Design, wherein, this Properties of Objects comprises that whether striding a plurality of databases comes cutting object;
Generation comprises described characteristic corresponding to the machine-readable data of this model;
Adopt this machine-readable data that model is mapped to a plurality of databases; And
Generate in addition application code from this mapping and machine-readable data, comprise continuing and the code of the described object of a plurality of databases is striden in visit, wherein, the described code that continues with access object is the interlude layer on database layer.
14. method according to claim 13 also comprises a plurality of databases of cutting apart described object therein of statement, and statement is used for the one or more fields of this Object Segmentation for the certain database of these a plurality of databases.
CNB038257335A 2002-10-28 2003-08-21 Transparent EJB supports and horizontal data is cut apart Expired - Fee Related CN100552625C (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN200910163430.4A CN101630259B (en) 2002-10-28 2003-08-21 Transparent EJB supports and horizontal data is split

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
US28191402A 2002-10-28 2002-10-28
US10/281,914 2002-10-28

Related Child Applications (2)

Application Number Title Priority Date Filing Date
CN200910163430.4A Division CN101630259B (en) 2002-10-28 2003-08-21 Transparent EJB supports and horizontal data is split
CN2009101634291A Division CN101630331B (en) 2002-10-28 2003-08-21 Transparent ejb support and horizontal data partitioning

Publications (2)

Publication Number Publication Date
CN1729448A CN1729448A (en) 2006-02-01
CN100552625C true CN100552625C (en) 2009-10-21

Family

ID=32228781

Family Applications (3)

Application Number Title Priority Date Filing Date
CNB038257335A Expired - Fee Related CN100552625C (en) 2002-10-28 2003-08-21 Transparent EJB supports and horizontal data is cut apart
CN200910163430.4A Expired - Fee Related CN101630259B (en) 2002-10-28 2003-08-21 Transparent EJB supports and horizontal data is split
CN2009101634291A Expired - Fee Related CN101630331B (en) 2002-10-28 2003-08-21 Transparent ejb support and horizontal data partitioning

Family Applications After (2)

Application Number Title Priority Date Filing Date
CN200910163430.4A Expired - Fee Related CN101630259B (en) 2002-10-28 2003-08-21 Transparent EJB supports and horizontal data is split
CN2009101634291A Expired - Fee Related CN101630331B (en) 2002-10-28 2003-08-21 Transparent ejb support and horizontal data partitioning

Country Status (6)

Country Link
EP (1) EP1579297A4 (en)
JP (1) JP2006504194A (en)
KR (1) KR20050065638A (en)
CN (3) CN100552625C (en)
AU (2) AU2003263943B2 (en)
WO (1) WO2004040399A2 (en)

Families Citing this family (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7676791B2 (en) * 2004-07-09 2010-03-09 Microsoft Corporation Implementation of concurrent programs in object-oriented languages
US7890926B2 (en) * 2005-01-04 2011-02-15 Vaakya Technologies Private Limited System and method for application development and deployment
US8141032B2 (en) 2007-02-02 2012-03-20 Microsoft Corporation N-tiered applications support via common interface
KR101470319B1 (en) * 2008-02-15 2014-12-08 삼성전자주식회사 Method and apparatus for generating virtual software platform based on component model and validating software platform architecture using thereof
KR100945181B1 (en) * 2008-03-26 2010-03-03 한양대학교 산학협력단 Storage system, middle storage and data management method for data protection using file name
US8396845B2 (en) * 2008-09-26 2013-03-12 Microsoft Corporation Data-tier application component
CN103186564A (en) * 2011-12-28 2013-07-03 深圳市金蝶中间件有限公司 Data object processing method and system
CN105827671A (en) * 2015-01-04 2016-08-03 深圳市领耀东方科技股份有限公司 System platform characterized by distributed use and centralized management and portal server
US9916373B2 (en) 2015-03-26 2018-03-13 Red Hat, Inc. Dynamic data partitioning extension
CN108287717B (en) * 2017-03-13 2021-03-09 平安科技(深圳)有限公司 Jar packet generation method and terminal
US11936739B2 (en) * 2019-09-12 2024-03-19 Oracle International Corporation Automated reset of session state
KR102258241B1 (en) * 2019-11-18 2021-06-01 주식회사 오픈드래프트 Server side data component for support of development and management and method for perform the data component
US11372675B2 (en) * 2020-06-15 2022-06-28 Bank Of America Corporation Jobs synchronize framework
WO2022010491A1 (en) * 2020-07-10 2022-01-13 Hewlett-Packard Development Company, L.P. Application version switching
WO2024039382A1 (en) * 2022-08-17 2024-02-22 Rakuten Mobile, Inc. Method and uniqueness constraint management server for managing uniqueness constraints associated with entities

Family Cites Families (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6263342B1 (en) * 1998-04-01 2001-07-17 International Business Machines Corp. Federated searching of heterogeneous datastores using a federated datastore object
US6067548A (en) * 1998-07-16 2000-05-23 E Guanxi, Inc. Dynamic organization model and management computing system and method therefor
US7152228B2 (en) * 1999-07-08 2006-12-19 Science Applications International Corporation Automatically generated objects within extensible object frameworks and links to enterprise resources
US6370541B1 (en) * 1999-09-21 2002-04-09 International Business Machines Corporation Design and implementation of a client/server framework for federated multi-search and update across heterogeneous datastores
US7404175B2 (en) * 2000-10-10 2008-07-22 Bea Systems, Inc. Smart generator
WO2001052054A2 (en) * 2000-01-14 2001-07-19 Saba Software, Inc. Method and apparatus for a business applications server
US6631519B1 (en) * 2000-03-30 2003-10-07 Microsoft Corporation Automated schema and interface generation
WO2001082071A1 (en) * 2000-04-21 2001-11-01 Togethersoft Corporation Methods and systems for supporting and deploying distributed computing components
US20020032775A1 (en) * 2000-08-28 2002-03-14 Ramesh Venkataramaiah System and method for transmitting and retrieving data via a distributed persistence framework
US20030018694A1 (en) * 2000-09-01 2003-01-23 Shuang Chen System, method, uses, products, program products, and business methods for distributed internet and distributed network services over multi-tiered networks
WO2002046916A2 (en) * 2000-10-20 2002-06-13 Polexis, Inc. Extensible information system (xis)
US20030212987A1 (en) * 2001-02-28 2003-11-13 Demuth Steven J. Client container for building EJB-hosted java applications
US6847974B2 (en) * 2001-03-26 2005-01-25 Us Search.Com Inc Method and apparatus for intelligent data assimilation
US7149730B2 (en) * 2002-05-03 2006-12-12 Ward Mullins Dynamic class inheritance and distributed caching with object relational mapping and cartesian model support in a database manipulation and mapping system

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
Enterprise JavaBeans(TM) Specification,Version 2.0. Linda G. DeMichiel, Specification Lead,331页至341页,365页至369页,图63--71,Sun Microsystems. 2001
Enterprise JavaBeans(TM) Specification,Version 2.0. Linda G.DeMichiel,Specification Lead,331页至341页,365页至369页,图63-71,Sun Microsystems. 2001 *

Also Published As

Publication number Publication date
EP1579297A4 (en) 2008-07-02
WO2004040399A3 (en) 2005-09-29
AU2010201505A1 (en) 2010-05-06
JP2006504194A (en) 2006-02-02
CN101630259B (en) 2016-09-14
AU2003263943A1 (en) 2004-05-25
CN101630331A (en) 2010-01-20
EP1579297A2 (en) 2005-09-28
AU2003263943B2 (en) 2010-01-21
KR20050065638A (en) 2005-06-29
CN1729448A (en) 2006-02-01
WO2004040399A2 (en) 2004-05-13
CN101630259A (en) 2010-01-20
CN101630331B (en) 2011-04-06

Similar Documents

Publication Publication Date Title
CA2232671C (en) Systems, methods and computer program products for building frameworks in an object oriented environment
CN1828527B (en) Platform for data services across disparate application frameworks
CN100552625C (en) Transparent EJB supports and horizontal data is cut apart
Soares et al. Nested composite nodes and version control in an open hypermedia system
US7581204B2 (en) Dynamic contexts
US20020091677A1 (en) Content dereferencing in website development
WO2006112882A2 (en) System and method for managing complex relationships over distributed heterogeneous data sources
US20100198844A1 (en) Automatic Code Generation
US7404176B2 (en) Creating and using nested context structures
US7212212B2 (en) Context attribute determination
US20110029577A1 (en) Computer program product and method for sharing information between multiple computer applications using a grafted model network
Vrhovnik et al. An overview of SQL support in workflow products
Alia et al. A middleware framework for the persistence and querying of java objects
Klausner Semantic XVSM: design and implementation
Troelsen et al. Introducing Entity Framework Core
Case et al. A generic object-oriented design methodology incorporating database considerations
Japikse et al. Build the Data Access Layer, Part 1
Hohenstein et al. An aspect-oriented implementation of the ejb3. 0 persistence concept
Lendvai et al. ADO and ADO .NET Object Model Comparisons: A Relational Perspective
Liu Maintaining Database consistency in the Presence of Schema Evolution
Hall DJ: Bridging Java and Deductive Databases
Prieto et al. INCORPORATING AN OBJECT□ ORIENTED DBMS INTO AN INTEGRAL OBJECT□ ORIENTED SYSTEM
Griebel Repository Support for Visualization in Relational Databases
Meo Using Objectivity/DB in an Application for Configuration Management
Beck Declaration of Academic Honesty

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
ASS Succession or assignment of patent right

Owner name: KAIFANG CHUANGXIN NETWORKS CO., LTD.

Free format text: FORMER OWNER: JGR ACQUISITION INC.

Effective date: 20080111

C41 Transfer of patent application or patent right or utility model
TA01 Transfer of patent application right

Effective date of registration: 20080111

Address after: American New York

Applicant after: Commerce One Operations Inc.

Address before: Delaware

Applicant before: JGR Acquisition Inc.

C14 Grant of patent or utility model
GR01 Patent grant
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20091021

Termination date: 20190821

CF01 Termination of patent right due to non-payment of annual fee