CN103246517A - Method for smart client programs to invoke web services to achieve database transaction persistence - Google Patents

Method for smart client programs to invoke web services to achieve database transaction persistence Download PDF

Info

Publication number
CN103246517A
CN103246517A CN2013101890504A CN201310189050A CN103246517A CN 103246517 A CN103246517 A CN 103246517A CN 2013101890504 A CN2013101890504 A CN 2013101890504A CN 201310189050 A CN201310189050 A CN 201310189050A CN 103246517 A CN103246517 A CN 103246517A
Authority
CN
China
Prior art keywords
database
string
webservice
client
affairs
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.)
Pending
Application number
CN2013101890504A
Other languages
Chinese (zh)
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.)
Inspur Group Shandong General Software Co Ltd
Original Assignee
Inspur Group Shandong General Software Co Ltd
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 Inspur Group Shandong General Software Co Ltd filed Critical Inspur Group Shandong General Software Co Ltd
Priority to CN2013101890504A priority Critical patent/CN103246517A/en
Publication of CN103246517A publication Critical patent/CN103246517A/en
Pending legal-status Critical Current

Links

Images

Abstract

The invention provides a method for smart client programs to invoke web services to achieve database transaction persistence. The method includes (1) smart client application: each client registers self stateful database connection in distributed application achieved through web services, constructs objects capable of achieving database transaction persistence on an application program server by calling the application program server and is related to persistent database transaction connection on the application program server through a unique identification number; and (2) the clients can control specific database transaction states in distributed application constructed through the stateful database connection and send messages through web services to control the corresponding database connection states on the application program server.

Description

A kind of method of SmartClient routine call webservice fulfillment database affairs ensured sustained development
Technical field
The present invention relates to a kind of Computer Applied Technology field, specifically a kind of method of SmartClient routine call webservice fulfillment database affairs ensured sustained development.
Background technology
In traditional use webservice exploitation Distributed Application system, the affairs control of database is generally by single affairs control, each client all requires database to submit affairs or rollback affairs to alternately, even need reconnect database alternately at every turn.Under this background, more to developer's restriction ratio, cause under some situation business logic processing and code being write difficulty.Such as, in Webservice, require each client in oneself viewing content within the affairs independently, the difficult realization in this former exploitation system.Secondly, the database access of general C/S framework applications program continues, if desired C S framework applications program be transformed into the smart client application of supporting the web pattern, can avoid framework reconstruct, the complicated process of code rewriting by this patent.
Summary of the invention
The purpose of this invention is to provide a kind of The SmartClient programCall the method for webservice fulfillment database affairs ensured sustained development.
The objective of the invention is to realize in the following manner, content comprises:
(1) SmartClient is used, in the Distributed Application by the webservice realization, the slip condition database that has of each client registration oneself connects, each applications client is by the calling appl. server, apps server create can fulfillment database affairs persistence object, each client and the perdurable data storehouse affairs on being present in apps server are connected passes through the unique identifying number association;
(2) by in the Distributed Application that has slip condition database to connect to build, the client distinctive db transaction state that can draw oneself up, client sends message by webservice, corresponding database connection status above the controlling application program server;
Concrete steps are as follows:
(1) transaction object with database development instrument PB encapsulates;
(2) code after the transaction object of database development instrument PB is packaged forms library file;
(3) issue the webservice method in order to the method in the library file that calls database development instrument PB realization by .net;
(4) transaction object of packed database development instrument PB is kept among the session;
(5) library file of the webservice method long-range indirect call database development instrument PB exploitation of client by calling .net issue.
The transaction object encapsulation step of database development instrument PB is as follows:
(1) analyze transaction attributes and action and encapsulate, according to different type of database connected mode differences, encapsulation connected mode and attribute;
(2) database to the data window of database developing instrument PB encapsulates alternately, comprises that additions and deletions change to look into;
It is the .net Assemby engineering of the code after the encapsulation by database development instrument PB that code after packaged forms library file, generates the library file of .net.
Issue the webservice method in order to the method in the library file that calls database development instrument PB realization by .net, it is the webservice method of below the .net environment, writing, articulate the library file that database development instrument PB generates, the webservice method is by the object handles affairs and the data window that provide of library file the inside.
Packed transaction object is kept at that content comprises among the session:
(1) user is every successfully registers affairs, creates new affairs encapsulated object at server end, and is kept among the session;
(2) the later on each issued transaction of this client user and data window are handled, all by being stored in the object handles among the session;
(3) unusual, the session of overtime, the client network of affairs disconnects and all handling by session.
Client comprises by the library file that the long-range indirect call database development of the webservice method instrument PB that calls the .net issue develops:
(1) database development instrument PB exploitation client is set up the webservice agent object;
(2) agent object gets final product the database development instrument PB logical code that indirect call is issued as remote application by the method for visit webservice issue.
The function that has and beneficial effect
The method that the connection of slip condition database affairs is arranged by a kind of webservice, for the Distributed Application use has the state affairs that a solution is provided, CS application model framework in traditional use PB exploitation is converted to the BS pattern easily by this kind method, thereby avoided the framework replacement, complicated work such as code rewriting.
Description of drawings
Fig. 1 is the system architecture synoptic diagram;
Fig. 2 is system flowchart.
Embodiment
Explain below with reference to Figure of description method of the present invention being done.
Technical assignment of the present invention is at above-mentioned the deficiencies in the prior art, the affairs Control Component and the implementation method that provide a kind of webservice of realization that state is arranged.Utilize this method developer just can registration transactions arrive server end in client, service end is returned the affairs unique identifying number after the success, and client is by the affairs of this unique identifying number control remote server end.
With reference to explaining below the implementation method work of the present invention of instructions Fig. 2, characteristics are:
1, the encapsulation transaction object provides client registration transactions object, has unified attribute and method:
(1) use described transaction object to connect database;
(2) transaction object is responsible for rollback and is submitted client transaction to;
(3) database linkage information is set;
2, realize unified database SQL execution object, this object is carried out sql command by transaction object:
(1) SQL carries out object and carries out SQL by transaction object;
(2) SQL carries out object and can obtain database information, carries out the SQL grammer of appointment;
3, realize unified data window object, client can be mutual with database by the data window of PB with this object:
(1) the data window object passes through transaction object alternately with database;
(2) can form the database grammer according to SQL statement;
(3) according to the data window grammer refresh data and the return data window grammer that import into;
(4) according to the data window grammer that imports into new data more.
Embodiment
As shown in Figure 2, implementation procedure is as follows:
1. set up the class library file by database development instrument PB, client transaction is by this class libraries Register Cancel and operation affairs;
(1) according to the different objects of difference in functionality module creation, comprises at present and carry out SQL object, service data window object etc.;
1) the service data window function is as follows:
public?function?blob?of_oprtdw_getdatablob_argstring?(string?transid,?blob?fullstate,?string?args[],?ref?string?errmsg)
public?function?blob?of_oprtdw_getdatabystate?(string?transid,?blob?fullstate,?ref?string?errmsg)
public?function?string?of_oprtdw_getdatatext_argstring?(string?transid,?blob?fullstate,?string?args[],?ref?string?errmsg)
public?function?blob?of_oprtdw_retrieveds?(string?transid,?blob?fullstate,?ref?string?errmsg)
public?function?blob?of_oprtdw_selecttodsblob?(string?transid,?string?sqlsyn,?ref?string?errmsg)
public?function?string?of_oprtdw_syntaxfromsql?(string?transid,?string?sqlsyn,?string?dwstyle,?ref?string?errmsg)
public?function?blob?of_optrdw_retrievedsarg_string?(string?transid,?blob?fullstate,?string?args[],?ref?string?errmsg)
public?function?string?of_oprtdw_getdwdata?(string?transid,?blob?fullstate,?ref?string?errmsg)
public?function?string?of_oprtdw_selecttodsdata?(string?transid,?string?sqlsyn,?ref?string?errmsg)
public?function?string?of_oprtdw_savebystate?(string?transid,?byte?fullstate[],?boolean?ifcommit,?boolean?failedrollback)
2) function of execution SQL is as follows
public?function?long?of_exec_createtab?(string?transid,?string?tabname,?string?tabsql,?boolean?ifcommit,?ref?string?errmsg)
public?function?long?of_exec_createtab_withindex?(string?transid,?string?tabname,?string?tabsql,?string?tabindex[],?ref?string?errmsg)
public?function?long?of_exec_sql?(string?transid,?string?sqlsyn,?boolean?ifcommit,?ref?long?sqlnrows,?ref?string?errmsg)
public?function?blob?of_exec_getglobalvariables?(string?transid,?ref?string?errmsg)
public?function?blob?of_exec_getselectblob?(string?transid,?string?sqlselect,?ref?string?errmsg)
public?function?string?of_exec_getselectvalues?(string?transid,?string?sqlselect,?ref?string?sqlresults[],?ref?string?sqlcoltypes[],?ref?string?strsplite)
public?function?string?of_exec_getselectvalues?(string?transid,?string?sqlsyn,?ref?string?sqlresults[])
public?function?string?of_exec_getselectvalues?(string?transid,?string?sqlsyn,?ref?string?sqlresults[],?ref?string?strsplite)
public?function?string?of_exec_getselectvalues_array?(string?transid,?string?sqlselect,?ref?string?sqlresults[],?ref?string?sqlcoltype[],?ref?string?strsplite)
public?function?string?of_exec_getselectvalues_cursor?(string?transid,?string?sqlselect,?ref?string?sqlresults[],?ref?string?coltypes[],?ref?string?strsplite)
public?function?string?of_exec_getselectvalues_cursor?(string?transid,?string?sqlsyn,?ref?string?sqlresults[],?ref?string?strsplite)
public?function?long?of_exec_procdure?(string?transid,?string?strproc,?string?strparms[],?string?strparmtypes[],?boolean?ifusecurtrans,?ref?string?errmsg)
private?function?transaction?of_p_trans_clone?()
public?function?long?of_exec_sql_array?(string?transid,?string?sqlarrays[],?boolean?ifcommit,?ref?long?sqlnrows[],?ref?string?errmsg)
public?function?long?of_exec_updateblob?(string?transid,?string?tablename,?string?colname,?string?updatewhere,?blob?colvalue,?ref?string?errmsg)
3) the affairs control function is as follows
public?function?string?of_trans_closetrans?(string?transid)
public?function?long?of_trans_commitetrans?(string?transid,?ref?string?errmsg)
public?function?string?of_trans_getconnstring_net?(string?transid,?string?psdbtype,?ref?string?errmsg)
private?function?string?of_p_trans_getconnstring_net_syb?()
private?function?string?of_p_trans_getconnstring_net_ora?()
private?function?string?of_p_trans_getconnstring_net_mss?()
public?function?string?of_trans_getdbparm_dbtype?(string?transid,?ref?string?errmsg)
public?function?string?of_trans_opentrans?(string?transid)
public?function?long?of_trans_reconnect?(string?transid,?ref?string?errmsg)
public?function?long?of_trans_rollbacktrans?(string?transid,?ref?string?errmsg)
public?function?long?of_trans_setautocommit?(string?transid,?boolean?transautocommit,?ref?string?errmsg)
public?function?string?of_trans_setdbparm?(string?transid,?string?psdbms,?string?psservername,?string?psdatabase,?string?pslogid,?string?pslogpass,?string?psdbparm,?boolean?pbautocommit)
private?function?transaction?of_p_assembly_gettransid?(string?transid)
private?function?string?of_p_assembly_p_get_token?(ref?string?p_string,?string?p_seperator)
private?function?transaction?of_p_newtrans?()
2. pass through the .net assembly engineering production class library file of PB;
3. issue webservice method is as follows:
PbCloseTrans
PbCommitTrans
PbCreateNewConn
PbCreateTab
PbCreateTabWithIndex
PbDwSaveByState
PbExecProc
PbExecSql
PbExecSqlArray
PbGetDBParmDBType
PbGetDSBlob
PbGetDSBlobArgString
PbGetDSDataTextArgString
PbGetDWData
PbGetSelectDSData
PbGetSelectValues
PbGetSelectValuesArray
PbGetSelectValuesBlob
PbGetSelectValuesBlobNet
PbGetSelectValuesCursor
PbOpenTrans
PbPubSave
PbPubXSGetPrice
PbPubXSZxts
PbReconnectTrans
PbRegLogin
PbRetrieveDS
PbRetrieveDSArgString
PbRollbackTrans
PbSelectToDSBlob
PbSetAutoCommit
PbSetGlobalVariables
PbSetTransParm
PbSetUpdateBlob
PbSetValuesBlobNet
PbSyntaxFromSql
PbUnRegTrans
PbUserRecall
RegPbTransAction
4. create the webservice agency by database development instrument PB, quote the webservice method in the step 3, can realize the Long-distance Control of affairs and data window.
Except the described technical characterictic of instructions, be the known technology of those skilled in the art.

Claims (6)

1. the method for a SmartClient routine call webservice fulfillment database affairs ensured sustained development is characterized in that content comprises:
(1) SmartClient is used, in the Distributed Application by the webservice realization, the slip condition database that has of each client registration oneself connects, each applications client is by the calling appl. server, apps server create can fulfillment database affairs persistence object, each client and the perdurable data storehouse affairs on being present in apps server are connected passes through the unique identifying number association;
(2) by in the Distributed Application that has slip condition database to connect to build, the client distinctive db transaction state that can draw oneself up, client sends message by webservice, corresponding database connection status above the controlling application program server;
Concrete steps are as follows:
(1) transaction object with database development instrument PB encapsulates;
(2) code after the transaction object of database development instrument PB is packaged forms library file;
(3) issue the webservice method in order to the method in the library file that calls database development instrument PB realization by .net;
(4) transaction object of packed database development instrument PB is kept among the session;
(5) library file of the webservice method long-range indirect call database development instrument PB exploitation of client by calling .net issue.
2. method according to claim 1 is characterized in that the transaction object encapsulation step of database development instrument PB is as follows:
(1) analyze transaction attributes and action and encapsulate, according to different type of database connected mode differences, encapsulation connected mode and attribute;
(2) database to the data window of database developing instrument PB encapsulates alternately, comprises that additions and deletions change to look into.
3. method according to claim 1 is characterized in that, it is the .net Assemby engineering of the code after the encapsulation by database development instrument PB that the code after packaged forms library file, the library file of generation .net.
4. method according to claim 1, it is characterized in that, issue the webservice method in order to the method in the library file that calls database development instrument PB realization by .net, it is the webservice method of below the .net environment, writing, articulate the library file that database development instrument PB generates, the webservice method is by the object handles affairs and the data window that provide of library file the inside.
5. method according to claim 1 is characterized in that, packed transaction object is kept at that content comprises among the session:
(1) user is every successfully registers affairs, creates new affairs encapsulated object at server end, and is kept among the session;
(2) the later on each issued transaction of this client user and data window are handled, all by being stored in the object handles among the session;
(3) unusual, the session of overtime, the client network of affairs disconnects and all handling by session.
6. method according to claim 1 is characterized in that, client comprises by the library file that the long-range indirect call database development of the webservice method instrument PB that calls the .net issue develops:
(1) database development instrument PB exploitation client is set up the webservice agent object;
(2) agent object gets final product the database development instrument PB logical code that indirect call is issued as remote application by the method for visit webservice issue.
CN2013101890504A 2013-05-21 2013-05-21 Method for smart client programs to invoke web services to achieve database transaction persistence Pending CN103246517A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN2013101890504A CN103246517A (en) 2013-05-21 2013-05-21 Method for smart client programs to invoke web services to achieve database transaction persistence

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN2013101890504A CN103246517A (en) 2013-05-21 2013-05-21 Method for smart client programs to invoke web services to achieve database transaction persistence

Publications (1)

Publication Number Publication Date
CN103246517A true CN103246517A (en) 2013-08-14

Family

ID=48926051

Family Applications (1)

Application Number Title Priority Date Filing Date
CN2013101890504A Pending CN103246517A (en) 2013-05-21 2013-05-21 Method for smart client programs to invoke web services to achieve database transaction persistence

Country Status (1)

Country Link
CN (1) CN103246517A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104767737A (en) * 2015-03-23 2015-07-08 贵阳朗玛信息技术股份有限公司 Plug-in transaction manager and application method thereof
CN109753620A (en) * 2018-12-27 2019-05-14 永中软件股份有限公司 web document processing method and system

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102609263A (en) * 2012-02-13 2012-07-25 浪潮集团山东通用软件有限公司 Component and implementation method for implementing WEBSERVICE transaction control through PB12 (power builder 12)

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102609263A (en) * 2012-02-13 2012-07-25 浪潮集团山东通用软件有限公司 Component and implementation method for implementing WEBSERVICE transaction control through PB12 (power builder 12)

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
佚名: "《通用类库和业务类库的设计思想》", 《HTTP://WWW.TH7.CN/ARTICLE/BC/PB/200801/88467.HTML》 *
莫问奴归处: "《web service中的事务控制》", 《HTTP://WWW.CNBLOGS.COM/CHINHR/ARCHIVE/2010/04/16/1713514.HTML》 *

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104767737A (en) * 2015-03-23 2015-07-08 贵阳朗玛信息技术股份有限公司 Plug-in transaction manager and application method thereof
CN109753620A (en) * 2018-12-27 2019-05-14 永中软件股份有限公司 web document processing method and system
CN109753620B (en) * 2018-12-27 2021-02-12 永中软件股份有限公司 Webpage document processing method and system

Similar Documents

Publication Publication Date Title
Grimm et al. System support for pervasive applications
US20230057335A1 (en) Deployment of self-contained decision logic
Viennot et al. Synapse: a microservices architecture for heterogeneous-database web applications
JP5026415B2 (en) Data centric workflow
WO2016169530A2 (en) Service-oriented modular system architecture
CN105739987A (en) SOA-oriented rapid JavaWeb application construction system framework
WO2019047441A1 (en) Communication optimization method and system
JPH09508742A (en) A methodology for creating an object structure for accessing traditional non-object oriented business applications.
US10678616B2 (en) System and method for encapsulating computer communications
US20120089931A1 (en) Lightweight operation automation based on gui
CN103338135A (en) Real-time monitoring method of cluster storage capacity
Riliskis et al. Ravel: Programming iot applications as distributed models, views, and controllers
Georgantas et al. Service-oriented distributed applications in the future internet: The case for interaction paradigm interoperability
CN102981823A (en) Domain driven development plug-in system
CN105138646A (en) Database operation method based on Hibernate
CN113542390B (en) Internet of things equipment management method and system adopting memory data model
CN109634758A (en) Method and middleware platform based on JSON document control event and behavior
CN103246517A (en) Method for smart client programs to invoke web services to achieve database transaction persistence
EP2395468A1 (en) Semantic user interface data assembling
CN103870280A (en) Webpage seamless combining processing method based on FLEX and JSP
Brugali et al. Service component architectures in robotics: The sca-orocos integration
CN106844156B (en) WCF communication message interception method in intelligent building integrated management platform system
Fayçal et al. Integrating legacy systems in a SOA using an agent based approach for information system agility
Rathod et al. Structural and behavioral modeling of RESTful web service interface using UML
CN107368377A (en) Network request processing method and processing device in a kind of Android application programs

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
WD01 Invention patent application deemed withdrawn after publication

Application publication date: 20130814

WD01 Invention patent application deemed withdrawn after publication