Home > database >  Pb discussion on three floors
Pb discussion on three floors

Time:10-05

Think about the following code:
In the event of an application server applications OPEN:
//set the SQLCA each attribute
,,,,,,,
The connect usi ng the sqlca;

In the application server side has a remote object, one of its code:
Datastore dsUser



DsUser=create datastroe
DsUser. Datao b j e c t='dw_us er'
DsUser. SetTransObject (sqlca)
DsUser. Retrieve ()
MessageBox (" information ", dsUser. R owCount ())
In the preview dw_user data window, a total of 100 rows of data, so the above code to run result? The results showed that dsUser. RowCount ()=0.
It turns out that when a client program and the application server to establish a connection, the application server is for this connection to start a separate SESSION (SESSION), this SESSION has the following characteristics:
1. Session with a single address space, for the session, other words or server session is not visible,
2. Session lifetime from server ConnectionBegin events to Connec tionEnd event ends,
3. Session of like copy, with separate global means that each session has its own independent global variables,

As mentioned above, we will know, the session SQLCA SQLCA variable in the object and the application server is different, we speak in front of the code is not successful,

I want to ask, is it possible to establish a Shared transaction? For sharing all the clients that this transaction SQLCA?

CodePudding user response:

All client sharing things?? How to solve the data integrity of database deadlocks, almost all operations associated with the database can't do it, ah, a simple example, a customer to submit data, a back to data, do how?

CodePudding user response:

Application server transaction is component level and were independent of each other between each session (thread), multiple components of transactions can be independent can also be used within a transaction, through component commit or destroyed can complete the transaction commit or rollback,
EA components are Not Supported, Supported the Transaction, the Requires Transcation properties, such as Transaction attribute is set components,

Submit is equivalent to the component transactionserver upstairs said. The SetComplete (), and roll back the equivalent of transactionserver. SetAbort ()


CodePudding user response:

Have read, just 1 minute! ?
Learning how to learn more, 1/f, has given the answer

CodePudding user response:

Lz want?
  • Related