Sophie

Sophie

distrib > Fedora > 14 > x86_64 > media > updates > by-pkgid > 71d40963b505df4524269198e237b3e3 > files > 1007

virtuoso-opensource-doc-6.1.4-2.fc14.noarch.rpm

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
 <head profile="http://internetalchemy.org/2003/02/profile">
  <link rel="foaf" type="application/rdf+xml" title="FOAF" href="http://www.openlinksw.com/dataspace/uda/about.rdf" />
  <link rel="schema.dc" href="http://purl.org/dc/elements/1.1/" />
  <meta name="dc.title" content="20. Using Virtuoso with Tuxedo" />
  <meta name="dc.subject" content="20. Using Virtuoso with Tuxedo" />
  <meta name="dc.creator" content="OpenLink Software Documentation Team ;&#10;" />
  <meta name="dc.copyright" content="OpenLink Software, 1999 - 2009" />
  <link rel="top" href="index.html" title="OpenLink Virtuoso Universal Server: Documentation" />
  <link rel="search" href="/doc/adv_search.vspx" title="Search OpenLink Virtuoso Universal Server: Documentation" />
  <link rel="parent" href="xa.html" title="Chapter Contents" />
  <link rel="prev" href="xaUBBconf.html" title="Configuration" />
  <link rel="next" href="xaClients.html" title="Clients" />
  <link rel="shortcut icon" href="../images/misc/favicon.ico" type="image/x-icon" />
  <link rel="stylesheet" type="text/css" href="doc.css" />
  <link rel="stylesheet" type="text/css" href="/doc/translation.css" />
  <title>20. Using Virtuoso with Tuxedo</title>
  <meta http-equiv="Content-Type" content="text/xhtml; charset=UTF-8" />
  <meta name="author" content="OpenLink Software Documentation Team ;&#10;" />
  <meta name="copyright" content="OpenLink Software, 1999 - 2009" />
  <meta name="keywords" content="" />
  <meta name="GENERATOR" content="OpenLink XSLT Team" />
 </head>
 <body>
  <div id="header">
    <a name="xaServices" />
    <img src="../images/misc/logo.jpg" alt="" />
    <h1>20. Using Virtuoso with Tuxedo</h1>
  </div>
  <div id="navbartop">
   <div>
      <a class="link" href="xa.html">Chapter Contents</a> | <a class="link" href="xaUBBconf.html" title="Configuration">Prev</a> | <a class="link" href="xaClients.html" title="Clients">Next</a>
   </div>
  </div>
  <div id="currenttoc">
   <form method="post" action="/doc/adv_search.vspx">
    <div class="search">Keyword Search: <br />
        <input type="text" name="q" /> <input type="submit" name="go" value="Go" />
    </div>
   </form>
   <div>
      <a href="http://www.openlinksw.com/">www.openlinksw.com</a>
   </div>
   <div>
      <a href="http://docs.openlinksw.com/">docs.openlinksw.com</a>
   </div>
    <br />
   <div>
      <a href="index.html">Book Home</a>
   </div>
    <br />
   <div>
      <a href="contents.html">Contents</a>
   </div>
   <div>
      <a href="preface.html">Preface</a>
   </div>
    <br />
   <div class="selected">
      <a href="xa.html">Using Virtuoso with Tuxedo</a>
   </div>
    <br />
   <div>
      <a href="xaBuildTMS.html">Building the Transaction Manager Server</a>
   </div>
   <div>
      <a href="xaUBBconf.html">Configuration</a>
   </div>
   <div class="selected">
      <a href="xaServices.html">Services</a>
    <div>
        <a href="#xaServicesAbstract" title="Introduction">Introduction</a>
        <a href="#xaServicesVQL" title="VQL functions">VQL functions</a>
        <a href="#xaServCon" title="Services concept">Services concept</a>
        <a href="#xaServOpeninfo" title="OPENINFO">OPENINFO</a>
    </div>
   </div>
   <div>
      <a href="xaClients.html">Clients</a>
   </div>
   <div>
      <a href="xaServExample.html">Service example</a>
   </div>
    <br />
  </div>
  <div id="text">
	<a name="xaServices" />
    <h2>20.3. Services</h2>
	
		<a name="xaServicesAbstract" />
    <h3>20.3.1. Introduction</h3>
		<p>
			The services (in the Tuxedo&#39;s term) are special programs which implement business logic. The services could
			be in the context of a global XA transaction, in this case 2PC control will be set in motion. 
			Each service which uses Virtuoso as resource manager has hdbc connection to 
			the Virtuoso server. This connection is automatically opened when service activated. The connection string (OPENINFO)
			to the Virtuoso server is the connection string of the group of the service (see GROUPS section 
			in the sample config file). The OPENINFO has the following format: &quot;Virtuoso:user:password@NODENAME:port&quot;.
			The user,password and port are optional.
		</p>
	<br />
	
		<a name="xaServicesVQL" />
    <h3>20.3.2. VQL functions</h3>
		<p>
			VQL functions are used to receive access to hdbc for further work with the Virtuoso server.
			Only HDBCs received by the VQL functions are operated in
			the context of the distributed transactions.
		</p>
		<p>
			<span class="computeroutput">
				int vql_get_connection (HDBC * hdbc, int type);
			</span>
			returns result of setting hdbc to current hdbc connection. &quot;type&quot; argument indicates 
			which hdbc is to select, currently only VQL_CTX_TYPE  is supported, other values are 
			reserved.
		</p>
		<p>
			<span class="computeroutput">
			int vql_get_env (HENV * env);
			</span>
			returns result of setting current ODBC environment.
		</p>
		<p>Header: vql_client.h</p>
		<p>Library: libvirtxa.a</p>
	<br />
	
		<a name="xaServCon" />
    <h3>20.3.3. Services concept</h3>
		<p>
			Each service has an entry point (some function), which is supposed to perform the application task. The result of
			whole transaction depends on result of the service&#39;s entry function. The scenario of typical workflow is as
			follows:
			<ul>
				<li>client begins global transaction by ATMI tpbegin() call,</li>
				<li>client calls the service N1 to update some tables on the first Virtuoso server (resource manager),</li>
				<li>client calls the service N2 to update some tables on the second Virtuoso server (resource manager),</li>
				<li>client finishes global transaction by either tpcommit() or tpabort() call of ATMI.</li>
			</ul>
		</p>
		<p>
			The tx_* functions also could be used, See TUXEDO TxRPC related or ORACLE XA documentation.
			<ul>
				<li>tx_begin()</li>
				<li>tx_commit()</li>
				<li>tx_open()</li>
			</ul>
		</p>
		<p>
			Services can be built with the following command:
			<span class="computeroutput">buildserver -v -f virt_service1.o -o VirtService1 -r Virtuoso -s VService1</span>
			where &quot;virt_service1.o&quot; is the service object file which contains VService1 entry function.
			&quot;-r Virtuoso&quot; indicates that service must be assembled with Virtuoso XA support library.
		</p>
	<br />
	
		<a name="xaServOpeninfo" />
    <h3>20.3.4. OPENINFO</h3>
		<p>
			OPENINFO is necessary for services to connect to the certain Virtuoso server.
			OPENINFO for the services (see GROUPS section in the example) consists of 2 parts: 
			&quot;Virtuoso&quot; term and connection string. Connection string provides the service name, 
			password, server and port of Virtuoso server. Common format of connection string is
			[USER[:PASSWORD]]@SERVER[:PORT].
			Only the SERVER name is required, the others are optional.
		</p>
	<br />
<table border="0" width="90%" id="navbarbottom">
    <tr>
        <td align="left" width="33%">
          <a href="xaUBBconf.html" title="Configuration">Previous</a>
          <br />Configuration</td>
     <td align="center" width="34%">
          <a href="xa.html">Chapter Contents</a>
     </td>
        <td align="right" width="33%">
          <a href="xaClients.html" title="Clients">Next</a>
          <br />Clients</td>
    </tr>
    </table>
  </div>
  <div id="footer">
    <div>Copyright© 1999 - 2009 OpenLink Software All rights reserved.</div>
   <div id="validation">
    <a href="http://validator.w3.org/check/referer">
        <img src="http://www.w3.org/Icons/valid-xhtml10" alt="Valid XHTML 1.0!" height="31" width="88" />
    </a>
    <a href="http://jigsaw.w3.org/css-validator/">
        <img src="http://jigsaw.w3.org/css-validator/images/vcss" alt="Valid CSS!" height="31" width="88" />
    </a>
   </div>
  </div>
 </body>
</html>