|
Visit the IBM i InfoCenter, in the "Search:" enter the two tokens:
transaction scoped
The Lack Space (*LCKSPC) object is an implementation object for
X/OPEN CAE or XA specification.
_XA transaction support for commitment control_
http://publib.boulder.ibm.com/infocenter/iseries/v5r4/topic/rzakj/rzakjxatransaction.htm
"DB2 Universal Database™ (UDB) for iSeries™ can participate in X/Open
global transactions. ..."
Effectively the *LCKSPC is used for commitment control [xa_commit(),
xa_rollback()] whereby allocations across different jobs can be tracked;
i.e. multiple jobs participating in the same unit of work.
_Scope for a commitment definition_
http://publib.boulder.ibm.com/infocenter/iseries/v5r4/topic/rzakj/rzakjscope.htm
" ...
Commitment definitions with transaction-scoped locks
* Transaction-scoped commitment definition
Commitment definitions with job-scoped locks can be used only by
programs that run in the job that started the commitment definitions. In
comparison, more than one job can use commitment definitions with
transaction-scoped locks.
...
"
Typically the OS would create the Lock Space object to deal with
[start\enable] requests to use XA; distributed processing. The database
has the capability to establish that via some 'client' requests; JDBC,
ODBC, SQLCLI
I believe the Lock Space is created for the request to "Open an XA
Resource Manager" with the xa_open() API.
xa_open()--Open an XA Resource Manager (Transaction Scoped Locks)
http://publib.boulder.ibm.com/infocenter/iseries/v5r4/topic/apis/dxatlopn.htm
" Syntax
#include <xa.h>
int xa_switch.xa_open_entry(char *xa_info,
int rmid, long flags);
Default Public Authority: *USE
Service Program: QTNXADTP
Threadsafe: Yes
A transaction manager calls xa_open() to open the XA resource manager
and to prepare it for use in the XA distributed transaction environment.
This function must be called before any other resource manager (xa_)
calls are made.
...
"
When an object or record is identified as being allocated to a Lock
Space, the Lock Space Identifier would be returned, which is then used
as input to another API specific to the Lock Space. For example, the
Retrieve Job Locks (QWCRJBLK) API:
http://publib.boulder.ibm.com/infocenter/iseries/v5r4/topic/apis/qwcrjblk.htm
--
Regards, Chuck
On 01 Jun 2012 18:51, Jacob Smallwood wrote:
Does anyone know where I might find information on how lock spaces--
work? According to the help text, ALCOBJ SCOPE(*LCKSPC) will scope
the lock "to the lock space associated with the current thread. If no
lock space is attached, the lock is scoped to the job." I've done
some research and all the references I've found to lock spaces are
quite terse. Technical document 332075326 "Lock Spaces and Job
Statuses LSPA and LSPW" says that "A lock space is an internal object
that is used by other objects to hold object and record locks" and
"It is called a transaction control structure (IBM TCS) at the
machine interface. There is an Attach Transaction Control Structure
(ATCHTCS) instruction that can be used to associate the TCS with the
thread." I've also found a couple APIs that take a lock space
identifier and return information about it, but I can't find anywhere
that actually says:
* How and when a lock space is created
* How and when a lock space is attached to a thread (other than that
it's done with the ATCHTCS instruction)
* How I would find a lock space identifier to actually pass to those
APIs
I don't need this information for anything in particular, I'm just
curious.
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list
To post a message email: MIDRANGE-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/midrange-l.
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.