blob: e713896e793f716a2a0bef416986d3be699f56a3 [file] [log] [blame]
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd";>
<!--
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<html>
<head>
<link rel="shortcut icon" href="http://aries.apache.org/images/favicon.ico"></link>
<link type="text/css" rel="stylesheet" href="http://aries.apache.org/resources/site.css"></link>
</script><script src="http://aries.apache.org/resources/menus.js" language="javascript" type="text/javascript"></script>
<meta name="keywords" content="..."/>
<meta name="description" content="..." />
<title>
Apache Aries - Aries Transaction Control Service
</title>
</head>
<body onload="SetMenu()">
<table width="100%" cellpadding="0" cellspacing="0">
<tr width="100%">
<td id="cell-0-0" colspan="2">&nbsp;</td>
<td id="cell-0-1">&nbsp;</td>
<td id="cell-0-2" colspan="2">&nbsp;</td>
</tr>
<tr width="100%">
<td id="cell-1-0">&nbsp;</td>
<td id="cell-1-1">&nbsp;</td>
<td id="cell-1-2">
<div style="padding: 5px;">
<div id="banner">
<!-- Banner -->
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr>
<td align="left" class="topbardiv" nowrap="">
<a href="http://aries.apache.org/" title="Apache Aries"> <img border="0" src="http://aries.apache.org/images/Arieslogo_Horizontal.gif"> </a>
</td>
<td align="right" nowrap="">
<a href="http://www.apache.org/" title="The Apache Software Foundation"> <img border="0" src="http://aries.apache.org/images/apache_feather.png"> </a>
</td>
</tr>
</table>
<!-- Banner -->
</div>
</div>
<div id="top-menu">
<table border="0" cellpadding="1" cellspacing="0" width="100%">
<tr>
<td>
<div align="left">
<!-- Breadcrumbs -->
<!-- Breadcrumbs -->
</div>
</td>
<td>
<div align="right">
<!-- Quicklinks -->
<DIV style="padding: 5px 5px 0px 25px;">
<FORM action="http://www.google.com/search" method="get" style="font-size: 10px;">
<A href="http://www.apache.org/licenses/LICENSE-2.0.html" class="external-link" rel="nofollow">License</A>
<INPUT name="ie" type="hidden" value="UTF-8"></INPUT>
<INPUT name="oe" type="hidden" value="UTF-8"></INPUT>
<INPUT maxlength="255" name="q" size="15" type="text" value></INPUT>
<INPUT name="btnG" type="submit" value="Search"></INPUT>
<INPUT name="domains" type="hidden" value="aries.apache.org"></INPUT>
<INPUT name="sitesearch" type="hidden" value="aries.apache.org"></INPUT>
</FORM>
</DIV>
<!-- Quicklinks -->
</div>
</td>
</tr>
</table>
</div>
</td>
<td id="cell-1-3">&nbsp;</td>
<td id="cell-1-4">&nbsp;</td>
</tr>
<tr width="100%">
<td id="cell-2-0" colspan="2">&nbsp;</td>
<td id="cell-2-1">
<table>
<tr height="100%" valign="top">
<td height="100%">
<div id="wrapper-menu-page-right">
<div id="wrapper-menu-page-top">
<div id="wrapper-menu-page-bottom">
<div id="menu-page">
<!-- NavigationBar -->
<style type="text/css">
/* The following code is added by mdx_elementid.py
It was originally lifted from http://subversion.apache.org/style/site.css */
/*
* Hide class="elementid-permalink", except when an enclosing heading
* has the :hover property.
*/
.headerlink, .elementid-permalink {
visibility: hidden;
}
h2:hover > .headerlink, h3:hover > .headerlink, h1:hover > .headerlink, h6:hover > .headerlink, h4:hover > .headerlink, h5:hover > .headerlink, dt:hover > .elementid-permalink { visibility: visible }</style>
<div onclick="SwitchMenu('documentation')" id="documentationTitle" class="menutitle">Documentation</div>
<div id="documentation" class="menuitemgroup">
<div class="menuitem">
<a href="/documentation/integrators-guide.html">Integrators Guide</a>
</div>
<div class="menuitem">
<a href="/documentation/articles.html">Articles</a>
</div>
<div class="menuitem">
<a href="https://svn.apache.org/repos/asf/aries/slides/">Slides</a>
</div>
<div class="menuitem">
<a href="/documentation/tutorials.html">Tutorials</a>
</div>
<div class="menuitem">
<a href="/documentation/tools.html">Tools</a>
</div>
</div>
<div onclick="SwitchMenu('modules')" id="modulesTitle" class="menutitle">Modules</div>
<div id="modules" class="menuitemgroup">
<div class="menuitem">
<a href="/modules/samples.html">Samples</a>
</div>
<div class="menuitem">
<a href="/modules/async-svcs.html">Asynchronous Services</a>
</div>
<div class="menuitem">
<a href="/modules/blueprint.html">Blueprint</a>
</div>
<div class="menuitem">
<a href="/modules/blueprint-maven-plugin.html">Blueprint-maven-plugin</a>
</div>
<div class="menuitem">
<a href="/modules/blueprintannotation.html">Blueprint Annotations</a>
</div>
<div class="menuitem">
<a href="/modules/blueprintnoosgi.html">Blueprint No-OSGi</a>
</div>
<div class="menuitem">
<a href="/modules/blueprintweb.html">Blueprint Web</a>
</div>
<div class="menuitem">
<a href="/modules/containers.html">Containers</a>
</div>
<div class="menuitem">
<a href="/modules/esaanttask.html">ESA Ant Task </a>
</div>
<div class="menuitem">
<a href="/modules/ebamavenpluginproject.html">EBA Maven Plugin </a>
</div>
<div class="menuitem">
<a href="/modules/esamavenpluginproject.html">ESA Maven Plugin </a>
</div>
<div class="menuitem">
<a href="/modules/jmx.html">JMX</a>
</div>
<div class="menuitem">
<a href="/modules/jndiproject.html">JNDI</a>
</div>
<div class="menuitem">
<a href="/modules/jpaproject.html">JPA</a>
</div>
<div class="menuitem">
<a href="/modules/transactioncontrol.html">Transaction Control Service</a>
</div>
<div class="menuitem">
<a href="/modules/transactionsproject.html">Transactions</a>
</div>
<div class="menuitem">
<a href="/modules/rsa.html">Remote Service Admin (RSA)</a>
</div>
<div class="menuitem">
<a href="/modules/spi-fly.html">SPI Fly</a>
</div>
<div class="menuitem">
<a href="/modules/subsystems.html">Subsystems</a>
</div>
<div class="menuitem">
<a href="/modules/applications.html">Applications (obsolete)</a>
</div>
</div>
<div onclick="SwitchMenu('downloads')" id="downloadsTitle" class="menutitle">Downloads</div>
<div id="downloads" class="menuitemgroup">
<div class="menuitem">
<a href="/downloads/currentreleases.html">Current Releases</a>
</div>
<div class="menuitem">
<a href="/downloads/testresults.html">Compliance Tests</a>
</div>
<div class="menuitem">
<a href="/downloads/archived-releases.html">Archived Releases</a>
</div>
</div>
<div onclick="SwitchMenu('community')" id="communityTitle" class="menutitle">Community</div>
<div id="community" class="menuitemgroup">
<div class="menuitem">
<a href="/community/resources.html">Community Resources</a>
</div>
<div class="menuitem">
<a href="/community/gettinginvolved.html">Getting Involved</a>
</div>
<div class="menuitem">
<a href="/community/people.html">Who we are</a>
</div>
<div class="menuitem">
<a href="/community/boardreports.html">Board Reports</a>
</div>
<div class="menuitem">
<a href="/community/logos.html">Logos for Users</a>
</div>
</div>
<div onclick="SwitchMenu('development')" id="developmentTitle" class="menutitle">Development</div>
<div id="development" class="menuitemgroup">
<div class="menuitem">
<a href="/development/buildingaries.html">Building Aries </a>
</div>
<div class="menuitem">
<a href="/development/guidelines.html">Cording Guidelines</a>
</div>
<div class="menuitem">
<a href="/development/architecture.html">Architecture</a>
</div>
<div class="menuitem">
<a href="/development/releasingaries.html">Releasing Aries </a>
</div>
<div class="menuitem">
<a href="/development/compliancetesting.html">OSGi Compliance Tests </a>
</div>
<div class="menuitem">
<a href="/development/maintainingthewebpages.html">Web Site Maintenance </a>
</div>
</div>
<div onclick="SwitchMenu('sponsorship')" id="sponsorshipTitle" class="menutitle">Sponsorship</div>
<div id="sponsorship" class="menuitemgroup">
<div class="menuitem">
<a href="http://www.apache.org/foundation/thanks.html">Thanks</a>
</div>
<div class="menuitem">
<a href="http://www.apache.org/foundation/sponsorship.html">Sponsoring Apache</a>
</div>
</div>
<div class="promotion">
<a href="http://www.apache.org/events/current-event.html">
<img src="http://www.apache.org/events/current-event-125x125.png" width="125" height="125"/>
</a>
</div>
<!-- NavigationBar -->
</div>
</div>
</div>
</div>
</td>
<td height="100%" width="100%">
<!-- Content -->
<div class="wiki-content"><style type="text/css">
/* The following code is added by mdx_elementid.py
It was originally lifted from http://subversion.apache.org/style/site.css */
/*
* Hide class="elementid-permalink", except when an enclosing heading
* has the :hover property.
*/
.headerlink, .elementid-permalink {
visibility: hidden;
}
h2:hover > .headerlink, h3:hover > .headerlink, h1:hover > .headerlink, h6:hover > .headerlink, h4:hover > .headerlink, h5:hover > .headerlink, dt:hover > .elementid-permalink { visibility: visible }</style>
<h2 id="osgi-transaction-control-service">OSGi Transaction Control Service<a class="headerlink" href="#osgi-transaction-control-service" title="Permanent link">&para;</a></h2>
<p>This set of modules is an implementation of the proposed OSGi Transaction Control Service and related
services, such as JDBC and JPA resource providers.</p>
<p>The Transaction Control Service (RFC-221) is an in-progress RFC publicly available from the OSGi
Alliance: <a href="https://github.com/osgi/design/blob/master/rfcs/rfc0221/rfc-0221-TransactionControl.pdf">https://github.com/osgi/design/blob/master/rfcs/rfc0221/rfc-0221-TransactionControl.pdf</a></p>
<p>Given that the RFC is non-final the OSGi API declared in this project is subject to change at any time up
to its official release. Also the behaviour of this implementation may not always be up-to-date with the
latest wording in the RFC. The project maintainers will, however try to keep pace with the RFC, and to
ensure that the implementations are compliant with any OSGi specifications that result from the RFC.</p>
<h1 id="getting-started">Getting started<a class="headerlink" href="#getting-started" title="Permanent link">&para;</a></h1>
<p>The current released version of Transaction Control is 0.0.1, and it is available in <a href="https://mvnrepository.com/artifact/org.apache.aries.tx-control">Maven Central</a></p>
<p>If you're new to the Transaction Control service then we recommend that you read the
<a href="tx-control/quickstart.html">quickstart documentation first</a>.</p>
<p>More detailed documentation is available in the <a href="tx-control/index.html">Aries Transaction Control Project</a></p>
<h2 id="why-use-the-transaction-control-service">Why use the Transaction Control service?<a class="headerlink" href="#why-use-the-transaction-control-service" title="Permanent link">&para;</a></h2>
<p>Simply put the Transaction Control service makes resource access easy! There's no need to worry about
transaction lifecycle or closing connections, and there's built in support for useful features like
connection pooling.</p>
<p>In addition to being simple the Transaction Control service also makes transaction management explicit. As a
result it is easier to follow the transactions flowing throughout your code, and it protects you from the
<a href="tx-control/spring-tx.html">proxy problem</a> that declarative transaction strategies often suffer from.</p>
<h2 id="modules">Modules<a class="headerlink" href="#modules" title="Permanent link">&para;</a></h2>
<p>The following modules are available for use in OSGi</p>
<ol>
<li>
<p><a href="tx-control/localTransactions.html">tx-control-service-local</a> :- A purely local transaction control service implementation. This can be
used with any resource-local capable ResourceProvider</p>
</li>
<li>
<p><a href="tx-control/xaTransactions.html">tx-control-service-xa</a> :- An XA-capable transaction control service implementation based on the
Geronimo Transaction Manager. This can be used with XA capable resources, or with local resources.
Local resources will make use of the last-participant gambit.</p>
</li>
<li>
<p><a href="tx-control/localJDBC.html">tx-control-provider-jdbc-local</a> :- A JDBC resource provider that provides connection pooling and
that can integrate with local transactions. The JDBCConnectionProviderFactory service may be used
directly, or a service may be configured using the <em>org.apache.aries.tx.control.jdbc.local</em> pid</p>
</li>
<li>
<p><a href="tx-control/xaJDBC.html">tx-control-provider-jdbc-xa</a> :- A JDBC resource provider that provides connection pooling and
that can integrate with local or XA transactions. The JDBCConnectionProviderFactory service may be
used directly, or a service may be configured using the <em>org.apache.aries.tx.control.jdbc.xa</em> pid</p>
</li>
<li>
<p><a href="tx-control/localJPA.html">tx-control-provider-jpa-local</a> :- A JPA resource provider that can integrate with local transactions.
The JPAEntityManagerProviderFactory service may be used directly, or a service may be configured using
the <em>org.apache.aries.tx.control.jpa.local</em> pid. The implementation can also provide connection pooling
if required</p>
</li>
<li>
<p><a href="tx-control/xaJPA.html">tx-control-provider-jpa-xa</a> :- A JDBC resource provider that integrates with XA transactions.
The JPAEntityManagerProviderFactory service may be used directly, or a service may be configured using
the <em>org.apache.aries.tx.control.jpa.xa</em> pid. The implementation can also provide connection pooling
if required</p>
</li>
</ol>
<h3 id="which-modules-should-i-use">Which modules should I use?<a class="headerlink" href="#which-modules-should-i-use" title="Permanent link">&para;</a></h3>
<p>If you wish to use entirely lightweight, resource-local transactions then it is best to pair the
tx-control-service-local and tx-control-provider-jdbc-local or tx-control-provider-jpa-local bundles.
This will give transactional behaviour, but the result is <em>not guaranteed to be ACID if more than one
resource is used</em>.</p>
<p>If ACID behaviour is needed across multiple resources then the tx-control-service-xa <em>must</em> be used.
This service also provides an XA enabled two-phase commit algorithm, and also allows for ACID
behaviour when <em>one</em> of the resources only supports local transactions by using the last participant gambit.</p>
<p>When using the XA Transaction control service then the tx-control-provider-jdbc-xa or
tx-control-provider-jpa-xa resource provider bundles should be used.</p>
<p><strong>IT IS NOT RECOMMENDED</strong> to use both tx-control-service-xa and tx-control-service-local at
the same time. This will be confusing, and may lead to problems if different parts of the application
bind to different service implementations.</p>
<p><strong>NOTE:</strong> There is also no reason to use the tx-control-provider-jdbc-local in addition to the
tx-control-provider-jdbc-xa service. Using both together is not typically harmful, however the
tx-control-provider-jdbc-xa bundle supports all of the same features as the
tx-control-provider-jdbc-local bundle. The same is <strong>not</strong> true of the JPA provider implementations.</p>
<h2 id="pre-release-apis">Pre-release APIs<a class="headerlink" href="#pre-release-apis" title="Permanent link">&para;</a></h2>
<p>As part of the Aries Transaction Control implementations pre-release versions of the OSGi Transaction Control
API are provided. Rather than putting the API into the wrong package namespace, or outputting them at the wrong
version, they will be exported with a mandatory attribute of <code>api.status=aries.prerelease</code>. </p>
<p>By setting this attribute on their API imports users accept that the API may change without a change to the
package version(s). These changes may, or may not, be binary compatible. Once the specification is final the
attribute will be removed from the export.</p></div>
<!-- Content -->
</td>
</tr>
</table>
</td>
<td id="cell-2-2" colspan="2">&nbsp;</td>
</tr>
<tr width="100%">
<td id="cell-3-0">&nbsp;</td>
<td id="cell-3-1">&nbsp;</td>
<td id="cell-3-2">
<div id="footer">
<!-- Footer -->
<div id="site-footer">
<a href="http://aries.apache.org/privacy-policy.html";>Privacy
Policy</a>
</div>
<!-- Footer -->
</div>
</td>
<td id="cell-3-3">&nbsp;</td>
<td id="cell-3-4">&nbsp;</td>
</tr>
<tr width="100%">
<td id="cell-4-0" colspan="2">&nbsp;</td>
<td id="cell-4-1">&nbsp;</td>
<td id="cell-4-2" colspan="2">&nbsp;</td>
</tr>
</table>
</body>
</html>