Software AG Products 10.5 | CentraSite for Developers | API for JAXR | CentraSite API for JAXR Reference Information | Direct XQuery Access to the Stored Data
 
Direct XQuery Access to the Stored Data
A CentraSite JAXR client can call XQJ (XQuery API for Java technology) functionality directly in order to access the registry data. JAXR also uses XQJ to access the registry.
The CentraSite CentraSiteConnection maintains an XQConnection object, which it uses for its own purposes as well as for direct client access. The client can get this object as follows, assuming JAXR-based connection is already present:
Connection jaxrCon = ...;
XQConnection xqjCon = ((CentraSiteConnection)jaxrCon).getXQConnection();
As both the client and JAXR use the same XQJ connection, the following restrictions apply (assuming the client uses JAXR and XQJ in parallel):
*The client must not call any JAXR-based save... method if there is an open transaction, because JAXR performs the save... methods as one atomic operation based on an XQJ transaction.
*The client should never close the XQJ connection; instead, close the JAXR-based connection. This action cleans up anything else.