Full Code of liuyangming/ByteJTA for AI

master fdaf029d80d7 cached
175 files
852.1 KB
202.8k tokens
2194 symbols
1 requests
Download .txt
Showing preview only (925K chars total). Download the full file or copy to clipboard to get everything.
Repository: liuyangming/ByteJTA
Branch: master
Commit: fdaf029d80d7
Files: 175
Total size: 852.1 KB

Directory structure:
gitextract_1m8l_8vc/

├── .github/
│   └── FUNDING.yml
├── .gitignore
├── LICENSE
├── README-zh.md
├── README.md
├── bytejta-core/
│   ├── pom.xml
│   └── src/
│       └── main/
│           └── java/
│               └── org/
│                   └── bytesoft/
│                       ├── bytejta/
│                       │   ├── TransactionBeanFactoryImpl.java
│                       │   ├── TransactionCoordinator.java
│                       │   ├── TransactionImpl.java
│                       │   ├── TransactionManagerImpl.java
│                       │   ├── TransactionRecoveryImpl.java
│                       │   ├── TransactionRepositoryImpl.java
│                       │   ├── TransactionStrategy.java
│                       │   ├── UserTransactionImpl.java
│                       │   ├── VacantTransactionLock.java
│                       │   ├── logging/
│                       │   │   ├── ArchiveDeserializerImpl.java
│                       │   │   ├── SampleTransactionLogger.java
│                       │   │   ├── deserializer/
│                       │   │   │   ├── TransactionArchiveDeserializer.java
│                       │   │   │   └── XAResourceArchiveDeserializer.java
│                       │   │   └── store/
│                       │   │       ├── VirtualLoggingFile.java
│                       │   │       └── VirtualLoggingSystemImpl.java
│                       │   ├── resource/
│                       │   │   ├── XATerminatorImpl.java
│                       │   │   └── XATerminatorOptd.java
│                       │   ├── strategy/
│                       │   │   ├── CommonTransactionStrategy.java
│                       │   │   ├── LastResourceOptimizeStrategy.java
│                       │   │   ├── SimpleTransactionStrategy.java
│                       │   │   └── VacantTransactionStrategy.java
│                       │   ├── supports/
│                       │   │   ├── jdbc/
│                       │   │   │   ├── DataSourceHolder.java
│                       │   │   │   ├── LocalXACompatible.java
│                       │   │   │   ├── LocalXAConnection.java
│                       │   │   │   ├── LocalXAResource.java
│                       │   │   │   ├── LogicalConnection.java
│                       │   │   │   └── RecoveredResource.java
│                       │   │   └── resource/
│                       │   │       ├── CommonResourceDescriptor.java
│                       │   │       ├── LocalXAResourceDescriptor.java
│                       │   │       ├── RemoteResourceDescriptor.java
│                       │   │       └── UnidentifiedResourceDescriptor.java
│                       │   ├── work/
│                       │   │   └── TransactionWork.java
│                       │   └── xa/
│                       │       └── XidFactoryImpl.java
│                       ├── common/
│                       │   └── utils/
│                       │       ├── ByteUtils.java
│                       │       ├── CommonUtils.java
│                       │       └── SerializeUtils.java
│                       └── transaction/
│                           ├── CommitRequiredException.java
│                           ├── RemoteSystemException.java
│                           ├── RollbackRequiredException.java
│                           ├── Transaction.java
│                           ├── TransactionBeanFactory.java
│                           ├── TransactionContext.java
│                           ├── TransactionException.java
│                           ├── TransactionLock.java
│                           ├── TransactionManager.java
│                           ├── TransactionParticipant.java
│                           ├── TransactionRecovery.java
│                           ├── TransactionRepository.java
│                           ├── adapter/
│                           │   └── ResourceAdapterImpl.java
│                           ├── archive/
│                           │   ├── TransactionArchive.java
│                           │   └── XAResourceArchive.java
│                           ├── aware/
│                           │   ├── TransactionBeanFactoryAware.java
│                           │   ├── TransactionDebuggable.java
│                           │   └── TransactionEndpointAware.java
│                           ├── cmd/
│                           │   └── CommandDispatcher.java
│                           ├── internal/
│                           │   ├── SynchronizationImpl.java
│                           │   ├── SynchronizationList.java
│                           │   ├── TransactionListenerList.java
│                           │   └── TransactionResourceListenerList.java
│                           ├── logging/
│                           │   ├── ArchiveDeserializer.java
│                           │   ├── LoggingFlushable.java
│                           │   ├── TransactionLogger.java
│                           │   └── store/
│                           │       ├── VirtualLoggingKey.java
│                           │       ├── VirtualLoggingListener.java
│                           │       ├── VirtualLoggingRecord.java
│                           │       ├── VirtualLoggingSystem.java
│                           │       └── VirtualLoggingTrigger.java
│                           ├── recovery/
│                           │   ├── TransactionRecoveryCallback.java
│                           │   └── TransactionRecoveryListener.java
│                           ├── remote/
│                           │   ├── RemoteAddr.java
│                           │   ├── RemoteCoordinator.java
│                           │   ├── RemoteNode.java
│                           │   └── RemoteSvc.java
│                           ├── resource/
│                           │   └── XATerminator.java
│                           ├── supports/
│                           │   ├── TransactionExtra.java
│                           │   ├── TransactionListener.java
│                           │   ├── TransactionListenerAdapter.java
│                           │   ├── TransactionResourceListener.java
│                           │   ├── TransactionResourceListenerAdapter.java
│                           │   ├── TransactionStatistic.java
│                           │   ├── TransactionTimer.java
│                           │   ├── resource/
│                           │   │   └── XAResourceDescriptor.java
│                           │   ├── rpc/
│                           │   │   ├── TransactionInterceptor.java
│                           │   │   ├── TransactionRequest.java
│                           │   │   └── TransactionResponse.java
│                           │   └── serialize/
│                           │       └── XAResourceDeserializer.java
│                           ├── work/
│                           │   ├── SimpleWork.java
│                           │   ├── SimpleWorkListener.java
│                           │   └── SimpleWorkManager.java
│                           └── xa/
│                               ├── TransactionXid.java
│                               └── XidFactory.java
├── bytejta-supports/
│   ├── pom.xml
│   └── src/
│       └── main/
│           ├── java/
│           │   └── org/
│           │       └── bytesoft/
│           │           └── bytejta/
│           │               └── supports/
│           │                   ├── boot/
│           │                   │   └── jdbc/
│           │                   │       ├── DataSourceCciBuilder.java
│           │                   │       └── DataSourceSpiBuilder.java
│           │                   ├── internal/
│           │                   │   ├── RemoteCoordinatorRegistry.java
│           │                   │   └── TransactionCommandDispatcher.java
│           │                   ├── jdbc/
│           │                   │   └── LocalXADataSource.java
│           │                   ├── jpa/
│           │                   │   └── hibernate/
│           │                   │       └── HibernateJtaPlatform.java
│           │                   ├── resource/
│           │                   │   ├── ManagedConnectionFactoryHandler.java
│           │                   │   ├── ManagedConnectionHandler.java
│           │                   │   ├── ManagedXASessionHandler.java
│           │                   │   ├── jdbc/
│           │                   │   │   ├── CallableStatementImpl.java
│           │                   │   │   ├── ConnectionImpl.java
│           │                   │   │   ├── DatabaseMetaDataImpl.java
│           │                   │   │   ├── PreparedStatementImpl.java
│           │                   │   │   ├── StatementImpl.java
│           │                   │   │   ├── XAConnectionImpl.java
│           │                   │   │   └── XADataSourceImpl.java
│           │                   │   └── properties/
│           │                   │       ├── ConnectorResourcePropertySource.java
│           │                   │       └── ConnectorResourcePropertySourceFactory.java
│           │                   ├── rpc/
│           │                   │   ├── TransactionInterceptorImpl.java
│           │                   │   ├── TransactionRequestImpl.java
│           │                   │   └── TransactionResponseImpl.java
│           │                   ├── serialize/
│           │                   │   └── XAResourceDeserializerImpl.java
│           │                   └── spring/
│           │                       ├── ManagedConnectionFactoryPostProcessor.java
│           │                       ├── TransactionBeanFactoryAutoInjector.java
│           │                       └── TransactionDebuggablePostProcessor.java
│           └── resources/
│               ├── bytejta-supports-core.xml
│               ├── bytejta-supports-standalone.xml
│               └── bytejta-supports-task.xml
├── bytejta-supports-dubbo/
│   ├── pom.xml
│   └── src/
│       └── main/
│           ├── java/
│           │   └── org/
│           │       └── bytesoft/
│           │           └── bytejta/
│           │               └── supports/
│           │                   └── dubbo/
│           │                       ├── DubboRemoteCoordinator.java
│           │                       ├── InvocationContextRegistry.java
│           │                       ├── TransactionBeanRegistry.java
│           │                       ├── config/
│           │                       │   └── DubboSupportConfiguration.java
│           │                       ├── ext/
│           │                       │   └── ILoadBalancer.java
│           │                       ├── internal/
│           │                       │   ├── TransactionBeanConfigValidator.java
│           │                       │   ├── TransactionEndpointAutoInjector.java
│           │                       │   └── TransactionParticipantRegistrant.java
│           │                       ├── serialize/
│           │                       │   └── XAResourceDeserializerImpl.java
│           │                       └── spi/
│           │                           ├── TransactionLoadBalance.java
│           │                           ├── TransactionLoadBalancer.java
│           │                           └── TransactionServiceFilter.java
│           └── resources/
│               ├── META-INF/
│               │   └── dubbo/
│               │       ├── com.alibaba.dubbo.rpc.Filter
│               │       ├── com.alibaba.dubbo.rpc.cluster.LoadBalance
│               │       └── org.bytesoft.bytejta.supports.dubbo.ext.ILoadBalancer
│               └── bytejta-supports-dubbo.xml
├── bytejta-supports-springcloud/
│   ├── pom.xml
│   └── src/
│       └── main/
│           ├── java/
│           │   └── org/
│           │       └── bytesoft/
│           │           └── bytejta/
│           │               └── supports/
│           │                   └── springcloud/
│           │                       ├── SpringCloudBeanRegistry.java
│           │                       ├── SpringCloudCoordinator.java
│           │                       ├── SpringCloudEndpointPostProcessor.java
│           │                       ├── config/
│           │                       │   └── SpringCloudConfiguration.java
│           │                       ├── controller/
│           │                       │   └── TransactionCoordinatorController.java
│           │                       ├── dbcp/
│           │                       │   └── CommonDBCPXADataSourceWrapper.java
│           │                       ├── feign/
│           │                       │   ├── TransactionClientRegistry.java
│           │                       │   ├── TransactionFeignBeanPostProcessor.java
│           │                       │   ├── TransactionFeignContract.java
│           │                       │   ├── TransactionFeignDecoder.java
│           │                       │   ├── TransactionFeignErrorDecoder.java
│           │                       │   ├── TransactionFeignHandler.java
│           │                       │   └── TransactionFeignInterceptor.java
│           │                       ├── hystrix/
│           │                       │   ├── TransactionHystrixBeanPostProcessor.java
│           │                       │   ├── TransactionHystrixFallbackFactoryHandler.java
│           │                       │   ├── TransactionHystrixFallbackHandler.java
│           │                       │   ├── TransactionHystrixFeignHandler.java
│           │                       │   ├── TransactionHystrixInvocation.java
│           │                       │   ├── TransactionHystrixInvocationHandler.java
│           │                       │   └── TransactionHystrixMethodHandler.java
│           │                       ├── loadbalancer/
│           │                       │   ├── TransactionLoadBalancerInterceptor.java
│           │                       │   └── TransactionLoadBalancerRuleImpl.java
│           │                       ├── property/
│           │                       │   ├── TransactionPropertySource.java
│           │                       │   └── TransactionPropertySourceFactory.java
│           │                       ├── rule/
│           │                       │   ├── TransactionRule.java
│           │                       │   └── TransactionRuleImpl.java
│           │                       ├── serialize/
│           │                       │   └── XAResourceDeserializerImpl.java
│           │                       └── web/
│           │                           ├── TransactionHandlerInterceptor.java
│           │                           └── TransactionRequestInterceptor.java
│           └── resources/
│               └── bytejta-supports-springcloud.xml
└── pom.xml

================================================
FILE CONTENTS
================================================

================================================
FILE: .github/FUNDING.yml
================================================
# These are supported funding model platforms

github: # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2]
patreon: # Replace with a single Patreon username
open_collective: # Replace with a single Open Collective username
ko_fi: # Replace with a single Ko-fi username
tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
liberapay: # Replace with a single Liberapay username
issuehunt: # Replace with a single IssueHunt username
otechie: # Replace with a single Otechie username
custom: ['https://raw.githubusercontent.com/wiki/liuyangming/ByteTCC/resources/donation/liuyangming%40alipay.png', 'https://raw.githubusercontent.com/wiki/liuyangming/ByteTCC/resources/donation/liuyangming%40weixin.png'] # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2']


================================================
FILE: .gitignore
================================================
*.class

# Mobile Tools for Java (J2ME)
.mtj.tmp/

# Package Files #
*.jar
*.war
*.ear

# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
hs_err_pid*
.settings
/bytejta-core/.classpath
/bytejta-core/.project
/bytejta-core/.gitignore
/bytejta-supports/.classpath
/bytejta-supports/.gitignore
/bytejta-supports/.project
target
/bytejta-supports-dubbo/.classpath
/bytejta-supports-dubbo/.project
/bytejta-supports-springcloud/.classpath
/bytejta-supports-springcloud/.project
/bytejta-logger/.classpath
/bytejta-logger/.project
/bytejta-transaction-logger/.classpath
/bytejta-transaction-logger/.project


================================================
FILE: LICENSE
================================================
                   GNU LESSER GENERAL PUBLIC LICENSE
                       Version 3, 29 June 2007

 Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
 Everyone is permitted to copy and distribute verbatim copies
 of this license document, but changing it is not allowed.


  This version of the GNU Lesser General Public License incorporates
the terms and conditions of version 3 of the GNU General Public
License, supplemented by the additional permissions listed below.

  0. Additional Definitions.

  As used herein, "this License" refers to version 3 of the GNU Lesser
General Public License, and the "GNU GPL" refers to version 3 of the GNU
General Public License.

  "The Library" refers to a covered work governed by this License,
other than an Application or a Combined Work as defined below.

  An "Application" is any work that makes use of an interface provided
by the Library, but which is not otherwise based on the Library.
Defining a subclass of a class defined by the Library is deemed a mode
of using an interface provided by the Library.

  A "Combined Work" is a work produced by combining or linking an
Application with the Library.  The particular version of the Library
with which the Combined Work was made is also called the "Linked
Version".

  The "Minimal Corresponding Source" for a Combined Work means the
Corresponding Source for the Combined Work, excluding any source code
for portions of the Combined Work that, considered in isolation, are
based on the Application, and not on the Linked Version.

  The "Corresponding Application Code" for a Combined Work means the
object code and/or source code for the Application, including any data
and utility programs needed for reproducing the Combined Work from the
Application, but excluding the System Libraries of the Combined Work.

  1. Exception to Section 3 of the GNU GPL.

  You may convey a covered work under sections 3 and 4 of this License
without being bound by section 3 of the GNU GPL.

  2. Conveying Modified Versions.

  If you modify a copy of the Library, and, in your modifications, a
facility refers to a function or data to be supplied by an Application
that uses the facility (other than as an argument passed when the
facility is invoked), then you may convey a copy of the modified
version:

   a) under this License, provided that you make a good faith effort to
   ensure that, in the event an Application does not supply the
   function or data, the facility still operates, and performs
   whatever part of its purpose remains meaningful, or

   b) under the GNU GPL, with none of the additional permissions of
   this License applicable to that copy.

  3. Object Code Incorporating Material from Library Header Files.

  The object code form of an Application may incorporate material from
a header file that is part of the Library.  You may convey such object
code under terms of your choice, provided that, if the incorporated
material is not limited to numerical parameters, data structure
layouts and accessors, or small macros, inline functions and templates
(ten or fewer lines in length), you do both of the following:

   a) Give prominent notice with each copy of the object code that the
   Library is used in it and that the Library and its use are
   covered by this License.

   b) Accompany the object code with a copy of the GNU GPL and this license
   document.

  4. Combined Works.

  You may convey a Combined Work under terms of your choice that,
taken together, effectively do not restrict modification of the
portions of the Library contained in the Combined Work and reverse
engineering for debugging such modifications, if you also do each of
the following:

   a) Give prominent notice with each copy of the Combined Work that
   the Library is used in it and that the Library and its use are
   covered by this License.

   b) Accompany the Combined Work with a copy of the GNU GPL and this license
   document.

   c) For a Combined Work that displays copyright notices during
   execution, include the copyright notice for the Library among
   these notices, as well as a reference directing the user to the
   copies of the GNU GPL and this license document.

   d) Do one of the following:

       0) Convey the Minimal Corresponding Source under the terms of this
       License, and the Corresponding Application Code in a form
       suitable for, and under terms that permit, the user to
       recombine or relink the Application with a modified version of
       the Linked Version to produce a modified Combined Work, in the
       manner specified by section 6 of the GNU GPL for conveying
       Corresponding Source.

       1) Use a suitable shared library mechanism for linking with the
       Library.  A suitable mechanism is one that (a) uses at run time
       a copy of the Library already present on the user's computer
       system, and (b) will operate properly with a modified version
       of the Library that is interface-compatible with the Linked
       Version.

   e) Provide Installation Information, but only if you would otherwise
   be required to provide such information under section 6 of the
   GNU GPL, and only to the extent that such information is
   necessary to install and execute a modified version of the
   Combined Work produced by recombining or relinking the
   Application with a modified version of the Linked Version. (If
   you use option 4d0, the Installation Information must accompany
   the Minimal Corresponding Source and Corresponding Application
   Code. If you use option 4d1, you must provide the Installation
   Information in the manner specified by section 6 of the GNU GPL
   for conveying Corresponding Source.)

  5. Combined Libraries.

  You may place library facilities that are a work based on the
Library side by side in a single library together with other library
facilities that are not Applications and are not covered by this
License, and convey such a combined library under terms of your
choice, if you do both of the following:

   a) Accompany the combined library with a copy of the same work based
   on the Library, uncombined with any other library facilities,
   conveyed under the terms of this License.

   b) Give prominent notice with the combined library that part of it
   is a work based on the Library, and explaining where to find the
   accompanying uncombined form of the same work.

  6. Revised Versions of the GNU Lesser General Public License.

  The Free Software Foundation may publish revised and/or new versions
of the GNU Lesser General Public License from time to time. Such new
versions will be similar in spirit to the present version, but may
differ in detail to address new problems or concerns.

  Each version is given a distinguishing version number. If the
Library as you received it specifies that a certain numbered version
of the GNU Lesser General Public License "or any later version"
applies to it, you have the option of following the terms and
conditions either of that published version or of any later version
published by the Free Software Foundation. If the Library as you
received it does not specify a version number of the GNU Lesser
General Public License, you may choose any version of the GNU Lesser
General Public License ever published by the Free Software Foundation.

  If the Library as you received it specifies that a proxy can decide
whether future versions of the GNU Lesser General Public License shall
apply, that proxy's public statement of acceptance of any version is
permanent authorization for you to choose that version for the
Library.



================================================
FILE: README-zh.md
================================================
ByteJTA是一个基于XA/2PC机制的分布式事务管理器。实现了JTA接口,可以很好的与EJB、Spring等容器(本文档下文说明中将以Spring容器为例)进行集成。

## 一、文档 & 样例
* 使用文档: https://github.com/liuyangming/ByteJTA/wiki
* 使用样例: https://github.com/liuyangming/ByteJTA-sample

## 二、ByteJTA特性
* 1、支持Spring容器的声明式事务管理;
* 2、支持多数据源、跨应用、跨服务器等分布式事务场景;
* 3、支持spring cloud;
* 4、支持dubbo服务框架;

## 三、建议及改进
若您有任何建议,可以通过1)加入qq群537445956/606453172向群主提出,或2)发送邮件至bytefox#126.com向我反馈。本人承诺,任何建议都将会被认真考虑,优秀的建议将会被采用,但不保证一定会在当前版本中实现。


================================================
FILE: README.md
================================================

**ByteJTA** is an implementation of Distributed Transaction Manager, based on the XA/2PC mechanism. 

**ByteJTA** is comptible with JTA and could be seamlessly integrated with Spring and other Java containers.


## 1. Quick Start

#### 1.1 Add maven depenency
###### 1.1.1. Spring Cloud
```xml
<dependency>
	<groupId>org.bytesoft</groupId>
	<artifactId>bytejta-supports-springcloud</artifactId>
	<version>0.5.0-BETA9</version>
</dependency>
```
###### 1.1.2. dubbo
```xml
<dependency>
	<groupId>org.bytesoft</groupId>
	<artifactId>bytejta-supports-dubbo</artifactId>
	<version>0.5.0-BETA9</version>
</dependency>
```



## 2. Documentation & Samples
* [Document](https://github.com/liuyangming/ByteJTA/wiki)
* [Sample](https://github.com/liuyangming/ByteJTA-sample)



## 3. Features
* support declarative transaction management
* support distributed transaction scenarios. e.g. multi-datasource, cross-applications and cross-servers transaction
* support Dubbo framework
* support Spring Cloud



## 4. Contact Me
If you have any questions or comments regarding this project, please feel free to contact me at:

1. send mail to _[bytefox#126.com](bytefox@126.com)_
~OR~
2. add Tecent QQ group 537445956/606453172

We will review all the suggestions and implement good ones in future release.


================================================
FILE: bytejta-core/pom.xml
================================================
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
	xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
	<modelVersion>4.0.0</modelVersion>

	<parent>
		<groupId>org.bytesoft</groupId>
		<artifactId>bytejta-parent</artifactId>
		<version>0.5.0-BETA9</version>
	</parent>
	<artifactId>bytejta-core</artifactId>

	<packaging>jar</packaging>

	<name>bytejta-core</name>
	<description>The bytejta-core project is the core module of ByteJTA.</description>
	<url>http://www.bytesoft.org</url>

	<properties>
		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
	</properties>

	<dependencies>
		<dependency>
			<groupId>javax.transaction</groupId>
			<artifactId>javax.transaction-api</artifactId>
		</dependency>
		<dependency>
			<groupId>javax.jms</groupId>
			<artifactId>javax.jms-api</artifactId>
		</dependency>
		<dependency>
			<groupId>javax.resource</groupId>
			<artifactId>javax.resource-api</artifactId>
		</dependency>
		<dependency>
			<groupId>org.slf4j</groupId>
			<artifactId>slf4j-api</artifactId>
		</dependency>

		<dependency>
			<groupId>org.apache.commons</groupId>
			<artifactId>commons-lang3</artifactId>
		</dependency>
		<dependency>
			<groupId>commons-io</groupId>
			<artifactId>commons-io</artifactId>
		</dependency>

		<dependency>
			<groupId>com.caucho</groupId>
			<artifactId>hessian</artifactId>
		</dependency>
		<dependency>
			<groupId>com.esotericsoftware</groupId>
			<artifactId>kryo</artifactId>
		</dependency>

		<dependency>
			<groupId>javax.annotation</groupId>
			<artifactId>javax.annotation-api</artifactId>
		</dependency>
		<dependency>
			<groupId>javax.inject</groupId>
			<artifactId>javax.inject</artifactId>
		</dependency>

	</dependencies>
</project>


================================================
FILE: bytejta-core/src/main/java/org/bytesoft/bytejta/TransactionBeanFactoryImpl.java
================================================
/**
 * Copyright 2014-2016 yangming.liu<bytefox@126.com>.
 *
 * This copyrighted material is made available to anyone wishing to use, modify,
 * copy, or redistribute it subject to the terms and conditions of the GNU
 * Lesser General Public License, as published by the Free Software Foundation.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
 * or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Lesser General Public License
 * for more details.
 *
 * You should have received a copy of the GNU Lesser General Public License
 * along with this distribution; if not, see <http://www.gnu.org/licenses/>.
 */
package org.bytesoft.bytejta;

import org.bytesoft.transaction.TransactionBeanFactory;
import org.bytesoft.transaction.TransactionLock;
import org.bytesoft.transaction.TransactionManager;
import org.bytesoft.transaction.TransactionRecovery;
import org.bytesoft.transaction.TransactionRepository;
import org.bytesoft.transaction.logging.ArchiveDeserializer;
import org.bytesoft.transaction.logging.TransactionLogger;
import org.bytesoft.transaction.remote.RemoteCoordinator;
import org.bytesoft.transaction.supports.TransactionTimer;
import org.bytesoft.transaction.supports.rpc.TransactionInterceptor;
import org.bytesoft.transaction.supports.serialize.XAResourceDeserializer;
import org.bytesoft.transaction.xa.XidFactory;

public class TransactionBeanFactoryImpl implements TransactionBeanFactory {
	private static final TransactionBeanFactoryImpl instance = new TransactionBeanFactoryImpl();

	private TransactionManager transactionManager;
	private XidFactory xidFactory;
	private TransactionTimer transactionTimer;
	private TransactionLogger transactionLogger;
	private TransactionRepository transactionRepository;
	private TransactionInterceptor transactionInterceptor;
	private TransactionRecovery transactionRecovery;
	private RemoteCoordinator transactionCoordinator;
	private TransactionLock transactionLock;

	private ArchiveDeserializer archiveDeserializer;
	private XAResourceDeserializer resourceDeserializer;

	private TransactionBeanFactoryImpl() {
		if (instance != null) {
			throw new IllegalStateException();
		}
	}

	public static TransactionBeanFactoryImpl getInstance() {
		return instance;
	}

	public TransactionManager getTransactionManager() {
		return transactionManager;
	}

	public void setTransactionManager(TransactionManager transactionManager) {
		this.transactionManager = transactionManager;
	}

	public XidFactory getXidFactory() {
		return xidFactory;
	}

	public void setXidFactory(XidFactory xidFactory) {
		this.xidFactory = xidFactory;
	}

	public TransactionTimer getTransactionTimer() {
		return transactionTimer;
	}

	public void setTransactionTimer(TransactionTimer transactionTimer) {
		this.transactionTimer = transactionTimer;
	}

	public TransactionRepository getTransactionRepository() {
		return transactionRepository;
	}

	public void setTransactionRepository(TransactionRepository transactionRepository) {
		this.transactionRepository = transactionRepository;
	}

	public TransactionInterceptor getTransactionInterceptor() {
		return transactionInterceptor;
	}

	public void setTransactionInterceptor(TransactionInterceptor transactionInterceptor) {
		this.transactionInterceptor = transactionInterceptor;
	}

	public TransactionLock getTransactionLock() {
		return transactionLock;
	}

	public void setTransactionLock(TransactionLock transactionLock) {
		this.transactionLock = transactionLock;
	}

	public TransactionRecovery getTransactionRecovery() {
		return transactionRecovery;
	}

	public void setTransactionRecovery(TransactionRecovery transactionRecovery) {
		this.transactionRecovery = transactionRecovery;
	}

	public RemoteCoordinator getNativeParticipant() {
		return transactionCoordinator;
	}

	public void setTransactionCoordinator(RemoteCoordinator remoteCoordinator) {
		this.transactionCoordinator = remoteCoordinator;
	}

	public TransactionLogger getTransactionLogger() {
		return transactionLogger;
	}

	public void setTransactionLogger(TransactionLogger transactionLogger) {
		this.transactionLogger = transactionLogger;
	}

	public ArchiveDeserializer getArchiveDeserializer() {
		return archiveDeserializer;
	}

	public void setArchiveDeserializer(ArchiveDeserializer archiveDeserializer) {
		this.archiveDeserializer = archiveDeserializer;
	}

	public XAResourceDeserializer getResourceDeserializer() {
		return resourceDeserializer;
	}

	public void setResourceDeserializer(XAResourceDeserializer resourceDeserializer) {
		this.resourceDeserializer = resourceDeserializer;
	}

}


================================================
FILE: bytejta-core/src/main/java/org/bytesoft/bytejta/TransactionCoordinator.java
================================================
/**
 * Copyright 2014-2016 yangming.liu<bytefox@126.com>.
 *
 * This copyrighted material is made available to anyone wishing to use, modify,
 * copy, or redistribute it subject to the terms and conditions of the GNU
 * Lesser General Public License, as published by the Free Software Foundation.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
 * or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Lesser General Public License
 * for more details.
 *
 * You should have received a copy of the GNU Lesser General Public License
 * along with this distribution; if not, see <http://www.gnu.org/licenses/>.
 */
package org.bytesoft.bytejta;

import java.util.ArrayList;
import java.util.List;
import java.util.concurrent.locks.Lock;
import java.util.concurrent.locks.ReentrantLock;

import javax.transaction.HeuristicMixedException;
import javax.transaction.HeuristicRollbackException;
import javax.transaction.RollbackException;
import javax.transaction.Status;
import javax.transaction.SystemException;
import javax.transaction.xa.XAException;
import javax.transaction.xa.XAResource;
import javax.transaction.xa.Xid;

import org.bytesoft.common.utils.ByteUtils;
import org.bytesoft.common.utils.CommonUtils;
import org.bytesoft.transaction.CommitRequiredException;
import org.bytesoft.transaction.RollbackRequiredException;
import org.bytesoft.transaction.Transaction;
import org.bytesoft.transaction.TransactionBeanFactory;
import org.bytesoft.transaction.TransactionContext;
import org.bytesoft.transaction.TransactionException;
import org.bytesoft.transaction.TransactionManager;
import org.bytesoft.transaction.TransactionRepository;
import org.bytesoft.transaction.aware.TransactionBeanFactoryAware;
import org.bytesoft.transaction.aware.TransactionEndpointAware;
import org.bytesoft.transaction.remote.RemoteAddr;
import org.bytesoft.transaction.remote.RemoteCoordinator;
import org.bytesoft.transaction.remote.RemoteNode;
import org.bytesoft.transaction.xa.TransactionXid;
import org.bytesoft.transaction.xa.XidFactory;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

public class TransactionCoordinator implements RemoteCoordinator, TransactionBeanFactoryAware, TransactionEndpointAware {
	static final Logger logger = LoggerFactory.getLogger(TransactionCoordinator.class);

	@javax.inject.Inject
	private TransactionBeanFactory beanFactory;
	private String endpoint;

	private transient boolean ready = false;
	private final Lock lock = new ReentrantLock();

	public Transaction getTransactionQuietly() {
		TransactionManager transactionManager = this.beanFactory.getTransactionManager();
		return transactionManager.getTransactionQuietly();
	}

	public Transaction start(TransactionContext transactionContext, int flags) throws XAException {

		TransactionRepository transactionRepository = this.beanFactory.getTransactionRepository();
		TransactionManager transactionManager = this.beanFactory.getTransactionManager();
		if (transactionManager.getTransactionQuietly() != null) {
			throw new XAException(XAException.XAER_PROTO);
		}

		TransactionXid globalXid = (TransactionXid) transactionContext.getXid();
		Transaction transaction = null;
		try {
			transaction = transactionRepository.getTransaction(globalXid);
		} catch (TransactionException tex) {
			throw new XAException(XAException.XAER_RMERR);
		}

		if (transaction == null) {
			transaction = new TransactionImpl(transactionContext);
			((TransactionImpl) transaction).setBeanFactory(this.beanFactory);

			long expired = transactionContext.getExpiredTime();
			long current = System.currentTimeMillis();
			long timeoutMillis = (expired - current) / 1000L;
			transaction.setTransactionTimeout((int) timeoutMillis);

			transactionRepository.putTransaction(globalXid, transaction);
			logger.info("{}> begin-participant", ByteUtils.byteArrayToString(globalXid.getGlobalTransactionId()));
		}

		transactionManager.associateThread(transaction);
		// this.transactionStatistic.fireBeginTransaction(transaction);

		return transaction;
	}

	public Transaction end(TransactionContext transactionContext, int flags) throws XAException {
		TransactionManager transactionManager = this.beanFactory.getTransactionManager();
		return transactionManager.desociateThread();
	}

	/** supports resume only, for tcc transaction manager. */
	public void start(Xid xid, int flags) throws XAException {
		if (XAResource.TMRESUME != flags) {
			throw new XAException(XAException.XAER_INVAL);
		}
		TransactionManager transactionManager = this.beanFactory.getTransactionManager();
		XidFactory xidFactory = this.beanFactory.getXidFactory();
		Transaction current = transactionManager.getTransactionQuietly();
		if (current != null) {
			throw new XAException(XAException.XAER_PROTO);
		}

		TransactionRepository transactionRepository = this.beanFactory.getTransactionRepository();

		TransactionXid branchXid = (TransactionXid) xid;
		TransactionXid globalXid = xidFactory.createGlobalXid(branchXid.getGlobalTransactionId());

		Transaction transaction = null;
		try {
			transaction = transactionRepository.getTransaction(globalXid);
		} catch (TransactionException tex) {
			throw new XAException(XAException.XAER_RMERR);
		}

		if (transaction == null) {
			throw new XAException(XAException.XAER_NOTA);
		}
		transactionManager.associateThread(transaction);
	}

	/** supports suspend only, for tcc transaction manager. */
	public void end(Xid xid, int flags) throws XAException {
		if (XAResource.TMSUSPEND != flags) {
			throw new XAException(XAException.XAER_INVAL);
		}
		TransactionManager transactionManager = this.beanFactory.getTransactionManager();
		XidFactory xidFactory = this.beanFactory.getXidFactory();
		Transaction transaction = transactionManager.getTransactionQuietly();
		if (transaction == null) {
			throw new XAException(XAException.XAER_NOTA);
		}
		TransactionContext transactionContext = transaction.getTransactionContext();
		TransactionXid transactionXid = transactionContext.getXid();

		TransactionXid branchXid = (TransactionXid) xid;
		TransactionXid globalXid = xidFactory.createGlobalXid(branchXid.getGlobalTransactionId());

		if (CommonUtils.equals(globalXid, transactionXid) == false) {
			throw new XAException(XAException.XAER_INVAL);
		}
		transactionManager.desociateThread();
	}

	public void commit(Xid xid, boolean onePhaseCommit) throws XAException {
		this.checkParticipantReadyIfNecessary();

		XidFactory xidFactory = this.beanFactory.getXidFactory();
		TransactionXid branchXid = (TransactionXid) xid;
		TransactionXid globalXid = xidFactory.createGlobalXid(branchXid.getGlobalTransactionId());
		TransactionRepository repository = beanFactory.getTransactionRepository();
		Transaction transaction = null;
		try {
			transaction = repository.getTransaction(globalXid);
		} catch (TransactionException tex) {
			throw new XAException(XAException.XAER_RMERR);
		}

		if (transaction == null) {
			throw new XAException(XAException.XAER_NOTA);
		}

		if (onePhaseCommit) {
			try {
				this.beanFactory.getTransactionManager().associateThread(transaction);
				transaction.fireBeforeTransactionCompletion();
				this.beanFactory.getTransactionTimer().stopTiming(transaction);
			} catch (RollbackRequiredException rrex) {
				this.rollback(xid);
				XAException xaex = new XAException(XAException.XA_HEURRB);
				xaex.initCause(rrex);
				throw xaex;
			} catch (SystemException ex) {
				this.rollback(xid);
				XAException xaex = new XAException(XAException.XA_HEURRB);
				xaex.initCause(ex);
				throw xaex;
			} catch (RuntimeException rex) {
				this.rollback(xid);
				XAException xaex = new XAException(XAException.XA_HEURRB);
				xaex.initCause(rex);
				throw xaex;
			} finally {
				this.beanFactory.getTransactionManager().desociateThread();
			}
		} // end-if (onePhaseCommit)

		try {
			transaction.participantCommit(onePhaseCommit);
			transaction.forgetQuietly(); // forget transaction
		} catch (SecurityException ex) {
			logger.error("{}> Error occurred while committing remote coordinator.",
					ByteUtils.byteArrayToString(xid.getGlobalTransactionId()), ex);
			repository.putErrorTransaction(globalXid, transaction);

			XAException xaex = new XAException(XAException.XAER_RMERR);
			xaex.initCause(ex);
			throw xaex;
		} catch (CommitRequiredException ex) {
			logger.error("{}> Error occurred while committing remote coordinator.",
					ByteUtils.byteArrayToString(xid.getGlobalTransactionId()), ex);
			repository.putErrorTransaction(globalXid, transaction);

			XAException xaex = new XAException(XAException.XAER_RMERR);
			xaex.initCause(ex);
			throw xaex;
		} catch (RollbackException ex) {
			logger.error("{}> Error occurred while committing remote coordinator, tx has been rolled back.",
					ByteUtils.byteArrayToString(xid.getGlobalTransactionId()), ex);

			// don't forget if branch-transaction has been hueristic completed.
			repository.putErrorTransaction(globalXid, transaction);

			XAException xaex = new XAException(XAException.XA_HEURRB);
			xaex.initCause(ex);
			throw xaex;
		} catch (HeuristicMixedException ex) {
			logger.error("{}> Error occurred while committing remote coordinator, tx has been completed mixed.",
					ByteUtils.byteArrayToString(xid.getGlobalTransactionId()), ex);

			// don't forget if branch-transaction has been hueristic completed.
			repository.putErrorTransaction(globalXid, transaction);

			XAException xaex = new XAException(XAException.XA_HEURMIX);
			xaex.initCause(ex);
			throw xaex;
		} catch (HeuristicRollbackException ex) {
			logger.error("{}> Error occurred while committing remote coordinator, tx has been rolled back heuristically.",
					ByteUtils.byteArrayToString(xid.getGlobalTransactionId()), ex);

			// don't forget if branch-transaction has been hueristic completed.
			repository.putErrorTransaction(globalXid, transaction);

			XAException xaex = new XAException(XAException.XA_HEURRB);
			xaex.initCause(ex);
			throw xaex;
		} catch (SystemException ex) {
			logger.error("{}> Error occurred while committing remote coordinator.",
					ByteUtils.byteArrayToString(xid.getGlobalTransactionId()), ex);
			repository.putErrorTransaction(globalXid, transaction);

			XAException xaex = new XAException(XAException.XAER_RMERR);
			xaex.initCause(ex);
			throw xaex;
		} catch (RuntimeException ex) {
			logger.error("{}> Error occurred while committing remote coordinator.",
					ByteUtils.byteArrayToString(xid.getGlobalTransactionId()), ex);
			repository.putErrorTransaction(globalXid, transaction);

			XAException xaex = new XAException(XAException.XAER_RMERR);
			xaex.initCause(ex);
			throw xaex;
		} finally {
			transaction.fireAfterTransactionCompletion();
		}
	}

	public void forgetQuietly(Xid xid) {
		try {
			this.forget(xid);
		} catch (XAException ex) {
			switch (ex.errorCode) {
			case XAException.XAER_NOTA:
				break;
			default:
				logger.error("{}> Error occurred while forgeting remote coordinator.",
						ByteUtils.byteArrayToString(xid.getGlobalTransactionId()), ex);
			}
		} catch (RuntimeException ex) {
			logger.error("{}> Error occurred while forgeting remote coordinator.",
					ByteUtils.byteArrayToString(xid.getGlobalTransactionId()), ex);
		}
	}

	public void forget(Xid xid) throws XAException {
		this.checkParticipantReadyIfNecessary();

		if (xid == null) {
			throw new XAException(XAException.XAER_INVAL);
		}

		XidFactory xidFactory = this.beanFactory.getXidFactory();
		TransactionXid branchXid = (TransactionXid) xid;
		TransactionXid globalXid = xidFactory.createGlobalXid(branchXid.getGlobalTransactionId());
		TransactionRepository transactionRepository = beanFactory.getTransactionRepository();
		Transaction transaction = null;
		try {
			transaction = transactionRepository.getErrorTransaction(globalXid);
		} catch (TransactionException tex) {
			throw new XAException(XAException.XAER_RMERR);
		}

		if (transaction == null) {
			throw new XAException(XAException.XAER_NOTA);
		}

		try {
			transaction.forget();
		} catch (SystemException ex) {
			logger.error("{}> Error occurred while forgeting remote coordinator.",
					ByteUtils.byteArrayToString(xid.getGlobalTransactionId()), ex);
			throw new XAException(XAException.XAER_RMERR);
		} catch (RuntimeException rex) {
			logger.error("{}> Error occurred while forgeting remote coordinator.",
					ByteUtils.byteArrayToString(xid.getGlobalTransactionId()), rex);
			throw new XAException(XAException.XAER_RMERR);
		}
	}

	public int getTransactionTimeout() throws XAException {
		return 0;
	}

	public boolean isSameRM(XAResource xares) throws XAException {
		throw new XAException(XAException.XAER_RMERR);
	}

	public int prepare(Xid xid) throws XAException {
		this.checkParticipantReadyIfNecessary();

		XidFactory xidFactory = this.beanFactory.getXidFactory();
		TransactionXid branchXid = (TransactionXid) xid;
		TransactionXid globalXid = xidFactory.createGlobalXid(branchXid.getGlobalTransactionId());
		TransactionRepository repository = beanFactory.getTransactionRepository();
		Transaction transaction = null;
		try {
			transaction = repository.getTransaction(globalXid);
		} catch (TransactionException tex) {
			throw new XAException(XAException.XAER_RMERR);
		}

		if (transaction == null) {
			throw new XAException(XAException.XAER_NOTA);
		}

		try {
			this.beanFactory.getTransactionManager().associateThread(transaction);
			transaction.fireBeforeTransactionCompletion();
			this.beanFactory.getTransactionTimer().stopTiming(transaction);
		} catch (RollbackRequiredException rrex) {
			throw new XAException(XAException.XAER_RMERR);
		} catch (SystemException ex) {
			throw new XAException(XAException.XAER_RMERR);
		} catch (RuntimeException rex) {
			throw new XAException(XAException.XAER_RMERR);
		} finally {
			this.beanFactory.getTransactionManager().desociateThread();
		}

		int participantVote = XAResource.XA_OK;
		try {
			participantVote = transaction.participantPrepare();
		} catch (CommitRequiredException crex) {
			participantVote = XAResource.XA_OK;
		} catch (RollbackRequiredException rrex) {
			throw new XAException(XAException.XAER_RMERR);
		} finally {
			if (participantVote == XAResource.XA_RDONLY) {
				transaction.fireAfterTransactionCompletion();
			} // end-if (participantVote == XAResource.XA_RDONLY)
		}

		return participantVote;
	}

	public Xid[] recover(int flag) throws XAException {
		this.checkParticipantReadyIfNecessary();

		TransactionRepository repository = beanFactory.getTransactionRepository();
		List<Transaction> allTransactionList = repository.getActiveTransactionList();

		List<Transaction> transactions = new ArrayList<Transaction>();
		for (int i = 0; i < allTransactionList.size(); i++) {
			Transaction transaction = allTransactionList.get(i);
			int transactionStatus = transaction.getTransactionStatus();
			if (transactionStatus == Status.STATUS_PREPARED || transactionStatus == Status.STATUS_COMMITTING
					|| transactionStatus == Status.STATUS_ROLLING_BACK || transactionStatus == Status.STATUS_COMMITTED
					|| transactionStatus == Status.STATUS_ROLLEDBACK) {
				transactions.add(transaction);
			} else if (transaction.getTransactionContext().isRecoveried()) {
				transactions.add(transaction);
			}
		}

		TransactionXid[] xidArray = new TransactionXid[transactions.size()];
		for (int i = 0; i < transactions.size(); i++) {
			Transaction transaction = transactions.get(i);
			xidArray[i] = transaction.getTransactionContext().getXid();
		}

		return xidArray;
	}

	public void rollback(Xid xid) throws XAException {
		this.checkParticipantReadyIfNecessary();

		XidFactory xidFactory = this.beanFactory.getXidFactory();
		TransactionXid branchXid = (TransactionXid) xid;
		TransactionXid globalXid = xidFactory.createGlobalXid(branchXid.getGlobalTransactionId());
		TransactionRepository repository = beanFactory.getTransactionRepository();
		Transaction transaction = null;
		try {
			transaction = repository.getTransaction(globalXid);
		} catch (TransactionException tex) {
			throw new XAException(XAException.XAER_RMERR);
		}

		if (transaction == null) {
			throw new XAException(XAException.XAER_NOTA);
		}

		try {
			this.beanFactory.getTransactionManager().associateThread(transaction);
			transaction.fireBeforeTransactionCompletionQuietly();
			this.beanFactory.getTransactionManager().desociateThread();

			this.beanFactory.getTransactionTimer().stopTiming(transaction);

			transaction.participantRollback();
			transaction.forgetQuietly(); // forget transaction
		} catch (RollbackRequiredException rrex) {
			logger.error("{}> Error occurred while rolling back remote coordinator.",
					ByteUtils.byteArrayToString(xid.getGlobalTransactionId()), rrex);
			repository.putErrorTransaction(globalXid, transaction);

			XAException xaex = new XAException(XAException.XAER_RMERR);
			xaex.initCause(rrex);
			throw xaex;
		} catch (SystemException ex) {
			logger.error("{}> Error occurred while rolling back remote coordinator.",
					ByteUtils.byteArrayToString(xid.getGlobalTransactionId()), ex);
			repository.putErrorTransaction(globalXid, transaction);

			XAException xaex = new XAException(XAException.XAER_RMERR);
			xaex.initCause(ex);
			throw xaex;
		} catch (RuntimeException rrex) {
			logger.error("{}> Error occurred while rolling back remote coordinator.",
					ByteUtils.byteArrayToString(xid.getGlobalTransactionId()), rrex);
			repository.putErrorTransaction(globalXid, transaction);

			XAException xaex = new XAException(XAException.XAER_RMERR);
			xaex.initCause(rrex);
			throw xaex;
		} finally {
			transaction.fireAfterTransactionCompletion();
		}
	}

	public void markParticipantReady() {
		try {
			this.lock.lock();
			this.ready = true;
		} finally {
			this.lock.unlock();
		}
	}

	private void checkParticipantReadyIfNecessary() throws XAException {
		if (this.ready == false) {
			this.checkParticipantReady();
		}
	}

	private void checkParticipantReady() throws XAException {
		try {
			this.lock.lock();
			if (this.ready == false) {
				throw new XAException(XAException.XAER_RMFAIL);
			}
		} finally {
			this.lock.unlock();
		}
	}

	public boolean setTransactionTimeout(int seconds) throws XAException {
		return false;
	}

	public String getEndpoint() {
		return endpoint;
	}

	public void setEndpoint(String identifier) {
		this.endpoint = identifier;
	}

	public RemoteAddr getRemoteAddr() {
		return CommonUtils.getRemoteAddr(this.endpoint);
	}

	public RemoteNode getRemoteNode() {
		return CommonUtils.getRemoteNode(this.endpoint);
	}

	public String getIdentifier() {
		return this.endpoint;
	}

	public String getApplication() {
		return CommonUtils.getApplication(this.endpoint);
	}

	public TransactionBeanFactory getBeanFactory() {
		return this.beanFactory;
	}

	public void setBeanFactory(TransactionBeanFactory tbf) {
		this.beanFactory = tbf;
	}

}


================================================
FILE: bytejta-core/src/main/java/org/bytesoft/bytejta/TransactionImpl.java
================================================
/**
 * Copyright 2014-2016 yangming.liu<bytefox@126.com>.
 *
 * This copyrighted material is made available to anyone wishing to use, modify,
 * copy, or redistribute it subject to the terms and conditions of the GNU
 * Lesser General Public License, as published by the Free Software Foundation.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
 * or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Lesser General Public License
 * for more details.
 *
 * You should have received a copy of the GNU Lesser General Public License
 * along with this distribution; if not, see <http://www.gnu.org/licenses/>.
 */
package org.bytesoft.bytejta;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

import javax.transaction.HeuristicCommitException;
import javax.transaction.HeuristicMixedException;
import javax.transaction.HeuristicRollbackException;
import javax.transaction.RollbackException;
import javax.transaction.Status;
import javax.transaction.Synchronization;
import javax.transaction.SystemException;
import javax.transaction.xa.XAException;
import javax.transaction.xa.XAResource;
import javax.transaction.xa.Xid;

import org.apache.commons.lang3.StringUtils;
import org.bytesoft.bytejta.resource.XATerminatorImpl;
import org.bytesoft.bytejta.resource.XATerminatorOptd;
import org.bytesoft.bytejta.strategy.CommonTransactionStrategy;
import org.bytesoft.bytejta.strategy.LastResourceOptimizeStrategy;
import org.bytesoft.bytejta.strategy.SimpleTransactionStrategy;
import org.bytesoft.bytejta.strategy.VacantTransactionStrategy;
import org.bytesoft.bytejta.supports.jdbc.LocalXAResource;
import org.bytesoft.bytejta.supports.resource.CommonResourceDescriptor;
import org.bytesoft.bytejta.supports.resource.LocalXAResourceDescriptor;
import org.bytesoft.bytejta.supports.resource.RemoteResourceDescriptor;
import org.bytesoft.bytejta.supports.resource.UnidentifiedResourceDescriptor;
import org.bytesoft.common.utils.ByteUtils;
import org.bytesoft.common.utils.CommonUtils;
import org.bytesoft.transaction.CommitRequiredException;
import org.bytesoft.transaction.RollbackRequiredException;
import org.bytesoft.transaction.Transaction;
import org.bytesoft.transaction.TransactionBeanFactory;
import org.bytesoft.transaction.TransactionContext;
import org.bytesoft.transaction.TransactionRepository;
import org.bytesoft.transaction.archive.TransactionArchive;
import org.bytesoft.transaction.archive.XAResourceArchive;
import org.bytesoft.transaction.internal.SynchronizationList;
import org.bytesoft.transaction.internal.TransactionListenerList;
import org.bytesoft.transaction.internal.TransactionResourceListenerList;
import org.bytesoft.transaction.logging.TransactionLogger;
import org.bytesoft.transaction.remote.RemoteCoordinator;
import org.bytesoft.transaction.remote.RemoteSvc;
import org.bytesoft.transaction.supports.TransactionExtra;
import org.bytesoft.transaction.supports.TransactionListener;
import org.bytesoft.transaction.supports.TransactionResourceListener;
import org.bytesoft.transaction.supports.resource.XAResourceDescriptor;
import org.bytesoft.transaction.xa.TransactionXid;
import org.bytesoft.transaction.xa.XidFactory;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

public class TransactionImpl implements Transaction {
	static final Logger logger = LoggerFactory.getLogger(TransactionImpl.class);

	private transient boolean timing = true;
	private TransactionBeanFactory beanFactory;

	private TransactionStrategy transactionStrategy;

	private int transactionStatus;
	private int transactionTimeout;
	private int transactionVote;
	private TransactionExtra transactionalExtra;
	private final TransactionContext transactionContext;

	private final TransactionResourceListenerList resourceListenerList = new TransactionResourceListenerList();

	private final Map<RemoteSvc, XAResourceArchive> remoteParticipantMap = new HashMap<RemoteSvc, XAResourceArchive>();
	private final Map<String, XAResourceArchive> nativeParticipantMap = new HashMap<String, XAResourceArchive>();
	private XAResourceArchive participant; // last resource
	private final List<XAResourceArchive> participantList = new ArrayList<XAResourceArchive>();
	private final List<XAResourceArchive> nativeParticipantList = new ArrayList<XAResourceArchive>();
	private final List<XAResourceArchive> remoteParticipantList = new ArrayList<XAResourceArchive>();

	private final SynchronizationList synchronizationList = new SynchronizationList();
	private final TransactionListenerList transactionListenerList = new TransactionListenerList();

	private transient Exception createdAt;

	public TransactionImpl(TransactionContext txContext) {
		this.transactionContext = txContext;
	}

	public synchronized int participantPrepare() throws RollbackRequiredException, CommitRequiredException {

		if (this.transactionStatus == Status.STATUS_MARKED_ROLLBACK) {
			throw new RollbackRequiredException();
		} else if (this.transactionStatus == Status.STATUS_ROLLEDBACK) {
			throw new RollbackRequiredException();
		} else if (this.transactionStatus == Status.STATUS_ROLLING_BACK) {
			throw new RollbackRequiredException();
		} else if (this.transactionStatus == Status.STATUS_UNKNOWN) {
			throw new RollbackRequiredException();
		} else if (this.transactionStatus == Status.STATUS_NO_TRANSACTION) {
			// it's impossible
			throw new RollbackRequiredException();
		} else if (this.transactionStatus == Status.STATUS_PREPARED) {
			throw new CommitRequiredException();
		} else if (this.transactionStatus == Status.STATUS_COMMITTING) {
			throw new CommitRequiredException();
		} else if (this.transactionStatus == Status.STATUS_COMMITTED) {
			throw new CommitRequiredException();
		} /* else active, preparing {} */

		TransactionLogger transactionLogger = beanFactory.getTransactionLogger();
		TransactionXid xid = this.transactionContext.getXid();

		this.transactionStatus = Status.STATUS_PREPARING;
		TransactionArchive archive = this.getTransactionArchive();
		transactionLogger.createTransaction(archive);
		this.transactionListenerList.onPrepareStart(xid);
		logger.info("{}> prepare-participant start", ByteUtils.byteArrayToString(xid.getGlobalTransactionId()));
		try {
			TransactionStrategy currentStrategy = this.getTransactionStrategy();
			int vote = currentStrategy.prepare(xid);

			this.transactionStatus = Status.STATUS_PREPARED;
			archive.setStatus(this.transactionStatus);
			this.transactionVote = vote;
			archive.setVote(vote);

			this.transactionListenerList.onPrepareSuccess(xid);
			logger.info("{}> prepare-participant complete successfully",
					ByteUtils.byteArrayToString(xid.getGlobalTransactionId()));

			return vote;
		} catch (CommitRequiredException crex) {
			this.transactionVote = XAResource.XA_OK;
			archive.setVote(this.transactionVote);

			this.transactionStatus = Status.STATUS_COMMITTING;
			archive.setStatus(this.transactionStatus);

			this.transactionListenerList.onPrepareSuccess(xid);
			logger.info("{}> prepare-participant complete successfully",
					ByteUtils.byteArrayToString(xid.getGlobalTransactionId()));

			throw crex;
		} catch (RollbackRequiredException rrex) {
			this.transactionStatus = Status.STATUS_ROLLING_BACK;
			archive.setStatus(this.transactionStatus);

			this.transactionListenerList.onPrepareFailure(xid);
			logger.info("{}> prepare-participant failed", ByteUtils.byteArrayToString(xid.getGlobalTransactionId()));

			throw rrex;
		} catch (RuntimeException xaex) {
			this.transactionStatus = Status.STATUS_ROLLING_BACK;
			archive.setStatus(this.transactionStatus);

			this.transactionListenerList.onPrepareFailure(xid);
			logger.info("{}> prepare-participant failed", ByteUtils.byteArrayToString(xid.getGlobalTransactionId()));

			RollbackRequiredException rrex = new RollbackRequiredException();
			rrex.initCause(xaex);
			throw rrex;
		} finally {
			transactionLogger.updateTransaction(archive);
		}
	}

	public synchronized void recoveryCommit() throws CommitRequiredException, SystemException {
		TransactionXid xid = this.transactionContext.getXid();
		try {
			this.recoverIfNecessary(); // Recover if transaction is recovered from tx-log.

			this.transactionContext.setRecoveredTimes(this.transactionContext.getRecoveredTimes() + 1);
			this.transactionContext.setCreatedTime(System.currentTimeMillis());

			this.invokeParticipantCommit(false);
		} catch (HeuristicMixedException ex) {
			logger.error("{}> recover: branch={}, status= mixed, message= {}",
					ByteUtils.byteArrayToString(xid.getGlobalTransactionId()),
					ByteUtils.byteArrayToString(xid.getBranchQualifier()), ex.getMessage(), ex);
			SystemException sysEx = new SystemException();
			sysEx.initCause(ex);
			throw sysEx;
		} catch (HeuristicRollbackException ex) {
			logger.error("{}> recover: branch={}, status= rolledback",
					ByteUtils.byteArrayToString(xid.getGlobalTransactionId()),
					ByteUtils.byteArrayToString(xid.getBranchQualifier()), ex);
			SystemException sysEx = new SystemException();
			sysEx.initCause(ex);
			throw sysEx;
		}
	}

	/* opc: true, compensable-transaction & remote-coordinator; false, remote-coordinator */
	public synchronized void participantCommit(boolean opc) throws RollbackException, HeuristicMixedException,
			HeuristicRollbackException, SecurityException, IllegalStateException, CommitRequiredException, SystemException {
		if (this.transactionContext.isRecoveried()) {
			this.recover(); // Execute recoveryInit if transaction is recovered from tx-log.
			this.invokeParticipantCommit(opc);
			return;
		} // end-if (this.transactionContext.isRecoveried())

		Transaction transaction = //
				Transaction.class.isInstance(this.transactionalExtra) ? (Transaction) this.transactionalExtra : null;
		TransactionContext transactionContext = transaction == null ? null : transaction.getTransactionContext();
		TransactionXid transactionXid = transactionContext == null ? null : transactionContext.getXid();
		boolean compensable = transactionXid != null && XidFactory.TCC_FORMAT_ID == transactionXid.getFormatId();
		if (compensable) {
			this.compensableOnePhaseCommit();
		} else if (opc) {
			this.participantOnePhaseCommit();
		} else {
			this.participantTwoPhaseCommit();
		}
	}

	private void checkForTransactionExtraIfNecessary() throws RollbackException, HeuristicMixedException,
			HeuristicRollbackException, SecurityException, IllegalStateException, CommitRequiredException, SystemException {

		if (this.transactionalExtra != null) /* for ByteTCC */ {
			if (this.participantList.isEmpty() == false && this.participant == null) /* see initGetTransactionStrategy */ {
				this.participantRollback();
				throw new HeuristicRollbackException();
			} else if (this.participantList.size() > 1) {
				this.participantRollback();
				throw new HeuristicRollbackException();
			}
		} // end-if (this.transactionalExtra != null)

	}

	private void compensableOnePhaseCommit() throws RollbackException, HeuristicMixedException, HeuristicRollbackException,
			SecurityException, IllegalStateException, CommitRequiredException, SystemException {
		this.checkForTransactionExtraIfNecessary();

		if (this.transactionStatus == Status.STATUS_MARKED_ROLLBACK) {
			this.participantRollback();
			throw new HeuristicRollbackException();
		} else if (this.transactionStatus == Status.STATUS_ROLLING_BACK) {
			throw new HeuristicMixedException();
		} else if (this.transactionStatus == Status.STATUS_ROLLEDBACK) {
			throw new HeuristicRollbackException();
		} else if (this.transactionStatus == Status.STATUS_UNKNOWN) {
			throw new IllegalStateException();
		} else if (this.transactionStatus == Status.STATUS_NO_TRANSACTION) {
			throw new IllegalStateException();
		} else if (this.transactionStatus == Status.STATUS_COMMITTED) {
			return;
		} /* else active, preparing, prepared, committing {} */

		TransactionXid xid = this.transactionContext.getXid();
		try {
			this.transactionStatus = Status.STATUS_COMMITTING;
			TransactionArchive archive = this.getTransactionArchive();
			this.transactionListenerList.onCommitStart(xid);
			logger.info("{}> commit-participant start", ByteUtils.byteArrayToString(xid.getGlobalTransactionId()));
			// transactionLogger.updateTransaction(archive); // unneccessary
			TransactionStrategy currentStrategy = this.getTransactionStrategy();
			currentStrategy.commit(xid, true);

			this.transactionStatus = Status.STATUS_COMMITTED; // Status.STATUS_COMMITTED;
			archive.setStatus(this.transactionStatus);
			this.transactionListenerList.onCommitSuccess(xid);
			logger.info("{}> commit-participant complete successfully",
					ByteUtils.byteArrayToString(xid.getGlobalTransactionId()));

			// transactionLogger.updateTransaction(archive); // unneccessary
		} catch (HeuristicMixedException ex) {
			this.transactionListenerList.onCommitHeuristicMixed(xid); // should never happen
			throw ex;
		} catch (HeuristicRollbackException ex) {
			this.transactionListenerList.onCommitHeuristicRolledback(xid);
			throw ex;
		} catch (SystemException ex) {
			this.transactionListenerList.onCommitFailure(xid);
			throw ex;
		} catch (RuntimeException ex) {
			this.transactionListenerList.onCommitFailure(xid);
			SystemException error = new SystemException();
			error.initCause(ex);
			throw error;
		}
	}

	private void participantOnePhaseCommit() throws RollbackException, HeuristicMixedException, HeuristicRollbackException,
			SecurityException, IllegalStateException, CommitRequiredException, SystemException {

		this.checkForTransactionExtraIfNecessary();

		if (this.transactionStatus == Status.STATUS_MARKED_ROLLBACK) {
			this.participantRollback();
			throw new HeuristicRollbackException();
		} else if (this.transactionStatus == Status.STATUS_ROLLING_BACK) {
			throw new HeuristicMixedException();
		} else if (this.transactionStatus == Status.STATUS_ROLLEDBACK) {
			throw new HeuristicRollbackException();
		} else if (this.transactionStatus == Status.STATUS_UNKNOWN) {
			throw new IllegalStateException();
		} else if (this.transactionStatus == Status.STATUS_NO_TRANSACTION) {
			throw new IllegalStateException();
		} else if (this.transactionStatus == Status.STATUS_COMMITTED) {
			return;
		} /* else active, preparing, prepared, committing {} */

		try {
			try {
				this.invokeParticipantPrepare();
			} catch (CommitRequiredException crex) {
				/* some RMs has already been committed. */
			}

			this.invokeParticipantCommit(true);
		} catch (RollbackRequiredException rrex) {
			this.participantRollback();
			HeuristicRollbackException hrex = new HeuristicRollbackException();
			hrex.initCause(rrex);
			throw hrex;
		} catch (SystemException ex) {
			this.participantRollback();
			HeuristicRollbackException hrex = new HeuristicRollbackException();
			hrex.initCause(ex);
			throw hrex;
		} catch (RuntimeException rex) {
			this.participantRollback();
			HeuristicRollbackException hrex = new HeuristicRollbackException();
			hrex.initCause(rex);
			throw hrex;
		}

	}

	private void participantTwoPhaseCommit() throws RollbackException, HeuristicMixedException, HeuristicRollbackException,
			SecurityException, IllegalStateException, CommitRequiredException, SystemException {

		if (this.transactionStatus == Status.STATUS_ACTIVE) {
			throw new IllegalStateException();
		} else if (this.transactionStatus == Status.STATUS_MARKED_ROLLBACK) {
			this.participantRollback();
			throw new HeuristicRollbackException();
		} else if (this.transactionStatus == Status.STATUS_ROLLING_BACK) {
			throw new HeuristicMixedException();
		} else if (this.transactionStatus == Status.STATUS_ROLLEDBACK) {
			throw new HeuristicRollbackException();
		} else if (this.transactionStatus == Status.STATUS_UNKNOWN) {
			throw new IllegalStateException();
		} else if (this.transactionStatus == Status.STATUS_NO_TRANSACTION) {
			throw new IllegalStateException();
		} else if (this.transactionStatus == Status.STATUS_COMMITTED) {
			return;
		} /* else preparing, prepared, committing {} */

		try {
			this.invokeParticipantCommit(false);
		} catch (RollbackRequiredException rrex) {
			this.participantRollback();
			HeuristicRollbackException hrex = new HeuristicRollbackException();
			hrex.initCause(rrex);
			throw hrex;
		} catch (SystemException ex) {
			this.participantRollback();
			HeuristicRollbackException hrex = new HeuristicRollbackException();
			hrex.initCause(ex);
			throw hrex;
		} catch (RuntimeException rex) {
			this.participantRollback();
			HeuristicRollbackException hrex = new HeuristicRollbackException();
			hrex.initCause(rex);
			throw hrex;
		}

	}

	private void invokeParticipantPrepare() throws RollbackRequiredException, CommitRequiredException {
		TransactionLogger transactionLogger = beanFactory.getTransactionLogger();
		TransactionXid xid = this.transactionContext.getXid();
		logger.info("{}> prepare-participant start", ByteUtils.byteArrayToString(xid.getGlobalTransactionId()));

		this.transactionStatus = Status.STATUS_PREPARING;
		TransactionArchive archive = this.getTransactionArchive();
		this.transactionListenerList.onPrepareStart(xid);
		transactionLogger.createTransaction(archive); // transactionLogger.updateTransaction(archive);

		CommitRequiredException commitRequired = null;
		try {
			TransactionStrategy currentStrategy = this.getTransactionStrategy();
			currentStrategy.prepare(xid);
		} catch (CommitRequiredException ex) {
			commitRequired = ex;
		} catch (RollbackRequiredException ex) {
			this.transactionListenerList.onPrepareFailure(xid);
			logger.info("{}> prepare-participant failed", ByteUtils.byteArrayToString(xid.getGlobalTransactionId()));
			throw ex;
		} catch (RuntimeException ex) {
			this.transactionListenerList.onPrepareFailure(xid);
			logger.info("{}> prepare-participant failed", ByteUtils.byteArrayToString(xid.getGlobalTransactionId()));
			throw ex;
		}

		this.transactionStatus = Status.STATUS_PREPARED;
		archive.setStatus(this.transactionStatus);
		this.transactionListenerList.onPrepareSuccess(xid);
		transactionLogger.updateTransaction(archive);
		logger.info("{}> prepare-participant complete successfully", ByteUtils.byteArrayToString(xid.getGlobalTransactionId()));

		if (commitRequired != null) {
			throw commitRequired;
		} // end-if (commitRequired != null)

	}

	private void invokeParticipantCommit(boolean onePhaseCommit)
			throws HeuristicMixedException, HeuristicRollbackException, SystemException {
		TransactionLogger transactionLogger = beanFactory.getTransactionLogger();
		TransactionXid xid = this.transactionContext.getXid();
		logger.info("{}> commit-participant start", ByteUtils.byteArrayToString(xid.getGlobalTransactionId()));

		this.transactionStatus = Status.STATUS_COMMITTING;
		TransactionArchive archive = this.getTransactionArchive();
		this.transactionListenerList.onCommitStart(xid);
		transactionLogger.updateTransaction(archive);

		boolean unFinishExists = true;
		try {
			TransactionStrategy currentStrategy = this.getTransactionStrategy();
			currentStrategy.commit(xid, onePhaseCommit);

			unFinishExists = false;
		} catch (HeuristicMixedException ex) {
			this.transactionListenerList.onCommitHeuristicMixed(xid);
			throw ex;
		} catch (HeuristicRollbackException ex) {
			this.transactionListenerList.onCommitHeuristicRolledback(xid);
			throw ex;
		} catch (SystemException ex) {
			this.transactionListenerList.onCommitFailure(xid);
			throw ex;
		} catch (RuntimeException ex) {
			this.transactionListenerList.onCommitFailure(xid);
			throw ex;
		} finally {
			if (unFinishExists == false) {
				this.transactionStatus = Status.STATUS_COMMITTED; // Status.STATUS_COMMITTED;
				archive.setStatus(this.transactionStatus);
				this.transactionListenerList.onCommitSuccess(xid);
				transactionLogger.updateTransaction(archive);

				logger.info("{}> commit-participant complete successfully",
						ByteUtils.byteArrayToString(xid.getGlobalTransactionId()));
			}
		}
	}

	public synchronized void commit() throws RollbackException, HeuristicMixedException, HeuristicRollbackException,
			SecurityException, IllegalStateException, CommitRequiredException, SystemException {

		if (this.transactionStatus == Status.STATUS_ACTIVE) {
			this.fireCommit();
		} else if (this.transactionStatus == Status.STATUS_MARKED_ROLLBACK) {
			this.fireRollback();
			throw new HeuristicRollbackException();
		} else if (this.transactionStatus == Status.STATUS_ROLLEDBACK) /* should never happen */ {
			throw new RollbackException();
		} else if (this.transactionStatus == Status.STATUS_COMMITTED) /* should never happen */ {
			logger.debug("Current transaction has already been committed.");
		} else {
			throw new IllegalStateException();
		}

	}

	private void fireCommit() throws RollbackException, HeuristicMixedException, HeuristicRollbackException, SecurityException,
			IllegalStateException, CommitRequiredException, SystemException {
		TransactionXid xid = this.transactionContext.getXid();
		logger.info("{}> commit-transaction start", ByteUtils.byteArrayToString(xid.getGlobalTransactionId()));

		if (this.participantList.size() == 0) {
			this.skipOnePhaseCommit();
		} else if (this.participantList.size() == 1 && (this.nativeParticipantList.size() == 1 || this.participant != null)) {
			this.fireOnePhaseCommit();
		} else {
			this.fireTwoPhaseCommit();
		}

		logger.info("{}> commit-transaction complete successfully", ByteUtils.byteArrayToString(xid.getGlobalTransactionId()));
	}

	public synchronized void skipOnePhaseCommit()
			throws HeuristicRollbackException, HeuristicMixedException, CommitRequiredException, SystemException {
		TransactionXid xid = this.transactionContext.getXid();
		this.transactionListenerList.onCommitStart(xid);
		this.transactionListenerList.onCommitSuccess(xid);
	}

	public synchronized void fireOnePhaseCommit()
			throws HeuristicRollbackException, HeuristicMixedException, CommitRequiredException, SystemException {

		XAResourceArchive archive = null;
		if (this.nativeParticipantList.size() > 0) {
			archive = this.nativeParticipantList.get(0);
		} else if (this.remoteParticipantList.size() > 0) {
			archive = this.remoteParticipantList.get(0);
		} else {
			archive = this.participant;
		}

		TransactionXid xid = this.transactionContext.getXid();
		try {
			this.transactionListenerList.onCommitStart(xid);
			archive.commit(xid, true);
			this.transactionListenerList.onCommitSuccess(xid);
		} catch (XAException xaex) {
			switch (xaex.errorCode) {
			case XAException.XA_HEURMIX:
				this.transactionListenerList.onCommitHeuristicMixed(xid);
				HeuristicMixedException hmex = new HeuristicMixedException();
				hmex.initCause(xaex);
				throw hmex;
			case XAException.XA_HEURCOM:
				this.transactionListenerList.onCommitSuccess(xid);
				break;
			case XAException.XA_HEURRB:
				this.transactionListenerList.onCommitHeuristicRolledback(xid);
				HeuristicRollbackException hrex = new HeuristicRollbackException();
				hrex.initCause(xaex);
				throw hrex;
			default:
				this.transactionListenerList.onCommitFailure(xid);
				SystemException ex = new SystemException();
				ex.initCause(xaex);
				throw ex;
			}
		} catch (RuntimeException rex) {
			this.transactionListenerList.onCommitFailure(xid);
			SystemException sysEx = new SystemException();
			sysEx.initCause(rex);
			throw sysEx;
		}
	}

	public synchronized void fireTwoPhaseCommit()
			throws HeuristicRollbackException, HeuristicMixedException, CommitRequiredException, SystemException {
		TransactionLogger transactionLogger = beanFactory.getTransactionLogger();

		TransactionXid xid = this.transactionContext.getXid();
		logger.info("{}> prepare-participant start", ByteUtils.byteArrayToString(xid.getGlobalTransactionId()));

		this.transactionStatus = Status.STATUS_PREPARING;// .setStatusPreparing();

		TransactionArchive archive = this.getTransactionArchive();// new TransactionArchive();
		transactionLogger.createTransaction(archive);

		this.transactionListenerList.onPrepareStart(xid);

		TransactionStrategy currentStrategy = this.getTransactionStrategy();
		int vote = XAResource.XA_RDONLY;
		try {
			vote = currentStrategy.prepare(xid);
		} catch (RollbackRequiredException xaex) {
			this.transactionListenerList.onPrepareFailure(xid);
			logger.info("{}> prepare-participant failed", ByteUtils.byteArrayToString(xid.getGlobalTransactionId()));

			this.invokeParticipantRollback(); // this.fireRollback();
			HeuristicRollbackException hrex = new HeuristicRollbackException();
			hrex.initCause(xaex);
			throw hrex;
		} catch (CommitRequiredException xaex) {
			vote = XAResource.XA_OK;
			// committed = true;
		} catch (RuntimeException rex) {
			this.transactionListenerList.onPrepareFailure(xid);
			logger.info("{}> prepare-participant failed", ByteUtils.byteArrayToString(xid.getGlobalTransactionId()));

			this.invokeParticipantRollback(); // this.fireRollback();
			HeuristicRollbackException hrex = new HeuristicRollbackException();
			hrex.initCause(rex);
			throw hrex;
		}

		this.transactionListenerList.onPrepareSuccess(xid);

		if (vote == XAResource.XA_RDONLY) {
			this.transactionStatus = Status.STATUS_PREPARED;// .setStatusPrepared();
			this.transactionVote = XAResource.XA_RDONLY;
			archive.setVote(XAResource.XA_RDONLY);
			archive.setStatus(this.transactionStatus);
			this.transactionListenerList.onCommitStart(xid);
			this.transactionListenerList.onCommitSuccess(xid);
			logger.info("{}> prepare-participant & commit-participant complete successfully",
					ByteUtils.byteArrayToString(xid.getGlobalTransactionId()));

			transactionLogger.updateTransaction(archive);
		} else {
			// this.transactionStatus = Status.STATUS_PREPARED;// .setStatusPrepared();

			logger.info("{}> prepare-participant complete successfully, and commit-participant start",
					ByteUtils.byteArrayToString(xid.getGlobalTransactionId()));

			this.transactionStatus = Status.STATUS_COMMITTING;// .setStatusCommiting();
			this.transactionVote = XAResource.XA_OK;
			archive.setVote(this.transactionVote);
			archive.setStatus(this.transactionStatus);
			this.transactionListenerList.onCommitStart(xid);
			transactionLogger.updateTransaction(archive);

			try {
				currentStrategy.commit(xid, false);
			} catch (HeuristicMixedException ex) {
				this.transactionListenerList.onCommitHeuristicMixed(xid);
				throw ex;
			} catch (HeuristicRollbackException ex) {
				this.transactionListenerList.onCommitHeuristicRolledback(xid);
				throw ex;
			} catch (SystemException ex) {
				this.transactionListenerList.onCommitFailure(xid);
				throw ex;
			} catch (RuntimeException ex) {
				this.transactionListenerList.onCommitFailure(xid);
				throw ex;
			}

			this.transactionStatus = Status.STATUS_COMMITTED; // Status.STATUS_COMMITTED;
			archive.setStatus(this.transactionStatus);
			this.transactionListenerList.onCommitSuccess(xid);
			transactionLogger.updateTransaction(archive);

			logger.info("{}> commit-participant complete successfully",
					ByteUtils.byteArrayToString(xid.getGlobalTransactionId()));
		} // end-else-if (vote == XAResource.XA_RDONLY)

	}

	public synchronized boolean delistResource(XAResource xaRes, int flag) throws IllegalStateException, SystemException {
		if (this.transactionStatus != Status.STATUS_ACTIVE && this.transactionStatus != Status.STATUS_MARKED_ROLLBACK) {
			throw new IllegalStateException();
		}

		if (XAResourceDescriptor.class.isInstance(xaRes)) {
			return this.delistResource((XAResourceDescriptor) xaRes, flag);
		} else {
			XAResourceDescriptor descriptor = new UnidentifiedResourceDescriptor();
			((UnidentifiedResourceDescriptor) descriptor).setDelegate(xaRes);
			((UnidentifiedResourceDescriptor) descriptor).setIdentifier("");
			return this.delistResource(descriptor, flag);
		}
	}

	public boolean delistResource(XAResourceDescriptor descriptor, int flag) throws IllegalStateException, SystemException {
		RemoteCoordinator transactionCoordinator = (RemoteCoordinator) this.beanFactory.getNativeParticipant();
		if (RemoteResourceDescriptor.class.isInstance(descriptor)) {
			RemoteSvc nativeSvc = CommonUtils.getRemoteSvc(transactionCoordinator.getIdentifier());
			RemoteSvc parentSvc = CommonUtils.getRemoteSvc(String.valueOf(this.transactionContext.getPropagatedBy()));
			RemoteSvc remoteSvc = ((RemoteResourceDescriptor) descriptor).getRemoteSvc();

			boolean nativeFlag = StringUtils.equalsIgnoreCase(remoteSvc.getServiceKey(), nativeSvc.getServiceKey());
			boolean parentFlag = StringUtils.equalsIgnoreCase(remoteSvc.getServiceKey(), parentSvc.getServiceKey());
			if (nativeFlag || parentFlag) {
				return true;
			}
		}

		XAResourceArchive archive = this.getEnlistedResourceArchive(descriptor);
		if (archive == null) {
			throw new SystemException();
		}

		try {
			return this.delistResource(archive, flag);
		} finally {
			this.resourceListenerList.onDelistResource(archive.getXid(), descriptor);
		}

	}

	private boolean delistResource(XAResourceArchive archive, int flag) throws SystemException {
		try {
			Xid branchXid = archive.getXid();

			logger.info("{}> delist: xares= {}, branch= {}, flags= {}",
					ByteUtils.byteArrayToString(branchXid.getGlobalTransactionId()), archive,
					ByteUtils.byteArrayToString(branchXid.getBranchQualifier()), flag);

			switch (flag) {
			case XAResource.TMSUSPEND:
				archive.end(branchXid, flag);
				archive.setDelisted(true);
				archive.setSuspended(true);
				return true;
			case XAResource.TMFAIL:
				this.setRollbackOnlyQuietly();
			case XAResource.TMSUCCESS:
				archive.end(branchXid, flag);
				archive.setDelisted(true);
				return true;
			default:
				return false;
			}
		} catch (XAException xae) {
			logger.error("XATerminatorImpl.delistResource(XAResourceArchive, int)", xae);

			// Possible XAException values are XAER_RMERR, XAER_RMFAIL,
			// XAER_NOTA, XAER_INVAL, XAER_PROTO, or XA_RB*.
			switch (xae.errorCode) {
			case XAException.XAER_NOTA:
				// The specified XID is not known by the resource manager.
			case XAException.XAER_INVAL:
				// Invalid arguments were specified.
			case XAException.XAER_PROTO:
				// The routine was invoked in an improper context.
				return false;
			case XAException.XAER_RMFAIL:
				// An error occurred that makes the resource manager unavailable.
			case XAException.XAER_RMERR:
				// An error occurred in dissociating the transaction branch from the thread of control.
				return false; // throw new SystemException();
			default /* XA_RB* */ :
				return false; // throw new RollbackRequiredException();
			}
		} catch (RuntimeException ex) {
			logger.error("XATerminatorImpl.delistResource(XAResourceArchive, int)", ex);
			throw new SystemException();
		}
	}

	public synchronized boolean enlistResource(XAResource xaRes)
			throws RollbackException, IllegalStateException, SystemException {

		if (this.transactionStatus == Status.STATUS_MARKED_ROLLBACK) {
			// When a RollbackException is received, DBCP treats the state as STATUS_ROLLEDBACK,
			// but the actual state is still STATUS_MARKED_ROLLBACK.
			throw new IllegalStateException(); // throw new RollbackException();
		} else if (this.transactionStatus != Status.STATUS_ACTIVE) {
			throw new IllegalStateException();
		}

		if (XAResourceDescriptor.class.isInstance(xaRes)) {
			return this.enlistResource((XAResourceDescriptor) xaRes);
		} else if (XAResourceDescriptor.class.isInstance(xaRes) == false && this.transactionContext.isCoordinator()) {
			XAResourceDescriptor descriptor = new UnidentifiedResourceDescriptor();
			((UnidentifiedResourceDescriptor) descriptor).setIdentifier("");
			((UnidentifiedResourceDescriptor) descriptor).setDelegate(xaRes);
			return this.enlistResource(descriptor);
		} else {
			throw new SystemException("Unknown xa resource!");
		}

	}

	private XAResourceArchive getEnlistedResourceArchive(XAResourceDescriptor descriptor) {
		if (RemoteResourceDescriptor.class.isInstance(descriptor)) {
			RemoteSvc remoteSvc = CommonUtils.getRemoteSvc(descriptor.getIdentifier()); // dubbo: old identifier
			return this.remoteParticipantMap.get(remoteSvc);
		} else {
			return this.nativeParticipantMap.get(descriptor.getIdentifier());
		}
	}

	private void putEnlistedResourceArchive(XAResourceArchive archive) {
		XAResourceDescriptor descriptor = archive.getDescriptor();
		String identifier = descriptor.getIdentifier();
		if (RemoteResourceDescriptor.class.isInstance(descriptor)) {
			RemoteSvc remoteSvc = CommonUtils.getRemoteSvc(identifier);
			this.remoteParticipantMap.put(remoteSvc, archive);
		} else {
			this.nativeParticipantMap.put(identifier, archive);
		}
	}

	public boolean enlistResource(XAResourceDescriptor descriptor)
			throws RollbackException, IllegalStateException, SystemException {
		XAResourceArchive archive = null;

		XAResourceArchive enlisted = this.getEnlistedResourceArchive(descriptor);
		if (enlisted != null) {
			XAResourceDescriptor xard = enlisted.getDescriptor();
			try {
				archive = xard.isSameRM(descriptor) ? enlisted : archive;
			} catch (Exception ex) {
				logger.debug(ex.getMessage(), ex);
			}
		}

		int flags = XAResource.TMNOFLAGS;
		if (archive == null) {
			archive = new XAResourceArchive();
			archive.setDescriptor(descriptor);
			archive.setIdentified(true);

			if (this.transactionalExtra != null && this.transactionalExtra.getTransactionXid() != null) {
				archive.setXid(this.transactionalExtra.getTransactionXid());
			} else {
				XidFactory xidFactory = this.beanFactory.getXidFactory();
				archive.setXid(xidFactory.createBranchXid(this.transactionContext.getXid()));
			}
		} else {
			flags = XAResource.TMJOIN;
		}

		descriptor.setTransactionTimeoutQuietly(this.transactionTimeout);

		if (this.participant != null && (LocalXAResourceDescriptor.class.isInstance(descriptor)
				|| UnidentifiedResourceDescriptor.class.isInstance(descriptor))) {
			XAResourceDescriptor lro = this.participant.getDescriptor();
			try {
				if (lro.isSameRM(descriptor) == false) {
					throw new SystemException("Only one non-XA resource is allowed to participate in global transaction.");
				}
			} catch (XAException ex) {
				SystemException sysEx = new SystemException();
				sysEx.initCause(ex);
				throw sysEx;
			} catch (RuntimeException ex) {
				SystemException sysEx = new SystemException();
				sysEx.initCause(ex);
				throw sysEx;
			}
		}

		boolean success = false;
		try {
			Boolean enlistValue = this.enlistResource(archive, flags);
			success = enlistValue != null && enlistValue;
			return enlistValue != null;
		} finally {
			if (success) {
				String identifier = descriptor.getIdentifier(); // dubbo: new identifier

				boolean resourceValid = true;
				if (CommonResourceDescriptor.class.isInstance(descriptor)) {
					this.nativeParticipantList.add(archive);
				} else if (RemoteResourceDescriptor.class.isInstance(descriptor)) {
					RemoteCoordinator transactionCoordinator = (RemoteCoordinator) this.beanFactory.getNativeParticipant();

					RemoteSvc nativeSvc = CommonUtils.getRemoteSvc(transactionCoordinator.getIdentifier());
					RemoteSvc parentSvc = CommonUtils.getRemoteSvc(String.valueOf(this.transactionContext.getPropagatedBy()));
					RemoteSvc remoteSvc = ((RemoteResourceDescriptor) descriptor).getRemoteSvc();

					boolean nativeFlag = StringUtils.equalsIgnoreCase(remoteSvc.getServiceKey(), nativeSvc.getServiceKey());
					boolean parentFlag = StringUtils.equalsIgnoreCase(remoteSvc.getServiceKey(), parentSvc.getServiceKey());
					if (nativeFlag || parentFlag) {
						logger.warn("Endpoint {} can not be its own remote branch!", identifier);
						return false;
					}

					this.remoteParticipantList.add(archive);
					this.putEnlistedResourceArchive(archive);
				} else if (this.participant == null) {
					// this.participant = this.participant == null ? archive : this.participant;
					this.participant = archive;
				} else {
					throw new SystemException("There already has a local-resource exists!");
				}

				if (resourceValid) {
					this.participantList.add(archive);
					this.putEnlistedResourceArchive(archive);

					this.resourceListenerList.onEnlistResource(archive.getXid(), descriptor);
				} // end-if (resourceValid)
			}
		}

	}

	// result description:
	// 1) true, success(current resource should be added to archive list);
	// 2) false, success(resource has already been added to archive list);
	// 3) null, failure.
	private Boolean enlistResource(XAResourceArchive archive, int flag) throws SystemException {
		try {
			Xid branchXid = archive.getXid();
			logger.info("{}> enlist: xares= {}, branch= {}, flags: {}",
					ByteUtils.byteArrayToString(branchXid.getGlobalTransactionId()), archive,
					ByteUtils.byteArrayToString(branchXid.getBranchQualifier()), flag);

			switch (flag) {
			case XAResource.TMNOFLAGS:
				long expired = this.transactionContext.getExpiredTime();
				long current = System.currentTimeMillis();
				long remains = expired - current;
				int timeout = (int) (remains / 1000L);
				archive.setTransactionTimeout(timeout);
				archive.start(branchXid, flag);
				return true;
			case XAResource.TMJOIN:
				archive.start(branchXid, flag);
				archive.setDelisted(false);
				return false;
			case XAResource.TMRESUME:
				archive.start(branchXid, flag);
				archive.setDelisted(false);
				archive.setSuspended(false);
				return false;
			default:
				return null;
			}
		} catch (XAException xae) {
			logger.error("XATerminatorImpl.enlistResource(XAResourceArchive, int)", xae);

			// Possible exceptions are XA_RB*, XAER_RMERR, XAER_RMFAIL,
			// XAER_DUPID, XAER_OUTSIDE, XAER_NOTA, XAER_INVAL, or XAER_PROTO.
			switch (xae.errorCode) {
			case XAException.XAER_DUPID:
				// * If neither TMJOIN nor TMRESUME is specified and the transaction
				// * specified by xid has previously been seen by the resource manager,
				// * the resource manager throws the XAException exception with XAER_DUPID error code.
				return null;
			case XAException.XAER_OUTSIDE:
				// The resource manager is doing work outside any global transaction
				// on behalf of the application.
			case XAException.XAER_NOTA:
				// Either TMRESUME or TMJOIN was set inflags, and the specified XID is not
				// known by the resource manager.
			case XAException.XAER_INVAL:
				// Invalid arguments were specified.
			case XAException.XAER_PROTO:
				// The routine was invoked in an improper context.
				return null;
			case XAException.XAER_RMFAIL:
				// An error occurred that makes the resource manager unavailable
			case XAException.XAER_RMERR:
				// An error occurred in associating the transaction branch with the thread of control
				return null;
			default /* XA_RB **/ :
				// When a RollbackException is received, DBCP treats the state as STATUS_ROLLEDBACK,
				// but the actual state is still STATUS_MARKED_ROLLBACK.
				return null; // throw new RollbackException();
			}
		} catch (RuntimeException ex) {
			logger.error("XATerminatorImpl.enlistResource(XAResourceArchive, int)", ex);
			throw new SystemException();
		}

	}

	public int getStatus() /* throws SystemException */ {
		return this.transactionStatus;
	}

	public synchronized void registerSynchronization(Synchronization sync)
			throws RollbackException, IllegalStateException, SystemException {

		if (this.transactionStatus == Status.STATUS_MARKED_ROLLBACK) {
			throw new RollbackException();
		} else if (this.transactionStatus == Status.STATUS_ACTIVE) {
			this.synchronizationList.registerSynchronizationQuietly(sync);
			logger.debug("{}> register-sync: sync= {}"//
					, ByteUtils.byteArrayToString(this.transactionContext.getXid().getGlobalTransactionId()), sync);
		} else {
			throw new IllegalStateException();
		}

	}

	public synchronized void rollback() throws IllegalStateException, RollbackRequiredException, SystemException {
		if (this.transactionStatus == Status.STATUS_UNKNOWN) {
			throw new IllegalStateException();
		} else if (this.transactionStatus == Status.STATUS_NO_TRANSACTION) {
			throw new IllegalStateException();
		} else if (this.transactionStatus == Status.STATUS_COMMITTED) /* should never happen */ {
			throw new IllegalStateException();
		} else if (this.transactionStatus == Status.STATUS_ROLLEDBACK) /* should never happen */ {
			logger.debug("Current transaction has already been rolled back.");
		} else {
			this.fireRollback();
		}
	}

	private void fireRollback() throws IllegalStateException, RollbackRequiredException, SystemException {
		TransactionXid xid = this.transactionContext.getXid();
		logger.info("{}> rollback-transaction start", ByteUtils.byteArrayToString(xid.getGlobalTransactionId()));

		this.invokeParticipantRollback();

		logger.info("{}> rollback-transaction complete successfully",
				ByteUtils.byteArrayToString(xid.getGlobalTransactionId()));
	}

	public synchronized void recoveryRollback() throws RollbackRequiredException, SystemException {
		this.recoverIfNecessary(); // Recover if transaction is recovered from tx-log.

		this.transactionContext.setRecoveredTimes(this.transactionContext.getRecoveredTimes() + 1);
		this.transactionContext.setCreatedTime(System.currentTimeMillis());

		this.invokeParticipantRollback();
	}

	public synchronized void participantRollback() throws IllegalStateException, RollbackRequiredException, SystemException {

		if (this.transactionStatus == Status.STATUS_UNKNOWN) {
			throw new IllegalStateException();
		} else if (this.transactionStatus == Status.STATUS_NO_TRANSACTION) {
			throw new IllegalStateException();
		} else if (this.transactionStatus == Status.STATUS_COMMITTED) {
			throw new IllegalStateException();
		} else if (this.transactionStatus == Status.STATUS_ROLLEDBACK) {
			return;
		}

		if (this.transactionContext.isRecoveried()) {
			this.recover(); // Execute recoveryInit if transaction is recovered from tx-log.
			this.invokeParticipantRollback();
		} else {
			this.invokeParticipantRollback();
		}

	}

	private void invokeParticipantRollback() throws SystemException {
		TransactionLogger transactionLogger = beanFactory.getTransactionLogger();
		TransactionXid xid = this.transactionContext.getXid();
		logger.info("{}> rollback-participant start", ByteUtils.byteArrayToString(xid.getGlobalTransactionId()));

		this.transactionStatus = Status.STATUS_ROLLING_BACK;
		TransactionArchive archive = this.getTransactionArchive();
		this.transactionListenerList.onRollbackStart(xid);
		transactionLogger.updateTransaction(archive); // don't create!

		try {
			TransactionStrategy currentStrategy = this.getTransactionStrategy();
			currentStrategy.rollback(xid);
		} catch (HeuristicMixedException ex) {
			this.transactionListenerList.onRollbackFailure(xid);
			SystemException sysEx = new SystemException();
			sysEx.initCause(ex);
			throw sysEx;
		} catch (HeuristicCommitException ex) {
			this.transactionListenerList.onRollbackFailure(xid);
			SystemException sysEx = new SystemException();
			sysEx.initCause(ex);
			throw sysEx;
		} catch (SystemException ex) {
			this.transactionListenerList.onRollbackFailure(xid);
			throw ex;
		} catch (RuntimeException ex) {
			this.transactionListenerList.onRollbackFailure(xid);
			SystemException sysEx = new SystemException();
			sysEx.initCause(ex);
			throw sysEx;
		}

		this.transactionStatus = Status.STATUS_ROLLEDBACK; // Status.STATUS_ROLLEDBACK;
		archive.setStatus(this.transactionStatus);
		this.transactionListenerList.onRollbackSuccess(xid);
		transactionLogger.updateTransaction(archive);

		logger.info("{}> rollback-participant complete successfully",
				ByteUtils.byteArrayToString(xid.getGlobalTransactionId()));
	}

	public void suspend() throws RollbackRequiredException, SystemException {
		boolean rollbackRequired = false;
		boolean errorExists = false;

		for (int i = 0; i < this.participantList.size(); i++) {
			XAResourceArchive xares = this.participantList.get(i);
			if (xares.isDelisted() == false) {
				try {
					this.delistResource(xares, XAResource.TMSUSPEND);
				} catch (RollbackRequiredException ex) {
					rollbackRequired = true;
				} catch (SystemException ex) {
					errorExists = true;
				} catch (RuntimeException ex) {
					errorExists = true;
				}
			}
		}

		if (rollbackRequired) {
			this.setRollbackOnlyQuietly();
			throw new RollbackRequiredException();
		} else if (errorExists) {
			throw new SystemException(XAException.XAER_RMERR);
		}

	}

	public void resume() throws RollbackRequiredException, SystemException {
		// boolean rollbackRequired = false;
		boolean errorExists = false;
		for (int i = 0; i < this.participantList.size(); i++) {
			XAResourceArchive xares = this.participantList.get(i);
			if (xares.isDelisted()) {
				try {
					this.enlistResource(xares, XAResource.TMRESUME);
				} catch (SystemException rex) {
					errorExists = true;
				} catch (RuntimeException rex) {
					errorExists = true;
				}
			}
		}

		if (errorExists) {
			throw new SystemException(XAException.XAER_RMERR);
		}

	}

	public synchronized void fireBeforeTransactionCompletionQuietly() {
		this.synchronizationList.beforeCompletion();
		this.delistAllResourceQuietly();
	}

	public synchronized void fireBeforeTransactionCompletion() throws RollbackRequiredException, SystemException {
		this.synchronizationList.beforeCompletion();
		this.delistAllResource();
	}

	public synchronized void fireAfterTransactionCompletion() {
		this.synchronizationList.afterCompletion(this.transactionStatus);
	}

	public void delistAllResourceQuietly() {
		try {
			this.delistAllResource();
		} catch (RollbackRequiredException rrex) {
			logger.warn(rrex.getMessage(), rrex);
		} catch (SystemException ex) {
			logger.warn(ex.getMessage(), ex);
		} catch (RuntimeException rex) {
			logger.warn(rex.getMessage(), rex);
		}
	}

	private void delistAllResource() throws RollbackRequiredException, SystemException {
		boolean rollbackRequired = false;
		boolean errorExists = false;
		for (int i = 0; i < this.participantList.size(); i++) {
			XAResourceArchive xares = this.participantList.get(i);
			if (this.transactionContext.isRecoveried()) {
				continue;
			} // end-if (this.transactionContext.isRecoveried())

			if (xares.isDelisted() == false) {
				try {
					this.delistResource(xares, XAResource.TMSUCCESS);
				} catch (RollbackRequiredException ex) {
					rollbackRequired = true;
				} catch (SystemException ex) {
					errorExists = true;
				} catch (RuntimeException ex) {
					errorExists = true;
				} finally {
					this.resourceListenerList.onDelistResource(xares.getXid(), xares.getDescriptor());
				}
			}
		} // end-for

		if (rollbackRequired) {
			throw new RollbackRequiredException();
		} else if (errorExists) {
			throw new SystemException(XAException.XAER_RMERR);
		}
	}

	public boolean isMarkedRollbackOnly() {
		return this.transactionContext.isRollbackOnly();
	}

	public void setRollbackOnlyQuietly() {
		try {
			this.setRollbackOnly();
		} catch (Exception ex) {
			logger.debug(ex.getMessage(), ex);
		}
	}

	public synchronized void setRollbackOnly() throws IllegalStateException, SystemException {
		if (this.transactionStatus == Status.STATUS_ACTIVE || this.transactionStatus == Status.STATUS_MARKED_ROLLBACK) {
			this.transactionContext.setRollbackOnly(true);
			this.transactionStatus = Status.STATUS_MARKED_ROLLBACK;
		} else {
			throw new IllegalStateException();
		}
	}

	public void recoverIfNecessary() throws SystemException {
		if (this.transactionContext.isRecoveried()) {
			this.recover();
		}
	}

	public synchronized void recover() throws SystemException {
		if (transactionStatus == Status.STATUS_PREPARING) {
			this.recover4PreparingStatus();
		} else if (transactionStatus == Status.STATUS_COMMITTING) {
			this.recover4CommittingStatus();
		} else if (transactionStatus == Status.STATUS_ROLLING_BACK) {
			this.recover4RollingBackStatus();
		}
	}

	public void recover4PreparingStatus() throws SystemException {
		TransactionLogger transactionLogger = this.beanFactory.getTransactionLogger();

		boolean unPrepareExists = false;
		for (int i = 0; i < this.participantList.size(); i++) {
			XAResourceArchive archive = this.participantList.get(i);

			boolean prepareFlag = archive.getVote() != XAResourceArchive.DEFAULT_VOTE;
			boolean preparedVal = archive.isReadonly() || prepareFlag;

			if (archive.isRecovered()) {
				unPrepareExists = preparedVal ? unPrepareExists : true;
				continue;
			} else if (preparedVal) {
				continue;
			}

			boolean xidExists = this.recover(archive);
			unPrepareExists = xidExists ? false : true;
		}

		if (unPrepareExists == false) {
			this.transactionStatus = Status.STATUS_PREPARED;

			TransactionArchive archive = this.getTransactionArchive();
			transactionLogger.updateTransaction(archive);
		}

	}

	public void recover4CommittingStatus() throws SystemException {
		TransactionLogger transactionLogger = this.beanFactory.getTransactionLogger();

		boolean rollbackExists = false;
		boolean unCommitExists = false;
		for (int i = 0; i < this.participantList.size(); i++) {
			XAResourceArchive archive = this.participantList.get(i);

			XAResourceDescriptor descriptor = archive.getDescriptor();
			XAResource delegate = descriptor.getDelegate();
			boolean localFlag = LocalXAResource.class.isInstance(delegate);

			if (localFlag //
					&& LastResourceOptimizeStrategy.class.isInstance(this.transactionStrategy)) {
				throw new SystemException();
			}

			if (archive.isRecovered()) {
				unCommitExists = archive.isCommitted() ? unCommitExists : true;
				continue;
			} else if (archive.isCommitted()) {
				continue;
			}

			boolean xidExists = this.recover(archive);
			if (localFlag) {
				rollbackExists = xidExists ? rollbackExists : true;
			} else {
				unCommitExists = xidExists ? true : unCommitExists;
			}

		}

		if (rollbackExists) {
			this.transactionStatus = Status.STATUS_ROLLING_BACK;

			TransactionArchive archive = this.getTransactionArchive();
			transactionLogger.updateTransaction(archive);
		} else if (unCommitExists == false) {
			this.transactionStatus = Status.STATUS_COMMITTED;

			TransactionArchive archive = this.getTransactionArchive();
			transactionLogger.updateTransaction(archive);
		}

	}

	public void recover4RollingBackStatus() throws SystemException {
		TransactionLogger transactionLogger = this.beanFactory.getTransactionLogger();

		boolean unRollbackExists = false;
		for (int i = 0; i < this.participantList.size(); i++) {
			XAResourceArchive archive = this.participantList.get(i);

			if (archive.isRecovered()) {
				unRollbackExists = archive.isRolledback() ? unRollbackExists : true;
				continue;
			} else if (archive.isRolledback()) {
				continue;
			}

			boolean xidExists = this.recover(archive);
			unRollbackExists = xidExists ? true : unRollbackExists;
		}

		if (unRollbackExists == false) {
			this.transactionStatus = Status.STATUS_ROLLEDBACK;

			TransactionArchive archive = this.getTransactionArchive();
			transactionLogger.updateTransaction(archive);
		}

	}

	private boolean recover(XAResourceArchive archive) throws SystemException {
		TransactionXid globalXid = this.transactionContext.getXid();

		boolean xidRecovered = false;

		XAResourceDescriptor descriptor = archive.getDescriptor();
		XAResource delegate = descriptor.getDelegate();
		boolean nativeFlag = LocalXAResource.class.isInstance(delegate);
		boolean remoteFlag = RemoteCoordinator.class.isInstance(delegate);
		if (nativeFlag) {
			try {
				((LocalXAResource) delegate).recoverable(archive.getXid());
				xidRecovered = true;
			} catch (XAException ex) {
				switch (ex.errorCode) {
				case XAException.XAER_NOTA:
					break;
				default:
					logger.error("{}> recover-resource failed. branch= {}",
							ByteUtils.byteArrayToString(globalXid.getGlobalTransactionId()),
							ByteUtils.byteArrayToString(globalXid.getBranchQualifier()), ex);
					throw new SystemException();
				}
			}
		} else if (archive.isIdentified()) {
			Xid thisXid = archive.getXid();
			byte[] thisGlobalTransactionId = thisXid.getGlobalTransactionId();
			byte[] thisBranchQualifier = thisXid.getBranchQualifier();
			try {
				Xid[] array = archive.recover(XAResource.TMSTARTRSCAN | XAResource.TMENDRSCAN);
				for (int j = 0; xidRecovered == false && array != null && j < array.length; j++) {
					Xid thatXid = array[j];
					byte[] thatGlobalTransactionId = thatXid.getGlobalTransactionId();
					byte[] thatBranchQualifier = thatXid.getBranchQualifier();
					boolean formatIdEquals = thisXid.getFormatId() == thatXid.getFormatId();
					boolean transactionIdEquals = Arrays.equals(thisGlobalTransactionId, thatGlobalTransactionId);
					boolean qualifierEquals = Arrays.equals(thisBranchQualifier, thatBranchQualifier);
					xidRecovered = formatIdEquals && transactionIdEquals && (remoteFlag || qualifierEquals);
				}
			} catch (Exception ex) {
				logger.error("{}> recover-resource failed. branch= {}",
						ByteUtils.byteArrayToString(globalXid.getGlobalTransactionId()),
						ByteUtils.byteArrayToString(globalXid.getBranchQualifier()), ex);
				throw new SystemException();
			}
		}

		archive.setRecovered(true);

		return xidRecovered;
	}

	public synchronized void forgetQuietly() {
		TransactionXid xid = this.transactionContext.getXid();
		try {
			this.forget();
		} catch (SystemException ex) {
			logger.error("Error occurred while forgetting transaction: {}",
					ByteUtils.byteArrayToInt(xid.getGlobalTransactionId()), ex);
		} catch (RuntimeException ex) {
			logger.error("Error occurred while forgetting transaction: {}",
					ByteUtils.byteArrayToInt(xid.getGlobalTransactionId()), ex);
		}
	}

	public synchronized void forget() throws SystemException {
		TransactionRepository repository = beanFactory.getTransactionRepository();
		TransactionLogger transactionLogger = this.beanFactory.getTransactionLogger();

		TransactionXid xid = this.transactionContext.getXid();

		this.cleanup(); // forget branch-transaction has been hueristic completed.

		repository.removeErrorTransaction(xid);
		repository.removeTransaction(xid);

		transactionLogger.deleteTransaction(this.getTransactionArchive());
	}

	public synchronized void cleanup() throws SystemException {
		boolean unFinishExists = false;

		for (int i = 0; i < this.participantList.size(); i++) {
			XAResourceArchive archive = this.participantList.get(i);
			Xid currentXid = archive.getXid();
			if (archive.isHeuristic()) {
				try {
					Xid branchXid = archive.getXid();
					archive.forget(branchXid);
				} catch (XAException xae) {
					// Possible exception values are XAER_RMERR, XAER_RMFAIL
					// , XAER_NOTA, XAER_INVAL, or XAER_PROTO.
					switch (xae.errorCode) {
					case XAException.XAER_RMERR:
						unFinishExists = true;
						logger.error("{}> forget: xares= {}, branch={}, error= {}",
								ByteUtils.byteArrayToString(currentXid.getGlobalTransactionId()), archive,
								ByteUtils.byteArrayToString(currentXid.getBranchQualifier()), xae.errorCode);
						break;
					case XAException.XAER_RMFAIL:
						unFinishExists = true;
						logger.error("{}> forget: xares= {}, branch={}, error= {}",
								ByteUtils.byteArrayToString(currentXid.getGlobalTransactionId()), archive,
								ByteUtils.byteArrayToString(currentXid.getBranchQualifier()), xae.errorCode);
						break;
					case XAException.XAER_NOTA:
					case XAException.XAER_INVAL:
					case XAException.XAER_PROTO:
						break;
					default:
						unFinishExists = true;
						logger.error("{}> forget: xares= {}, branch={}, error= {}",
								ByteUtils.byteArrayToString(currentXid.getGlobalTransactionId()), archive,
								ByteUtils.byteArrayToString(currentXid.getBranchQualifier()), xae.errorCode);
					}
				}
			} // end-if
		} // end-for

		if (unFinishExists) {
			throw new SystemException("Error occurred while cleaning branch transaction!");
		}

	}

	public TransactionArchive getTransactionArchive() {
		TransactionArchive transactionArchive = new TransactionArchive();
		transactionArchive.setVote(this.transactionVote);
		transactionArchive.setXid(this.transactionContext.getXid());
		transactionArchive.setCoordinator(this.transactionContext.isCoordinator());
		transactionArchive.setOptimizedResource(this.participant);
		transactionArchive.getNativeResources().addAll(this.nativeParticipantList);
		transactionArchive.getRemoteResources().addAll(this.remoteParticipantList);
		transactionArchive.setStatus(this.transactionStatus);
		// transactionArchive.setPropagated(this.transactionContext.isPropagated());
		transactionArchive.setPropagatedBy(this.transactionContext.getPropagatedBy());

		TransactionStrategy currentStrategy = this.getTransactionStrategy();
		if (CommonTransactionStrategy.class.isInstance(currentStrategy)) {
			transactionArchive.setTransactionStrategyType(TransactionStrategy.TRANSACTION_STRATEGY_COMMON);
		} else if (SimpleTransactionStrategy.class.isInstance(currentStrategy)) {
			transactionArchive.setTransactionStrategyType(TransactionStrategy.TRANSACTION_STRATEGY_SIMPLE);
		} else if (LastResourceOptimizeStrategy.class.isInstance(currentStrategy)) {
			transactionArchive.setTransactionStrategyType(TransactionStrategy.TRANSACTION_STRATEGY_LRO);
		} else {
			transactionArchive.setTransactionStrategyType(TransactionStrategy.TRANSACTION_STRATEGY_VACANT);
		}

		return transactionArchive;
	}

	public int hashCode() {
		TransactionXid transactionXid = this.transactionContext == null ? null : this.transactionContext.getXid();
		return transactionXid == null ? 0 : Arrays.hashCode(transactionXid.getGlobalTransactionId());
	}

	public boolean equals(Object obj) {
		if (obj == null) {
			return false;
		} else if (TransactionImpl.class.equals(obj.getClass()) == false) {
			return false;
		}
		TransactionImpl that = (TransactionImpl) obj;
		TransactionContext thisContext = this.transactionContext;
		TransactionContext thatContext = that.transactionContext;
		TransactionXid thisXid = thisContext == null ? null : thisContext.getXid();
		TransactionXid thatXid = thatContext == null ? null : thatContext.getXid();
		return thisXid == null || thatXid == null ? false
				: Arrays.equals(thisXid.getGlobalTransactionId(), thatXid.getGlobalTransactionId());
	}

	public void registerTransactionListener(TransactionListener listener) {
		this.transactionListenerList.registerTransactionListener(listener);
	}

	public void registerTransactionResourceListener(TransactionResourceListener listener) {
		this.resourceListenerList.registerTransactionResourceListener(listener);
	}

	public synchronized void stopTiming() {
		this.setTiming(false);
	}

	public synchronized void changeTransactionTimeout(int timeout) {
		long created = this.transactionContext.getCreatedTime();
		transactionContext.setExpiredTime(created + timeout);
	}

	public TransactionStrategy getTransactionStrategy() {
		TransactionStrategy strategy = //
				this.transactionStrategy == null ? this.initGetTransactionStrategy() : this.transactionStrategy;
		if (Status.STATUS_ACTIVE == this.transactionStatus || Status.STATUS_MARKED_ROLLBACK == this.transactionStatus) {
			return strategy;
		} else {
			return this.transactionStrategy = this.transactionStrategy == null ? strategy : this.transactionStrategy;
		}
	}

	private TransactionStrategy initGetTransactionStrategy() {
		int nativeResNum = this.nativeParticipantList.size();
		int remoteResNum = this.remoteParticipantList.size();

		TransactionStrategy transactionStrategy = null;
		if (this.participantList.isEmpty()) {
			transactionStrategy = new VacantTransactionStrategy();
		} else if (this.participant == null) /* TODO: LRO */ {
			XATerminatorImpl nativeTerminator = new XATerminatorImpl();
			nativeTerminator.setBeanFactory(this.beanFactory);
			nativeTerminator.getResourceArchives().addAll(this.nativeParticipantList);

			XATerminatorImpl remoteTerminator = new XATerminatorImpl();
			remoteTerminator.setBeanFactory(this.beanFactory);
			remoteTerminator.getResourceArchives().addAll(this.remoteParticipantList);

			if (nativeResNum == 0) {
				transactionStrategy = new SimpleTransactionStrategy(remoteTerminator);
			} else if (remoteResNum == 0) {
				transactionStrategy = new SimpleTransactionStrategy(nativeTerminator);
			} else {
				transactionStrategy = new CommonTransactionStrategy(nativeTerminator, remoteTerminator);
			}

		} else {
			XATerminatorOptd terminatorOne = new XATerminatorOptd();
			terminatorOne.setBeanFactory(this.beanFactory);
			terminatorOne.getResourceArchives().add(this.participant);

			XATerminatorImpl terminatorTwo = new XATerminatorImpl();
			terminatorTwo.setBeanFactory(this.beanFactory);
			terminatorTwo.getResourceArchives().addAll(this.nativeParticipantList);
			terminatorTwo.getResourceArchives().addAll(this.remoteParticipantList);

			int resNumber = nativeResNum + remoteResNum;
			if (resNumber == 0) {
				transactionStrategy = new SimpleTransactionStrategy(terminatorOne);
			} else {
				transactionStrategy = new LastResourceOptimizeStrategy(terminatorOne, terminatorTwo);
			}
		}

		return transactionStrategy;
	}

	public void recoverTransactionStrategy(int transactionStrategyType) {
		int nativeResNum = this.nativeParticipantList.size();
		int remoteResNum = this.remoteParticipantList.size();

		XATerminatorImpl nativeTerminator = new XATerminatorImpl();
		nativeTerminator.setBeanFactory(this.beanFactory);
		nativeTerminator.getResourceArchives().addAll(this.nativeParticipantList);

		XATerminatorImpl remoteTerminator = new XATerminatorImpl();
		remoteTerminator.setBeanFactory(this.beanFactory);
		remoteTerminator.getResourceArchives().addAll(this.remoteParticipantList);

		if (TransactionStrategy.TRANSACTION_STRATEGY_COMMON == transactionStrategyType) {
			if (this.participant != null) {
				throw new IllegalStateException();
			} else if (nativeResNum == 0 || remoteResNum == 0) {
				throw new IllegalStateException();
			}
			this.transactionStrategy = new CommonTransactionStrategy(nativeTerminator, remoteTerminator);
		} else if (TransactionStrategy.TRANSACTION_STRATEGY_SIMPLE == transactionStrategyType) {
			if (this.participant == null) {
				if (nativeResNum > 0 && remoteResNum > 0) {
					throw new IllegalStateException();
				} else if (nativeResNum == 0 && remoteResNum == 0) {
					throw new IllegalStateException();
				} else if (nativeResNum == 0) {
					this.transactionStrategy = new SimpleTransactionStrategy(remoteTerminator);
				} else {
					this.transactionStrategy = new SimpleTransactionStrategy(nativeTerminator);
				}
			} else {
				int resNumber = nativeResNum + remoteResNum;
				if (resNumber > 0) {
					throw new IllegalStateException();
				}
				XATerminatorOptd terminatorOne = new XATerminatorOptd();
				terminatorOne.setBeanFactory(this.beanFactory);
				terminatorOne.getResourceArchives().add(this.participant);
				this.transactionStrategy = new SimpleTransactionStrategy(terminatorOne);
			}
		} else if (TransactionStrategy.TRANSACTION_STRATEGY_LRO == transactionStrategyType) {
			if (this.participant == null) {
				throw new IllegalStateException();
			}
			XATerminatorOptd terminatorOne = new XATerminatorOptd();
			terminatorOne.setBeanFactory(this.beanFactory);
			terminatorOne.getResourceArchives().add(this.participant);

			XATerminatorImpl terminatorTwo = new XATerminatorImpl();
			terminatorTwo.setBeanFactory(this.beanFactory);
			terminatorTwo.getResourceArchives().addAll(this.nativeParticipantList);
			terminatorTwo.getResourceArchives().addAll(this.remoteParticipantList);

			this.transactionStrategy = new LastResourceOptimizeStrategy(terminatorOne, terminatorTwo);
		} else {
			if (this.participant != null || nativeResNum > 0 || remoteResNum > 0) {
				throw new IllegalStateException();
			}
			this.transactionStrategy = new VacantTransactionStrategy();
		}

	}

	public XAResourceDescriptor getResourceDescriptor(String beanId) {
		XAResourceArchive archive = this.nativeParticipantMap.get(beanId);
		return archive == null ? null : archive.getDescriptor();
	}

	public XAResourceDescriptor getRemoteCoordinator(RemoteSvc remoteSvc) {
		XAResourceArchive archive = this.remoteParticipantMap.get(remoteSvc);
		return archive == null ? null : archive.getDescriptor();
	}

	public XAResourceDescriptor getRemoteCoordinator(String application) {
		RemoteSvc remoteSvc = new RemoteSvc();
		remoteSvc.setServiceKey(application);
		XAResourceArchive archive = this.remoteParticipantMap.get(remoteSvc);
		return archive == null ? null : archive.getDescriptor();
	}

	public TransactionXid getTransactionXid() {
		throw new IllegalStateException();
	}

	public void setBeanFactory(TransactionBeanFactory tbf) {
		this.beanFactory = tbf;
	}

	public boolean isLocalTransaction() {
		return this.participantList.size() <= 1;
	}

	public Exception getCreatedAt() {
		return createdAt;
	}

	public void setCreatedAt(Exception createdAt) {
		this.createdAt = createdAt;
	}

	public void setTransactionStrategy(TransactionStrategy transactionStrategy) {
		this.transactionStrategy = transactionStrategy;
	}

	public TransactionExtra getTransactionalExtra() {
		return transactionalExtra;
	}

	public void setTransactionalExtra(TransactionExtra transactionalExtra) {
		this.transactionalExtra = transactionalExtra;
	}

	public TransactionContext getTransactionContext() {
		return transactionContext;
	}

	public boolean isTiming() {
		return timing;
	}

	public void setTiming(boolean timing) {
		this.timing = timing;
	}

	public int getTransactionStatus() {
		return transactionStatus;
	}

	public void setTransactionStatus(int transactionStatus) {
		this.transactionStatus = transactionStatus;
	}

	public int getTransactionTimeout() {
		return transactionTimeout;
	}

	public void setTransactionTimeout(int transactionTimeout) {
		this.transactionTimeout = transactionTimeout;
	}

	public XAResourceArchive getParticipant() {
		return participant;
	}

	public Map<RemoteSvc, XAResourceArchive> getRemoteParticipantMap() {
		return remoteParticipantMap;
	}

	public Map<String, XAResourceArchive> getNativeParticipantMap() {
		return nativeParticipantMap;
	}

	public List<XAResourceArchive> getParticipantList() {
		return participantList;
	}

	public void setParticipant(XAResourceArchive participant) {
		this.participant = participant;
	}

	public List<XAResourceArchive> getNativeParticipantList() {
		return nativeParticipantList;
	}

	public List<XAResourceArchive> getRemoteParticipantList() {
		return remoteParticipantList;
	}

}


================================================
FILE: bytejta-core/src/main/java/org/bytesoft/bytejta/TransactionManagerImpl.java
================================================
/**
 * Copyright 2014-2016 yangming.liu<bytefox@126.com>.
 *
 * This copyrighted material is made available to anyone wishing to use, modify,
 * copy, or redistribute it subject to the terms and conditions of the GNU
 * Lesser General Public License, as published by the Free Software Foundation.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
 * or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Lesser General Public License
 * for more details.
 *
 * You should have received a copy of the GNU Lesser General Public License
 * along with this distribution; if not, see <http://www.gnu.org/licenses/>.
 */
package org.bytesoft.bytejta;

import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;

import javax.transaction.HeuristicMixedException;
import javax.transaction.HeuristicRollbackException;
import javax.transaction.InvalidTransactionException;
import javax.transaction.NotSupportedException;
import javax.transaction.RollbackException;
import javax.transaction.Status;
import javax.transaction.SystemException;
import javax.transaction.xa.Xid;

import org.bytesoft.common.utils.ByteUtils;
import org.bytesoft.transaction.RollbackRequiredException;
import org.bytesoft.transaction.Transaction;
import org.bytesoft.transaction.TransactionBeanFactory;
import org.bytesoft.transaction.TransactionContext;
import org.bytesoft.transaction.TransactionManager;
import org.bytesoft.transaction.TransactionRepository;
import org.bytesoft.transaction.aware.TransactionBeanFactoryAware;
import org.bytesoft.transaction.aware.TransactionDebuggable;
import org.bytesoft.transaction.remote.RemoteCoordinator;
import org.bytesoft.transaction.supports.TransactionTimer;
import org.bytesoft.transaction.xa.TransactionXid;
import org.bytesoft.transaction.xa.XidFactory;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

public class TransactionManagerImpl
		implements TransactionManager, TransactionTimer, TransactionBeanFactoryAware, TransactionDebuggable {
	static final Logger logger = LoggerFactory.getLogger(TransactionManagerImpl.class);

	@javax.inject.Inject
	private TransactionBeanFactory beanFactory;
	private int timeoutSeconds = 5 * 60;
	private final Map<Thread, Transaction> thread2txMap = new ConcurrentHashMap<Thread, Transaction>();
	private final Map<Xid, Transaction> xid2txMap = new ConcurrentHashMap<Xid, Transaction>();
	private boolean debuggingEnabled;

	public void begin() throws NotSupportedException, SystemException {
		if (this.getTransaction() != null) {
			throw new NotSupportedException();
		}

		XidFactory xidFactory = this.beanFactory.getXidFactory();
		RemoteCoordinator transactionCoordinator = (RemoteCoordinator) this.beanFactory.getNativeParticipant();

		int timeoutSeconds = this.timeoutSeconds;

		TransactionContext transactionContext = new TransactionContext();
		transactionContext.setPropagatedBy(transactionCoordinator.getIdentifier());
		transactionContext.setCoordinator(true);
		long createdTime = System.currentTimeMillis();
		long expiredTime = createdTime + (timeoutSeconds * 1000L);
		transactionContext.setCreatedTime(createdTime);
		transactionContext.setExpiredTime(expiredTime);

		TransactionXid globalXid = xidFactory.createGlobalXid();
		transactionContext.setXid(globalXid);

		TransactionImpl transaction = new TransactionImpl(transactionContext);
		transaction.setBeanFactory(this.beanFactory);
		transaction.setTransactionTimeout(this.timeoutSeconds);

		if (this.debuggingEnabled) {
			transaction.setCreatedAt(new Exception());
		} // end-if (this.debuggingEnabled)

		this.associateThread(transaction);
		TransactionRepository transactionRepository = this.beanFactory.getTransactionRepository();
		transactionRepository.putTransaction(globalXid, transaction);
		// this.transactionStatistic.fireBeginTransaction(transaction);

		logger.info("{}> begin-transaction", ByteUtils.byteArrayToString(globalXid.getGlobalTransactionId()));
	}

	public void commit() throws RollbackException, HeuristicMixedException, HeuristicRollbackException, SecurityException,
			IllegalStateException, SystemException {
		Transaction transaction = this.getTransactionQuietly(); // this.desociateThread();
		if (transaction == null) {
			throw new IllegalStateException();
		} else if (transaction.getTransactionStatus() == Status.STATUS_ROLLEDBACK) {
			this.desociateThread();
			throw new RollbackException();
		} else if (transaction.getTransactionStatus() == Status.STATUS_COMMITTED) {
			this.desociateThread();
			return;
		} else if (transaction.getTransactionStatus() == Status.STATUS_MARKED_ROLLBACK) {
			this.rollback(transaction);
			throw new HeuristicRollbackException();
		} else if (transaction.getTransactionStatus() != Status.STATUS_ACTIVE) {
			throw new IllegalStateException();
		}

		TransactionRepository transactionRepository = this.beanFactory.getTransactionRepository();
		TransactionContext transactionContext = transaction.getTransactionContext();
		TransactionXid transactionXid = transactionContext.getXid();

		boolean beforeCompletionFailure = true;
		try {
			transaction.fireBeforeTransactionCompletion();
			this.desociateThread();

			this.stopTiming(transaction); // stop timing

			beforeCompletionFailure = false;
		} catch (RollbackRequiredException rrex) {
			this.desociateThread();
			transaction.rollback();

			HeuristicRollbackException hrex = new HeuristicRollbackException();
			hrex.initCause(rrex);
			throw hrex;
		} catch (SystemException ex) {
			this.desociateThread();
			transaction.rollback();

			HeuristicRollbackException hrex = new HeuristicRollbackException();
			hrex.initCause(ex);
			throw hrex;
		} catch (RuntimeException rex) {
			this.desociateThread();
			transaction.rollback();

			HeuristicRollbackException hrex = new HeuristicRollbackException();
			hrex.initCause(rex);
			throw hrex;
		} finally {
			if (beforeCompletionFailure) {
				transaction.fireAfterTransactionCompletion();
			} // end-if (beforeCompletionFailure)
		}

		try {
			transaction.commit();
			transaction.forgetQuietly(); // forget transaction
		} catch (IllegalStateException ex) {
			logger.error("Error occurred while committing transaction.", ex);
			transactionRepository.putErrorTransaction(transactionXid, transaction);
			throw ex;
		} catch (SecurityException ex) {
			logger.error("Error occurred while committing transaction.", ex);
			transactionRepository.putErrorTransaction(transactionXid, transaction);
			throw ex;
		} catch (RollbackException rex) {
			logger.error("Error occurred while committing transaction.", rex);
			transaction.forgetQuietly(); // forget transaction
			throw rex;
		} catch (HeuristicMixedException hmex) {
			logger.error("Error occurred while committing transaction.", hmex);
			transaction.forgetQuietly(); // forget transaction
			throw hmex;
		} catch (HeuristicRollbackException hrex) {
			logger.error("Error occurred while committing transaction.", hrex);
			transaction.forgetQuietly(); // forget transaction
			throw hrex;
		} catch (SystemException ex) {
			logger.error("Error occurred while committing transaction.", ex);
			transactionRepository.putErrorTransaction(transactionXid, transaction);
			throw ex;
		} catch (RuntimeException rex) {
			logger.error("Error occurred while committing transaction.", rex);
			transactionRepository.putErrorTransaction(transactionXid, transaction);
			throw rex;
		} finally {
			transaction.fireAfterTransactionCompletion();
		}
	}

	public void rollback() throws IllegalStateException, SecurityException, SystemException {
		Transaction transaction = this.getTransactionQuietly(); // this.desociateThread();

		if (transaction == null) {
			throw new IllegalStateException();
		} else if (transaction.getTransactionStatus() == Status.STATUS_ROLLEDBACK) {
			this.desociateThread();
			return;
		} else if (transaction.getTransactionStatus() == Status.STATUS_COMMITTED) {
			this.desociateThread();
			throw new SystemException();
		}

		this.rollback(transaction);
	}

	protected void rollback(Transaction transaction) throws IllegalStateException, SecurityException, SystemException {
		TransactionRepository transactionRepository = this.beanFactory.getTransactionRepository();
		TransactionContext transactionContext = transaction.getTransactionContext();
		TransactionXid transactionXid = transactionContext.getXid();

		try {
			transaction.fireBeforeTransactionCompletionQuietly();
			this.desociateThread();

			this.stopTiming(transaction); // stop timing

			transaction.rollback();
			transaction.forgetQuietly();
		} catch (IllegalStateException ex) {
			logger.error("Error occurred while rolling back transaction.", ex);
			transactionRepository.putErrorTransaction(transactionXid, transaction);
			throw ex;
		} catch (SecurityException ex) {
			logger.error("Error occurred while rolling back transaction.", ex);
			transactionRepository.putErrorTransaction(transactionXid, transaction);
			throw ex;
		} catch (SystemException ex) {
			logger.error("Error occurred while rolling back transaction.", ex);
			transactionRepository.putErrorTransaction(transactionXid, transaction);
			throw ex;
		} catch (RuntimeException ex) {
			logger.error("Error occurred while rolling back transaction.", ex);
			transactionRepository.putErrorTransaction(transactionXid, transaction);
			throw ex;
		} finally {
			transaction.fireAfterTransactionCompletion();
		}
	}

	public void associateThread(Transaction transaction) {
		TransactionContext transactionContext = transaction.getTransactionContext();
		TransactionXid transactionXid = transactionContext.getXid();
		this.xid2txMap.put(transactionXid, transaction);
		this.thread2txMap.put(Thread.currentThread(), transaction);
	}

	public Transaction desociateThread() {
		Transaction transaction = this.thread2txMap.remove(Thread.currentThread());
		if (transaction == null) {
			return null;
		}

		TransactionContext transactionContext = transaction.getTransactionContext();
		this.xid2txMap.remove(transactionContext.getXid());
		return transaction;
	}

	public Transaction suspend() throws RollbackRequiredException, SystemException {
		Transaction transaction = this.desociateThread();
		if (transaction == null) {
			return null;
		}

		transaction.suspend();
		return transaction;
	}

	public void resume(javax.transaction.Transaction tobj)
			throws InvalidTransactionException, IllegalStateException, RollbackRequiredException, SystemException {

		if (tobj == null) {
			throw new InvalidTransactionException();
		}

		if (TransactionImpl.class.isInstance(tobj) == false) {
			throw new InvalidTransactionException();
		} else if (this.getTransaction() != null) {
			throw new IllegalStateException();
		}

		TransactionImpl transaction = (TransactionImpl) tobj;
		transaction.resume();
		this.associateThread(transaction);

	}

	public int getStatus() throws SystemException {
		Transaction transaction = this.getTransaction();
		return transaction == null ? Status.STATUS_NO_TRANSACTION : transaction.getTransactionStatus();
	}

	public Transaction getTransaction(Xid transactionXid) {
		return this.xid2txMap.get(transactionXid);
	}

	public Transaction getTransaction(Thread thread) {
		return this.thread2txMap.get(thread);
	}

	public Transaction getTransactionQuietly() {
		try {
			return this.getTransaction();
		} catch (SystemException ex) {
			return null;
		} catch (RuntimeException ex) {
			return null;
		}
	}

	public Transaction getTransaction() throws SystemException {
		return this.thread2txMap.get(Thread.currentThread());
	}

	public void setRollbackOnlyQuietly() {
		Transaction transaction = this.getTransactionQuietly();
		if (transaction != null) {
			transaction.setRollbackOnlyQuietly();
		}
	}

	public void setRollbackOnly() throws IllegalStateException, SystemException {
		Transaction transaction = this.getTransaction();
		if (transaction == null) {
			throw new SystemException();
		}
		transaction.setRollbackOnly();
	}

	public void setTransactionTimeout(int seconds) throws SystemException {
		Transaction transaction = this.getTransaction();
		if (transaction == null) {
			throw new SystemException();
		} else if (seconds < 0) {
			throw new SystemException();
		} else if (seconds == 0) {
			// ignore
		} else {
			((TransactionImpl) transaction).changeTransactionTimeout(seconds * 1000);
		}
	}

	public void timingExecution() {
		List<Transaction> expiredTransactions = new ArrayList<Transaction>();
		List<Transaction> activeTransactions = new ArrayList<Transaction>(this.thread2txMap.values());
		long current = System.currentTimeMillis();
		Iterator<Transaction> activeItr = activeTransactions.iterator();
		while (activeItr.hasNext()) {
			Transaction transaction = activeItr.next();
			if (transaction.isTiming()) {
				TransactionContext transactionContext = transaction.getTransactionContext();
				if (transactionContext.getExpiredTime() <= current) {
					expiredTransactions.add(transaction);
				}
			} // end-if (transaction.isTiming())
		}

		Iterator<Transaction> expiredItr = expiredTransactions.iterator();
		while (activeItr.hasNext()) {
			Transaction transaction = expiredItr.next();
			if (transaction.getTransactionStatus() == Status.STATUS_ACTIVE
					|| transaction.getTransactionStatus() == Status.STATUS_MARKED_ROLLBACK) {
				this.timingRollback(transaction);
			}
		}

	}

	private void timingRollback(Transaction transaction) {
		TransactionContext transactionContext = transaction.getTransactionContext();
		TransactionXid globalXid = transactionContext.getXid();
		TransactionRepository transactionRepository = this.beanFactory.getTransactionRepository();

		try {
			this.associateThread(transaction);
			transaction.fireBeforeTransactionCompletionQuietly();
			this.desociateThread();

			transaction.rollback();
			transaction.forgetQuietly(); // forget transaction
		} catch (Exception ex) {
			transactionRepository.putErrorTransaction(globalXid, transaction);
		} finally {
			transaction.fireAfterTransactionCompletion();
		}
	}

	public void stopTiming(Transaction transaction) {
		if (TransactionImpl.class.isInstance(transaction)) {
			((TransactionImpl) transaction).stopTiming();
		}
	}

	public boolean isDebuggingEnabled() {
		return debuggingEnabled;
	}

	public void setDebuggingEnabled(boolean debuggingEnabled) {
		this.debuggingEnabled = debuggingEnabled;
	}

	public int getTimeoutSeconds() {
		return timeoutSeconds;
	}

	public void setTimeoutSeconds(int timeoutSeconds) {
		this.timeoutSeconds = timeoutSeconds;
	}

	public TransactionBeanFactory getBeanFactory() {
		return this.beanFactory;
	}

	public void setBeanFactory(TransactionBeanFactory tbf) {
		this.beanFactory = tbf;
	}

}


================================================
FILE: bytejta-core/src/main/java/org/bytesoft/bytejta/TransactionRecoveryImpl.java
================================================
/**
 * Copyright 2014-2016 yangming.liu<bytefox@126.com>.
 *
 * This copyrighted material is made available to anyone wishing to use, modify,
 * copy, or redistribute it subject to the terms and conditions of the GNU
 * Lesser General Public License, as published by the Free Software Foundation.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
 * or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Lesser General Public License
 * for more details.
 *
 * You should have received a copy of the GNU Lesser General Public License
 * along with this distribution; if not, see <http://www.gnu.org/licenses/>.
 */
package org.bytesoft.bytejta;

import java.util.List;
import java.util.Map;

import javax.transaction.Status;
import javax.transaction.SystemException;
import javax.transaction.xa.XAResource;

import org.apache.commons.lang3.StringUtils;
import org.bytesoft.bytejta.supports.resource.RemoteResourceDescriptor;
import org.bytesoft.common.utils.ByteUtils;
import org.bytesoft.common.utils.CommonUtils;
import org.bytesoft.transaction.CommitRequiredException;
import org.bytesoft.transaction.RollbackRequiredException;
import org.bytesoft.transaction.Transaction;
import org.bytesoft.transaction.TransactionBeanFactory;
import org.bytesoft.transaction.TransactionContext;
import org.bytesoft.transaction.TransactionRecovery;
import org.bytesoft.transaction.TransactionRepository;
import org.bytesoft.transaction.archive.TransactionArchive;
import org.bytesoft.transaction.archive.XAResourceArchive;
import org.bytesoft.transaction.aware.TransactionBeanFactoryAware;
import org.bytesoft.transaction.logging.TransactionLogger;
import org.bytesoft.transaction.recovery.TransactionRecoveryCallback;
import org.bytesoft.transaction.recovery.TransactionRecoveryListener;
import org.bytesoft.transaction.remote.RemoteSvc;
import org.bytesoft.transaction.supports.resource.XAResourceDescriptor;
import org.bytesoft.transaction.xa.TransactionXid;
import org.bytesoft.transaction.xa.XidFactory;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

public class TransactionRecoveryImpl implements TransactionRecovery, TransactionBeanFactoryAware {
	static final Logger logger = LoggerFactory.getLogger(TransactionRecoveryImpl.class);
	static final long SECOND_MILLIS = 1000L;

	private TransactionRecoveryListener listener;
	@javax.inject.Inject
	private TransactionBeanFactory beanFactory;
	private volatile boolean initialized;

	public synchronized void timingRecover() {
		TransactionRepository transactionRepository = beanFactory.getTransactionRepository();
		List<Transaction> transactions = transactionRepository.getErrorTransactionList();
		int total = transactions == null ? 0 : transactions.size(), value = 0;
		for (int i = 0; transactions != null && i < transactions.size(); i++) {
			Transaction transaction = transactions.get(i);
			TransactionContext transactionContext = transaction.getTransactionContext();
			TransactionXid xid = transactionContext.getXid();
			int recoveredTimes = transactionContext.getRecoveredTimes() > 10 ? 10 : transactionContext.getRecoveredTimes();
			long recoverMillis = transactionContext.getCreatedTime() + SECOND_MILLIS * 60L * (long) Math.pow(2, recoveredTimes);

			if (System.currentTimeMillis() < recoverMillis) {
				continue;
			} // end-if (System.currentTimeMillis() < recoverMillis)

			try {
				this.recoverTransaction(transaction);
				value++;
			} catch (CommitRequiredException ex) {
				logger.debug("{}> recover: branch={}, message= commit-required",
						ByteUtils.byteArrayToString(xid.getGlobalTransactionId()),
						ByteUtils.byteArrayToString(xid.getBranchQualifier()), ex);
				continue;
			} catch (RollbackRequiredException ex) {
				logger.debug("{}> recover: branch={}, message= rollback-required",
						ByteUtils.byteArrayToString(xid.getGlobalTransactionId()),
						ByteUtils.byteArrayToString(xid.getBranchQualifier()), ex);
				continue;
			} catch (SystemException ex) {
				logger.debug("{}> recover: branch={}, message= {}", ByteUtils.byteArrayToString(xid.getGlobalTransactionId()),
						ByteUtils.byteArrayToString(xid.getBranchQualifier()), ex.getMessage(), ex);
				continue;
			} catch (RuntimeException ex) {
				logger.debug("{}> recover: branch={}, message= {}", ByteUtils.byteArrayToString(xid.getGlobalTransactionId()),
						ByteUtils.byteArrayToString(xid.getBranchQualifier()), ex.getMessage(), ex);
				continue;
			}
		}
		logger.debug("[transaction-recovery] total= {}, success= {}", total, value);
	}

	public void recoverTransaction(Transaction transaction)
			throws CommitRequiredException, RollbackRequiredException, SystemException {

		TransactionContext transactionContext = transaction.getTransactionContext();
		boolean coordinator = transactionContext.isCoordinator();
		if (coordinator) {
			transaction.recover();
			this.recoverCoordinator(transaction);
		} else {
			transaction.recover();
			this.recoverParticipant(transaction);
		}

	}

	protected void recoverCoordinator(Transaction transaction)
			throws CommitRequiredException, RollbackRequiredException, SystemException {

		switch (transaction.getTransactionStatus()) {
		case Status.STATUS_ACTIVE:
		case Status.STATUS_MARKED_ROLLBACK:
		case Status.STATUS_PREPARING:
		case Status.STATUS_ROLLING_BACK:
		case Status.STATUS_UNKNOWN:
			transaction.recoveryRollback();
			transaction.forgetQuietly();
			break;
		case Status.STATUS_PREPARED:
		case Status.STATUS_COMMITTING:
			transaction.recoveryCommit();
			transaction.forgetQuietly();
			break;
		case Status.STATUS_COMMITTED:
		case Status.STATUS_ROLLEDBACK:
			transaction.forgetQuietly();
			break;
		default:
			logger.debug("Current transaction has already been completed.");
		}
	}

	protected void recoverParticipant(Transaction transaction)
			throws CommitRequiredException, RollbackRequiredException, SystemException {

		TransactionImpl transactionImpl = (TransactionImpl) transaction;
		switch (transaction.getTransactionStatus()) {
		case Status.STATUS_PREPARED:
		case Status.STATUS_COMMITTING:
			break;
		case Status.STATUS_COMMITTED:
		case Status.STATUS_ROLLEDBACK:
			break;
		case Status.STATUS_ACTIVE:
		case Status.STATUS_MARKED_ROLLBACK:
		case Status.STATUS_PREPARING:
		case Status.STATUS_UNKNOWN:
		case Status.STATUS_ROLLING_BACK:
		default:
			transactionImpl.recoveryRollback();
			transactionImpl.forgetQuietly();
		}
	}

	public synchronized void startRecovery() {
		final TransactionRepository transactionRepository = beanFactory.getTransactionRepository();
		final TransactionLogger transactionLogger = beanFactory.getTransactionLogger();
		transactionLogger.recover(new TransactionRecoveryCallback() {
			public void recover(TransactionArchive archive) {
				try {
					TransactionImpl transaction = (TransactionImpl) reconstruct(archive);
					if (listener != null) {
						listener.onRecovery(transaction);
					}
					TransactionContext transactionContext = transaction.getTransactionContext();
					TransactionXid globalXid = transactionContext.getXid();
					transactionRepository.putTransaction(globalXid, transaction);
					transactionRepository.putErrorTransaction(globalXid, transaction);
				} catch (IllegalStateException ex) {
					transactionLogger.deleteTransaction(archive);
				}

			}
		});

		TransactionCoordinator transactionCoordinator = //
				(TransactionCoordinator) this.beanFactory.getNativeParticipant();
		transactionCoordinator.markParticipantReady();
		this.initialized = true; // timingRecovery should be executed after initialization
	}

	public org.bytesoft.transaction.Transaction reconstruct(TransactionArchive archive) throws IllegalStateException {
		XidFactory xidFactory = this.beanFactory.getXidFactory();
		TransactionContext transactionContext = new TransactionContext();
		TransactionXid xid = (TransactionXid) archive.getXid();
		transactionContext.setXid(xidFactory.createGlobalXid(xid.getGlobalTransactionId()));
		transactionContext.setRecoveried(true);
		transactionContext.setCoordinator(archive.isCoordinator());
		transactionContext.setPropagatedBy(archive.getPropagatedBy());
		transactionContext.setRecoveredTimes(archive.getRecoveredTimes());
		transactionContext.setCreatedTime(archive.getRecoveredAt());

		TransactionImpl transaction = new TransactionImpl(transactionContext);
		transaction.setBeanFactory(this.beanFactory);
		transaction.setTransactionStatus(archive.getStatus());

		List<XAResourceArchive> nativeResources = archive.getNativeResources();
		transaction.getNativeParticipantList().addAll(nativeResources);

		transaction.setParticipant(archive.getOptimizedResource());

		List<XAResourceArchive> remoteResources = archive.getRemoteResources();
		transaction.getRemoteParticipantList().addAll(remoteResources);

		List<XAResourceArchive> participants = transaction.getParticipantList();
		Map<String, XAResourceArchive> nativeParticipantMap = transaction.getNativeParticipantMap();
		Map<RemoteSvc, XAResourceArchive> remoteParticipantMap = transaction.getRemoteParticipantMap();

		if (archive.getOptimizedResource() != null) {
			XAResourceArchive optimized = archive.getOptimizedResource();
			XAResourceDescriptor descriptor = optimized.getDescriptor();
			String identifier = descriptor.getIdentifier();
			if (RemoteResourceDescriptor.class.isInstance(descriptor)) {
				RemoteSvc remoteSvc = CommonUtils.getRemoteSvc(identifier);
				remoteParticipantMap.put(remoteSvc, optimized);
			} else {
				nativeParticipantMap.put(identifier, optimized);
			}

			participants.add(optimized);
		}

		for (int i = 0; i < nativeResources.size(); i++) {
			XAResourceArchive element = nativeResources.get(i);
			XAResourceDescriptor descriptor = element.getDescriptor();
			String identifier = StringUtils.trimToEmpty(descriptor.getIdentifier());
			nativeParticipantMap.put(identifier, element);
		}
		participants.addAll(nativeResources);

		for (int i = 0; i < remoteResources.size(); i++) {
			XAResourceArchive element = remoteResources.get(i);
			XAResourceDescriptor descriptor = element.getDescriptor();
			String identifier = StringUtils.trimToEmpty(descriptor.getIdentifier());

			if (RemoteResourceDescriptor.class.isInstance(descriptor)) {
				RemoteSvc remoteSvc = CommonUtils.getRemoteSvc(identifier);
				remoteParticipantMap.put(remoteSvc, element);
			} // end-if (RemoteResourceDescriptor.class.isInstance(descriptor))
		}
		participants.addAll(remoteResources);

		transaction.recoverTransactionStrategy(archive.getTransactionStrategyType());

		if (archive.getVote() == XAResource.XA_RDONLY) {
			throw new IllegalStateException("Transaction has already been completed!");
		}

		return transaction;
	}

	public synchronized void branchRecover() {
		// For a completed global transaction, if its branch receives a business request again, it will be rolled back by the
		// RM's timeout mechanism, there is no need to deal with it.
	}

	public boolean isInitialized() {
		return initialized;
	}

	public TransactionBeanFactory getBeanFactory() {
		return beanFactory;
	}

	public void setBeanFactory(TransactionBeanFactory tbf) {
		this.beanFactory = tbf;
	}

	public TransactionRecoveryListener getListener() {
		return listener;
	}

	public void setListener(TransactionRecoveryListener listener) {
		this.listener = listener;
	}
}


================================================
FILE: bytejta-core/src/main/java/org/bytesoft/bytejta/TransactionRepositoryImpl.java
================================================
/**
 * Copyright 2014-2016 yangming.liu<bytefox@126.com>.
 *
 * This copyrighted material is made available to anyone wishing to use, modify,
 * copy, or redistribute it subject to the terms and conditions of the GNU
 * Lesser General Public License, as published by the Free Software Foundation.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
 * or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Lesser General Public License
 * for more details.
 *
 * You should have received a copy of the GNU Lesser General Public License
 * along with this distribution; if not, see <http://www.gnu.org/licenses/>.
 */
package org.bytesoft.bytejta;

import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;

import org.bytesoft.transaction.Transaction;
import org.bytesoft.transaction.TransactionRepository;
import org.bytesoft.transaction.xa.TransactionXid;

public class TransactionRepositoryImpl implements TransactionRepository {
	private final Map<TransactionXid, Transaction> xidToTxMap = new ConcurrentHashMap<TransactionXid, Transaction>();
	private final Map<TransactionXid, Transaction> xidToErrTxMap = new ConcurrentHashMap<TransactionXid, Transaction>();

	public void putTransaction(TransactionXid globalXid, Transaction transaction) {
		this.xidToTxMap.put(globalXid, transaction);
	}

	public Transaction getTransaction(TransactionXid globalXid) {
		return this.xidToTxMap.get(globalXid);
	}

	public Transaction removeTransaction(TransactionXid globalXid) {
		return this.xidToTxMap.remove(globalXid);
	}

	public void putErrorTransaction(TransactionXid globalXid, Transaction transaction) {
		this.xidToErrTxMap.put(globalXid, transaction);
	}

	public Transaction getErrorTransaction(TransactionXid globalXid) {
		return this.xidToErrTxMap.get(globalXid);
	}

	public Transaction removeErrorTransaction(TransactionXid globalXid) {
		return this.xidToErrTxMap.remove(globalXid);
	}

	public List<Transaction> getErrorTransactionList() {
		return new ArrayList<Transaction>(this.xidToErrTxMap.values());
	}

	public List<Transaction> getActiveTransactionList() {
		return new ArrayList<Transaction>(this.xidToTxMap.values());
	}

}


================================================
FILE: bytejta-core/src/main/java/org/bytesoft/bytejta/TransactionStrategy.java
================================================
/**
 * Copyright 2014-2017 yangming.liu<bytefox@126.com>.
 *
 * This copyrighted material is made available to anyone wishing to use, modify,
 * copy, or redistribute it subject to the terms and conditions of the GNU
 * Lesser General Public License, as published by the Free Software Foundation.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
 * or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Lesser General Public License
 * for more details.
 *
 * You should have received a copy of the GNU Lesser General Public License
 * along with this distribution; if not, see <http://www.gnu.org/licenses/>.
 */
package org.bytesoft.bytejta;

import javax.transaction.HeuristicCommitException;
import javax.transaction.HeuristicMixedException;
import javax.transaction.HeuristicRollbackException;
import javax.transaction.SystemException;
import javax.transaction.xa.Xid;

import org.bytesoft.transaction.CommitRequiredException;
import org.bytesoft.transaction.RollbackRequiredException;

public interface TransactionStrategy /* extends TransactionBeanFactoryAware */ {

	public int TRANSACTION_STRATEGY_VACANT = 0;
	public int TRANSACTION_STRATEGY_SIMPLE = 1;
	public int TRANSACTION_STRATEGY_COMMON = 2;
	public int TRANSACTION_STRATEGY_LRO = 3;

	public int prepare(Xid xid) throws RollbackRequiredException, CommitRequiredException;

	public void commit(Xid xid, boolean onePhaseCommit)
			throws HeuristicMixedException, HeuristicRollbackException, IllegalStateException, SystemException;

	public void rollback(Xid xid)
			throws HeuristicMixedException, HeuristicCommitException, IllegalStateException, SystemException;

}


================================================
FILE: bytejta-core/src/main/java/org/bytesoft/bytejta/UserTransactionImpl.java
================================================
/**
 * Copyright 2014-2016 yangming.liu<bytefox@126.com>.
 *
 * This copyrighted material is made available to anyone wishing to use, modify,
 * copy, or redistribute it subject to the terms and conditions of the GNU
 * Lesser General Public License, as published by the Free Software Foundation.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
 * or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Lesser General Public License
 * for more details.
 *
 * You should have received a copy of the GNU Lesser General Public License
 * along with this distribution; if not, see <http://www.gnu.org/licenses/>.
 */
package org.bytesoft.bytejta;

import java.io.Serializable;

import javax.naming.NamingException;
import javax.naming.Reference;
import javax.naming.Referenceable;
import javax.transaction.HeuristicMixedException;
import javax.transaction.HeuristicRollbackException;
import javax.transaction.NotSupportedException;
import javax.transaction.RollbackException;
import javax.transaction.SystemException;
import javax.transaction.TransactionManager;
import javax.transaction.UserTransaction;

public class UserTransactionImpl implements UserTransaction, Referenceable, Serializable {
	private static final long serialVersionUID = 1L;

	@javax.inject.Inject
	private transient TransactionManager transactionManager;

	public void begin() throws NotSupportedException, SystemException {
		this.transactionManager.begin();
	}

	public void commit() throws HeuristicMixedException, HeuristicRollbackException, IllegalStateException,
			RollbackException, SecurityException, SystemException {
		this.transactionManager.commit();
	}

	public int getStatus() throws SystemException {
		return this.transactionManager.getStatus();
	}

	public void rollback() throws IllegalStateException, SecurityException, SystemException {
		this.transactionManager.rollback();
	}

	public void setRollbackOnly() throws IllegalStateException, SystemException {
		this.transactionManager.setRollbackOnly();
	}

	public void setTransactionTimeout(int timeout) throws SystemException {
		this.transactionManager.setTransactionTimeout(timeout);
	}

	public Reference getReference() throws NamingException {
		throw new NamingException("Not supported yet!");
	}

	public TransactionManager getTransactionManager() {
		return transactionManager;
	}

	public void setTransactionManager(TransactionManager transactionManager) {
		this.transactionManager = transactionManager;
	}

}


================================================
FILE: bytejta-core/src/main/java/org/bytesoft/bytejta/VacantTransactionLock.java
================================================
/**
 * Copyright 2014-2017 yangming.liu<bytefox@126.com>.
 *
 * This copyrighted material is made available to anyone wishing to use, modify,
 * copy, or redistribute it subject to the terms and conditions of the GNU
 * Lesser General Public License, as published by the Free Software Foundation.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
 * or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Lesser General Public License
 * for more details.
 *
 * You should have received a copy of the GNU Lesser General Public License
 * along with this distribution; if not, see <http://www.gnu.org/licenses/>.
 */
package org.bytesoft.bytejta;

import org.bytesoft.transaction.TransactionLock;
import org.bytesoft.transaction.xa.TransactionXid;

public class VacantTransactionLock implements TransactionLock {

	public boolean lockTransaction(TransactionXid transactionXid, String identifier) {
		return true;
	}

	public void unlockTransaction(TransactionXid transactionXid, String identifier) {
	}

}


================================================
FILE: bytejta-core/src/main/java/org/bytesoft/bytejta/logging/ArchiveDeserializerImpl.java
================================================
/**
 * Copyright 2014-2016 yangming.liu<bytefox@126.com>.
 *
 * This copyrighted material is made available to anyone wishing to use, modify,
 * copy, or redistribute it subject to the terms and conditions of the GNU
 * Lesser General Public License, as published by the Free Software Foundation.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
 * or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Lesser General Public License
 * for more details.
 *
 * You should have received a copy of the GNU Lesser General Public License
 * along with this distribution; if not, see <http://www.gnu.org/licenses/>.
 */
package org.bytesoft.bytejta.logging;

import org.bytesoft.transaction.archive.TransactionArchive;
import org.bytesoft.transaction.archive.XAResourceArchive;
import org.bytesoft.transaction.logging.ArchiveDeserializer;
import org.bytesoft.transaction.xa.TransactionXid;

public class ArchiveDeserializerImpl implements ArchiveDeserializer {
	static final byte TYPE_TRANSACTION = 0x0;
	static final byte TYPE_XA_RESOURCE = 0x1;

	private ArchiveDeserializer xaResourceArchiveDeserializer;
	private ArchiveDeserializer transactionArchiveDeserializer;

	public byte[] serialize(TransactionXid xid, Object archive) {

		if (TransactionArchive.class.isInstance(archive)) {
			byte[] array = this.transactionArchiveDeserializer.serialize(xid, archive);
			byte[] byteArray = new byte[array.length + 1];
			byteArray[0] = TYPE_TRANSACTION;
			System.arraycopy(array, 0, byteArray, 1, array.length);
			return byteArray;
		} else if (XAResourceArchive.class.isInstance(archive)) {
			byte[] array = this.xaResourceArchiveDeserializer.serialize(xid, archive);
			byte[] byteArray = new byte[array.length + 1];
			byteArray[0] = TYPE_XA_RESOURCE;
			System.arraycopy(array, 0, byteArray, 1, array.length);
			return byteArray;
		} else {
			throw new IllegalArgumentException();
		}

	}

	public Object deserialize(TransactionXid xid, byte[] array) {
		if (array == null || array.length <= 1) {
			throw new IllegalArgumentException();
		}

		byte type = array[0];
		if (type == TYPE_TRANSACTION) {
			byte[] byteArray = new byte[array.length - 1];
			System.arraycopy(array, 1, byteArray, 0, byteArray.length);
			return this.transactionArchiveDeserializer.deserialize(xid, byteArray);
		} else if (type == TYPE_XA_RESOURCE) {
			byte[] byteArray = new byte[array.length - 1];
			System.arraycopy(array, 1, byteArray, 0, byteArray.length);
			return this.xaResourceArchiveDeserializer.deserialize(xid, byteArray);
		} else {
			throw new IllegalArgumentException();
		}

	}

	public ArchiveDeserializer getXaResourceArchiveDeserializer() {
		return xaResourceArchiveDeserializer;
	}

	public void setXaResourceArchiveDeserializer(ArchiveDeserializer xaResourceArchiveDeserializer) {
		this.xaResourceArchiveDeserializer = xaResourceArchiveDeserializer;
	}

	public ArchiveDeserializer getTransactionArchiveDeserializer() {
		return transactionArchiveDeserializer;
	}

	public void setTransactionArchiveDeserializer(ArchiveDeserializer transactionArchiveDeserializer) {
		this.transactionArchiveDeserializer = transactionArchiveDeserializer;
	}

}


================================================
FILE: bytejta-core/src/main/java/org/bytesoft/bytejta/logging/SampleTransactionLogger.java
================================================
/**
 * Copyright 2014-2016 yangming.liu<bytefox@126.com>.
 *
 * This copyrighted material is made available to anyone wishing to use, modify,
 * copy, or redistribute it subject to the terms and conditions of the GNU
 * Lesser General Public License, as published by the Free Software Foundation.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
 * or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Lesser General Public License
 * for more details.
 *
 * You should have received a copy of the GNU Lesser General Public License
 * along with this distribution; if not, see <http://www.gnu.org/licenses/>.
 */
package org.bytesoft.bytejta.logging;

import java.io.File;
import java.io.IOException;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
import java.util.Map;

import javax.annotation.PostConstruct;
import javax.transaction.xa.Xid;

import org.apache.commons.lang3.StringUtils;
import org.bytesoft.bytejta.logging.store.VirtualLoggingSystemImpl;
import org.bytesoft.common.utils.ByteUtils;
import org.bytesoft.transaction.TransactionBeanFactory;
import org.bytesoft.transaction.archive.TransactionArchive;
import org.bytesoft.transaction.archive.XAResourceArchive;
import org.bytesoft.transaction.aware.TransactionBeanFactoryAware;
import org.bytesoft.transaction.aware.TransactionEndpointAware;
import org.bytesoft.transaction.logging.ArchiveDeserializer;
import org.bytesoft.transaction.logging.LoggingFlushable;
import org.bytesoft.transaction.logging.TransactionLogger;
import org.bytesoft.transaction.logging.store.VirtualLoggingListener;
import org.bytesoft.transaction.logging.store.VirtualLoggingRecord;
import org.bytesoft.transaction.logging.store.VirtualLoggingSystem;
import org.bytesoft.transaction.recovery.TransactionRecoveryCallback;
import org.bytesoft.transaction.xa.TransactionXid;
import org.bytesoft.transaction.xa.XidFactory;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

public class SampleTransactionLogger extends VirtualLoggingSystemImpl
		implements TransactionLogger, LoggingFlushable, TransactionBeanFactoryAware, TransactionEndpointAware {
	static final Logger logger = LoggerFactory.getLogger(SampleTransactionLogger.class);

	@javax.inject.Inject
	private TransactionBeanFactory beanFactory;
	private String identifier;

	@PostConstruct
	public void construct() throws IOException {
		this.initializeIfNecessary();
	}

	private void initializeIfNecessary() throws IllegalStateException {
		if (StringUtils.isNotBlank(this.identifier)) {
			try {
				super.construct();
			} catch (IOException error) {
				throw new IllegalStateException("Error occurred while initializing tx-log!", error);
			}
		} // end-if (StringUtils.isNotBlank(this.endpoint))
	}

	public void createTransaction(TransactionArchive archive) {
		ArchiveDeserializer deserializer = this.beanFactory.getArchiveDeserializer();

		try {
			byte[] byteArray = deserializer.serialize((TransactionXid) archive.getXid(), archive);
			this.create(archive.getXid(), byteArray);
		} catch (RuntimeException rex) {
			logger.error("Error occurred while creating transaction-archive.", rex);
		}
	}

	public void updateTransaction(TransactionArchive archive) {
		ArchiveDeserializer deserializer = this.beanFactory.getArchiveDeserializer();

		try {
			byte[] byteArray = deserializer.serialize((TransactionXid) archive.getXid(), archive);
			this.modify(archive.getXid(), byteArray);
		} catch (RuntimeException rex) {
			logger.error("Error occurred while modifying transaction-archive.", rex);
		}
	}

	public void deleteTransaction(TransactionArchive archive) {
		try {
			this.delete(archive.getXid());
		} catch (RuntimeException rex) {
			logger.error("Error occurred while deleting transaction-archive.", rex);
		}
	}

	public void createParticipant(XAResourceArchive archive) {
	}

	public void updateParticipant(XAResourceArchive archive) {
		ArchiveDeserializer deserializer = this.beanFactory.getArchiveDeserializer();

		try {
			byte[] byteArray = deserializer.serialize((TransactionXid) archive.getXid(), archive);
			this.modify(archive.getXid(), byteArray);
		} catch (RuntimeException rex) {
			logger.error("Error occurred while modifying resource-archive.", rex);
		}
	}

	public void deleteParticipant(XAResourceArchive archive) {
	}

	public void createResource(XAResourceArchive archive) {
	}

	public void updateResource(XAResourceArchive archive) {
	}

	public void deleteResource(XAResourceArchive archive) {
	}

	public List<VirtualLoggingRecord> compressIfNecessary(List<VirtualLoggingRecord> recordList) {
		ArchiveDeserializer deserializer = this.beanFactory.getArchiveDeserializer();
		XidFactory xidFactory = this.beanFactory.getXidFactory();

		List<VirtualLoggingRecord> resultList = new ArrayList<VirtualLoggingRecord>();

		Map<TransactionXid, TransactionArchive> xidMap = new HashMap<TransactionXid, TransactionArchive>();
		for (int index = 0; recordList != null && index < recordList.size(); index++) {
			VirtualLoggingRecord record = recordList.get(index);
			byte[] byteArray = record.getContent();
			byte[] keyByteArray = new byte[XidFactory.GLOBAL_TRANSACTION_LENGTH];
			System.arraycopy(byteArray, 0, keyByteArray, 0, keyByteArray.length);
			// int operator = byteArray[keyByteArray.length];
			byte[] valueByteArray = new byte[byteArray.length - XidFactory.GLOBAL_TRANSACTION_LENGTH - 1 - 4];
			System.arraycopy(byteArray, XidFactory.GLOBAL_TRANSACTION_LENGTH + 1 + 4, valueByteArray, 0, valueByteArray.length);

			TransactionXid xid = xidFactory.createGlobalXid(keyByteArray);

			Object obj = deserializer.deserialize(xid, valueByteArray);
			if (TransactionArchive.class.isInstance(obj)) {
				xidMap.put(xid, (TransactionArchive) obj);
			} else if (XAResourceArchive.class.isInstance(obj)) {
				TransactionArchive archive = xidMap.get(xid);
				if (archive == null) {
					logger.error("Error occurred while compressing resource archive: {}", obj);
					continue;
				}

				XAResourceArchive resourceArchive = (XAResourceArchive) obj;
				boolean matched = false;

				List<XAResourceArchive> nativeResources = archive.getNativeResources();
				for (int i = 0; matched == false && nativeResources != null && i < nativeResources.size(); i++) {
					XAResourceArchive element = nativeResources.get(i);
					if (resourceArchive.getXid().equals(element.getXid())) {
						matched = true;
						nativeResources.set(i, resourceArchive);
					}
				}

				XAResourceArchive optimizedResource = archive.getOptimizedResource();
				if (matched == false && optimizedResource != null) {
					if (resourceArchive.getXid().equals(optimizedResource.getXid())) {
						matched = true;
						archive.setOptimizedResource(resourceArchive);
					}
				}

				List<XAResourceArchive> remoteResources = archive.getRemoteResources();
				for (int i = 0; matched == false && remoteResources != null && i < remoteResources.size(); i++) {
					XAResourceArchive element = remoteResources.get(i);
					if (resourceArchive.getXid().equals(element.getXid())) {
						matched = true;
						remoteResources.set(i, resourceArchive);
					}
				}

				if (matched == false) {
					logger.error("Error occurred while compressing resource archive: {}, invalid resoure!", obj);
				}

			} else {
				logger.error("unkown resource: {}!", obj);
			}
		}

		for (Iterator<Map.Entry<TransactionXid, TransactionArchive>> itr = xidMap.entrySet().iterator(); itr.hasNext();) {
			Map.Entry<TransactionXid, TransactionArchive> entry = itr.next();
			TransactionXid xid = entry.getKey();
			TransactionArchive value = entry.getValue();

			byte[] globalByteArray = xid.getGlobalTransactionId();

			byte[] keyByteArray = new byte[XidFactory.GLOBAL_TRANSACTION_LENGTH];
			byte[] valueByteArray = deserializer.serialize(xid, value);
			byte[] sizeByteArray = ByteUtils.intToByteArray(valueByteArray.length);

			System.arraycopy(globalByteArray, 0, keyByteArray, 0, XidFactory.GLOBAL_TRANSACTION_LENGTH);

			byte[] byteArray = new byte[XidFactory.GLOBAL_TRANSACTION_LENGTH + 1 + 4 + valueByteArray.length];

			System.arraycopy(keyByteArray, 0, byteArray, 0, keyByteArray.length);
			byteArray[keyByteArray.length] = OPERATOR_CREATE;
			System.arraycopy(sizeByteArray, 0, byteArray, XidFactory.GLOBAL_TRANSACTION_LENGTH + 1, sizeByteArray.length);
			System.arraycopy(valueByteArray, 0, byteArray, XidFactory.GLOBAL_TRANSACTION_LENGTH + 1 + 4, valueByteArray.length);

			VirtualLoggingRecord record = new VirtualLoggingRecord();
			record.setIdentifier(xid);
			record.setOperator(OPERATOR_CREATE);
			record.setValue(valueByteArray);
			record.setContent(byteArray);

			resultList.add(record);
		}

		return resultList;
	}

	public void recover(TransactionRecoveryCallback callback) {

		final Map<Xid, TransactionArchive> xidMap = new HashMap<Xid, TransactionArchive>();
		final ArchiveDeserializer deserializer = this.beanFactory.getArchiveDeserializer();
		final XidFactory xidFactory = this.beanFactory.getXidFactory();

		this.traversal(new VirtualLoggingListener() {
			public void recvOperation(VirtualLoggingRecord action) {
				Xid xid = action.getIdentifier();
				int operator = action.getOperator();
				if (VirtualLoggingSystem.OPERATOR_DELETE == operator) {
					xidMap.remove(xid);
				} else if (xidMap.containsKey(xid) == false) {
					xidMap.put(xid, null);
				}
			}
		});

		this.traversal(new VirtualLoggingListener() {
			public void recvOperation(VirtualLoggingRecord action) {
				Xid xid = action.getIdentifier();
				if (xidMap.containsKey(xid)) {
					this.execOperation(action);
				}
			}

			public void execOperation(VirtualLoggingRecord action) {
				Xid identifier = action.getIdentifier();

				TransactionXid xid = xidFactory.createGlobalXid(identifier.getGlobalTransactionId());

				Object obj = deserializer.deserialize(xid, action.getValue());
				if (TransactionArchive.class.isInstance(obj)) {
					TransactionArchive archive = (TransactionArchive) obj;
					xidMap.put(identifier, archive);
				} else if (XAResourceArchive.class.isInstance(obj)) {
					TransactionArchive archive = xidMap.get(identifier);
					if (archive == null) {
						logger.error("Error occurred while recovering resource archive: {}", obj);
						return;
					}

					XAResourceArchive resourceArchive = (XAResourceArchive) obj;
					boolean matched = false;

					List<XAResourceArchive> nativeResources = archive.getNativeResources();
					for (int i = 0; matched == false && nativeResources != null && i < nativeResources.size(); i++) {
						XAResourceArchive element = nativeResources.get(i);
						if (resourceArchive.getXid().equals(element.getXid())) {
							matched = true;
							nativeResources.set(i, resourceArchive);
						}
					}

					XAResourceArchive optimizedResource = archive.getOptimizedResource();
					if (matched == false && optimizedResource != null) {
						if (resourceArchive.getXid().equals(optimizedResource.getXid())) {
							matched = true;
							archive.setOptimizedResource(resourceArchive);
						}
					}

					List<XAResourceArchive> remoteResources = archive.getRemoteResources();
					for (int i = 0; matched == false && remoteResources != null && i < remoteResources.size(); i++) {
						XAResourceArchive element = remoteResources.get(i);
						if (resourceArchive.getXid().equals(element.getXid())) {
							matched = true;
							remoteResources.set(i, resourceArchive);
						}
					}

					if (matched == false) {
						logger.error("Error occurred while recovering resource archive: {}, invalid resoure!", obj);
					}

				}

			}
		});

		for (Iterator<Map.Entry<Xid, TransactionArchive>> itr = xidMap.entrySet().iterator(); itr.hasNext();) {
			Map.Entry<Xid, TransactionArchive> entry = itr.next();
			TransactionArchive archive = entry.getValue();
			if (archive == null) {
				continue;
			} else {
				try {
					callback.recover(archive);
				} catch (RuntimeException rex) {
					logger.error("Error occurred while recovering transaction(xid= {}).", archive.getXid(), rex);
				}
			}
		}

	}

	public File getDefaultDirectory() {
		String address = StringUtils.trimToEmpty(this.identifier);
		File directory = new File(String.format("bytejta/%s", address.replaceAll("\\W", "_")));
		if (directory.exists() == false) {
			try {
				boolean created = directory.mkdirs();
				if (created == false) {
					logger.error("Failed to create directory {}!", directory.getAbsolutePath());
				} // end-if (created == false)
			} catch (SecurityException ex) {
				logger.error("Error occurred while creating directory {}!", directory.getAbsolutePath(), ex);
			}
		}
		return directory;
	}

	public int getMajorVersion() {
		return 0;
	}

	public int getMinorVersion() {
		return 6;
	}

	public String getLoggingFilePrefix() {
		return "bytejta-";
	}

	public String getLoggingIdentifier() {
		return "org.bytesoft.bytejta.logging.sample";
	}

	public String getEndpoint() {
		return identifier;
	}

	public void setEndpoint(String identifier) {
		this.identifier = identifier;
		this.initializeIfNecessary();
	}

	public TransactionBeanFactory getBeanFactory() {
		return beanFactory;
	}

	public void setBeanFactory(TransactionBeanFactory beanFactory) {
		this.beanFactory = beanFactory;
	}

}


================================================
FILE: bytejta-core/src/main/java/org/bytesoft/bytejta/logging/deserializer/TransactionArchiveDeserializer.java
================================================
/**
 * Copyright 2014-2016 yangming.liu<bytefox@126.com>.
 *
 * This copyrighted material is made available to anyone wishing to use, modify,
 * copy, or redistribute it subject to the terms and conditions of the GNU
 * Lesser General Public License, as published by the Free Software Foundation.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
 * or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Lesser General Public License
 * for more details.
 *
 * You should have received a copy of the GNU Lesser General Public License
 * along with this distribution; if not, see <http://www.gnu.org/licenses/>.
 */
package org.bytesoft.bytejta.logging.deserializer;

import java.nio.ByteBuffer;
import java.util.List;

import org.apache.commons.lang3.StringUtils;
import org.bytesoft.common.utils.ByteUtils;
import org.bytesoft.common.utils.CommonUtils;
import org.bytesoft.transaction.archive.TransactionArchive;
import org.bytesoft.transaction.archive.XAResourceArchive;
import org.bytesoft.transaction.logging.ArchiveDeserializer;
import org.bytesoft.transaction.remote.RemoteNode;
import org.bytesoft.transaction.xa.TransactionXid;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

public class TransactionArchiveDeserializer implements ArchiveDeserializer {
	static final Logger logger = LoggerFactory.getLogger(TransactionArchiveDeserializer.class);

	private ArchiveDeserializer resourceArchiveDeserializer;

	public byte[] serialize(TransactionXid xid, Object obj) {
		TransactionArchive archive = (TransactionArchive) obj;

		String propagatedBy = String.valueOf(archive.getPropagatedBy());
		// String[] address = propagatedBy.split("\\s*\\:\\s*");
		RemoteNode remoteNode = CommonUtils.getRemoteNode(propagatedBy);
		byte[] hostByteArray = new byte[4];
		byte[] nameByteArray = new byte[0];
		byte[] portByteArray = new byte[2];
		if (remoteNode != null) {
			String hostStr = remoteNode.getServerHost();
			String nameStr = remoteNode.getServiceKey();
			String portStr = String.valueOf(remoteNode.getServerPort());

			String[] hostArray = hostStr.split("\\s*\\.\\s*");
			for (int i = 0; hostArray.length == 4 && i < hostArray.length; i++) {
				try {
					int value = Integer.valueOf(hostArray[i]);
					hostByteArray[i] = (byte) (value - 128);
				} catch (RuntimeException rex) {
					logger.debug(rex.getMessage(), rex);
				}
			}

			nameByteArray = StringUtils.isBlank(nameStr) ? new byte[0] : nameStr.getBytes();

			try {
				short port = (short) (Integer.valueOf(portStr) - 32768);
				byte[] byteArray = ByteUtils.shortToByteArray(port);
				System.arraycopy(byteArray, 0, portByteArray, 0, 2);
			} catch (RuntimeException rex) {
				logger.debug(rex.getMessage(), rex);
			}
		}

		long recoveredMillis = archive.getRecoveredAt();
		int recoveredTimes = archive.getRecoveredTimes();

		XAResourceArchive optimizedArchive = archive.getOptimizedResource();

		List<XAResourceArchive> nativeArchiveList = archive.getNativeResources();
		List<XAResourceArchive> remoteArchiveList = archive.getRemoteResources();

		int optimizedArchiveNumber = optimizedArchive == null ? 0 : 1;

		int nativeArchiveNumber = nativeArchiveList.size();
		int remoteArchiveNumber = remoteArchiveList.size();

		int transactionStrategy = archive.getTransactionStrategyType();

		int length = 3 + 3 + 1 + 4 + 1 + nameByteArray.length + 2 + 8 + 1;
		byte[][] nativeByteArray = new byte[nativeArchiveNumber][];
		for (int i = 0; i < nativeArchiveNumber; i++) {
			XAResourceArchive resourceArchive = nativeArchiveList.get(i);

			byte[] resourceByteArray = this.resourceArchiveDeserializer.serialize(xid, resourceArchive);
			byte[] lengthByteArray = ByteUtils.shortToByteArray((short) resourceByteArray.length);

			byte[] elementByteArray = new byte[resourceByteArray.length + 2];
			System.arraycopy(lengthByteArray, 0, elementByteArray, 0, lengthByteArray.length);
			System.arraycopy(resourceByteArray, 0, elementByteArray, 2, resourceByteArray.length);

			nativeByteArray[i] = elementByteArray;
			length = length + elementByteArray.length;
		}

		byte[] optimizedByteArray = new byte[0];
		if (optimizedArchiveNumber > 0) {
			byte[] resourceByteArray = this.resourceArchiveDeserializer.serialize(xid, optimizedArchive);
			byte[] lengthByteArray = ByteUtils.shortToByteArray((short) resourceByteArray.length);

			byte[] elementByteArray = new byte[resourceByteArray.length + 2];
			System.arraycopy(lengthByteArray, 0, elementByteArray, 0, lengthByteArray.length);
			System.arraycopy(resourceByteArray, 0, elementByteArray, 2, resourceByteArray.length);

			optimizedByteArray = elementByteArray;
			length = length + elementByteArray.length;
		}

		byte[][] remoteByteArray = new byte[remoteArchiveNumber][];
		for (int i = 0; i < remoteArchiveNumber; i++) {
			XAResourceArchive resourceArchive = remoteArchiveList.get(i);

			byte[] resourceByteArray = this.resourceArchiveDeserializer.serialize(xid, resourceArchive);
			byte[] lengthByteArray = ByteUtils.shortToByteArray((short) resourceByteArray.length);

			byte[] elementByteArray = new byte[resourceByteArray.length + 2];
			System.arraycopy(lengthByteArray, 0, elementByteArray, 0, lengthByteArray.length);
			System.arraycopy(resourceByteArray, 0, elementByteArray, 2, resourceByteArray.length);

			remoteByteArray[i] = elementByteArray;
			length = length + elementByteArray.length;
		}

		int position = 0;

		byte[] byteArray = new byte[length];
		byteArray[position++] = (byte) archive.getStatus();
		byteArray[position++] = (byte) archive.getVote();
		byteArray[position++] = archive.isCoordinator() ? (byte) 0x1 : (byte) 0x0;

		byteArray[position++] = (byte) nativeArchiveNumber;
		byteArray[position++] = (byte) optimizedArchiveNumber;
		byteArray[position++] = (byte) remoteArchiveNumber;

		byteArray[position++] = (byte) transactionStrategy;

		System.arraycopy(hostByteArray, 0, byteArray, position, 4);
		position = position + 4;

		byteArray[position++] = (byte) (nameByteArray.length - 128);
		System.arraycopy(nameByteArray, 0, byteArray, position, nameByteArray.length);
		position = position + nameByteArray.length;

		System.arraycopy(portByteArray, 0, byteArray, position, 2);
		position = position + 2;

		byteArray[position++] = (byte) (recoveredTimes - 128);
		byte[] millisByteArray = ByteUtils.longToByteArray(recoveredMillis);
		System.arraycopy(millisByteArray, 0, byteArray, position, millisByteArray.length);
		position = position + millisByteArray.length;

		for (int i = 0; i < nativeArchiveNumber; i++) {
			byte[] elementByteArray = nativeByteArray[i];
			System.arraycopy(elementByteArray, 0, byteArray, position, elementByteArray.length);
			position = position + elementByteArray.length;
		}

		if (optimizedArchiveNumber > 0) {
			System.arraycopy(optimizedByteArray, 0, byteArray, position, optimizedByteArray.length);
			position = position + optimizedByteArray.length;
		}

		for (int i = 0; i < remoteArchiveNumber; i++) {
			byte[] elementByteArray = remoteByteArray[i];
			System.arraycopy(elementByteArray, 0, byteArray, position, elementByteArray.length);
			position = position + elementByteArray.length;
		}

		return byteArray;
	}

	public Object deserialize(TransactionXid xid, byte[] array) {
		ByteBuffer buffer = ByteBuffer.wrap(array);

		TransactionArchive archive = new TransactionArchive();
		archive.setXid(xid);

		int status = buffer.get();
		int vote = buffer.get();
		int coordinatorValue = buffer.get();

		archive.setStatus(status);
		archive.setVote(vote);
		archive.setCoordinator(coordinatorValue != 0);

		int nativeArchiveNumber = buffer.get();
		int optimizedArchiveNumber = buffer.get();
		int remoteArchiveNumber = buffer.get();

		int transactionStrategyType = buffer.get();
		archive.setTransactionStrategyType(transactionStrategyType);

		byte[] hostByteArray = new byte[4];
		buffer.get(hostByteArray);
		StringBuilder ber = new StringBuilder();
		for (int i = 0; i < hostByteArray.length; i++) {
			int value = hostByteArray[i] + 128;
			if (i == 0) {
				ber.append(value);
			} else {
				ber.append(".");
				ber.append(value);
			}
		}
		String host = ber.toString();

		int sizeOfName = 128 + buffer.get();
		byte[] nameByteArray = new byte[sizeOfName];
		buffer.get(nameByteArray);
		String name = new String(nameByteArray);

		int port = 32768 + buffer.getShort();
		archive.setPropagatedBy(String.format("%s:%s:%s", host, name, port));

		int recoveredTimes = 128 + buffer.get();
		byte[] millisByteArray = new byte[8];
		buffer.get(millisByteArray);
		long recoveredAt = ByteUtils.byteArrayToLong(millisByteArray);

		archive.setRecoveredTimes(recoveredTimes);
		archive.setRecoveredAt(recoveredAt);

		for (int i = 0; i < nativeArchiveNumber; i++) {
			int length = buffer.getShort();
			byte[] resourceByteArray = new byte[length];
			buffer.get(resourceByteArray);

			XAResourceArchive resourceArchive = //
					(XAResourceArchive) this.resourceArchiveDeserializer.deserialize(xid, resourceByteArray);

			archive.getNativeResources().add(resourceArchive);
		}

		if (optimizedArchiveNumber > 0) {
			int length = buffer.getShort();
			byte[] resourceByteArray = new byte[length];
			buffer.get(resourceByteArray);

			XAResourceArchive resourceArchive = //
					(XAResourceArchive) this.resourceArchiveDeserializer.deserialize(xid, resourceByteArray);

			archive.setOptimizedResource(resourceArchive);
		}

		for (int i = 0; i < remoteArchiveNumber; i++) {
			int length = buffer.getShort();
			byte[] resourceByteArray = new byte[length];
			buffer.get(resourceByteArray);

			XAResourceArchive resourceArchive = //
					(XAResourceArchive) this.resourceArchiveDeserializer.deserialize(xid, resourceByteArray);

			archive.getRemoteResources().add(resourceArchive);
		}

		return archive;
	}

	public ArchiveDeserializer getResourceArchiveDeserializer() {
		return resourceArchiveDeserializer;
	}

	public void setResourceArchiveDeserializer(ArchiveDeserializer resourceArchiveDeserializer) {
		this.resourceArchiveDeserializer = resourceArchiveDeserializer;
	}

}


================================================
FILE: bytejta-core/src/main/java/org/bytesoft/bytejta/logging/deserializer/XAResourceArchiveDeserializer.java
================================================
/**
 * Copyright 2014-2016 yangming.liu<bytefox@126.com>.
 *
 * This copyrighted material is made available to anyone wishing to use, modify,
 * copy, or redistribute it subject to the terms and conditions of the GNU
 * Lesser General Public License, as published by the Free Software Foundation.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
 * or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Lesser General Public License
 * for more details.
 *
 * You should have received a copy of the GNU Lesser General Public License
 * along with this distribution; if not, see <http://www.gnu.org/licenses/>.
 */
package org.bytesoft.bytejta.logging.deserializer;

import java.nio.ByteBuffer;

import javax.transaction.xa.Xid;

import org.bytesoft.bytejta.supports.resource.CommonResourceDescriptor;
import org.bytesoft.bytejta.supports.resource.LocalXAResourceDescriptor;
import org.bytesoft.bytejta.supports.resource.RemoteResourceDescriptor;
import org.bytesoft.bytejta.supports.resource.UnidentifiedResourceDescriptor;
import org.bytesoft.transaction.TransactionBeanFactory;
import org.bytesoft.transaction.archive.XAResourceArchive;
import org.bytesoft.transaction.aware.TransactionBeanFactoryAware;
import org.bytesoft.transaction.logging.ArchiveDeserializer;
import org.bytesoft.transaction.supports.resource.XAResourceDescriptor;
import org.bytesoft.transaction.supports.serialize.XAResourceDeserializer;
import org.bytesoft.transaction.xa.TransactionXid;
import org.bytesoft.transaction.xa.XidFactory;

public class XAResourceArchiveDeserializer implements ArchiveDeserializer, TransactionBeanFactoryAware {

	@javax.inject.Inject
	private TransactionBeanFactory beanFactory;
	// private XAResourceDeserializer deserializer;

	public byte[] serialize(TransactionXid xid, Object obj) {
		XAResourceArchive archive = (XAResourceArchive) obj;

		Xid branchXid = archive.getXid();
		byte[] branchQualifier = branchXid.getBranchQualifier();

		XAResourceDescriptor descriptor = archive.getDescriptor();
		byte[] identifierByteArray = new byte[0];
		byte typeByte = 0x0;
		if (CommonResourceDescriptor.class.isInstance(descriptor)) {
			typeByte = (byte) 0x1;
			identifierByteArray = descriptor.getIdentifier().getBytes();
		} else if (RemoteResourceDescriptor.class.isInstance(descriptor)) {
			typeByte = (byte) 0x2;
			identifierByteArray = descriptor.getIdentifier().getBytes();
		} else if (LocalXAResourceDescriptor.class.isInstance(descriptor)) {
			typeByte = (byte) 0x3;
			identifierByteArray = descriptor.getIdentifier().getBytes();
		}

		byte branchVote = (byte) archive.getVote();
		byte readonly = archive.isReadonly() ? (byte) 1 : (byte) 0;
		byte committed = archive.isCommitted() ? (byte) 1 : (byte) 0;
		byte rolledback = archive.isRolledback() ? (byte) 1 : (byte) 0;
		byte completed = archive.isCompleted() ? (byte) 1 : (byte) 0;
		byte heuristic = archive.isHeuristic() ? (byte) 1 : (byte) 0;

		byte[] byteArray = new byte[XidFactory.BRANCH_QUALIFIER_LENGTH + 2 + identifierByteArray.length + 6];
		System.arraycopy(branchQualifier, 0, byteArray, 0, branchQualifier.length);

		byteArray[XidFactory.BRANCH_QUALIFIER_LENGTH] = typeByte;
		byteArray[XidFactory.BRANCH_QUALIFIER_LENGTH + 1] = (byte) identifierByteArray.length;
		if (identifierByteArray.length > 0) {
			System.arraycopy(identifierByteArray, 0, byteArray, XidFactory.BRANCH_QUALIFIER_LENGTH + 2,
					identifierByteArray.length);
		}

		byteArray[XidFactory.BRANCH_QUALIFIER_LENGTH + 2 + identifierByteArray.length] = branchVote;
		byteArray[XidFactory.BRANCH_QUALIFIER_LENGTH + 2 + identifierByteArray.length + 1] = readonly;
		byteArray[XidFactory.BRANCH_QUALIFIER_LENGTH + 2 + identifierByteArray.length + 2] = committed;
		byteArray[XidFactory.BRANCH_QUALIFIER_LENGTH + 2 + identifierByteArray.length + 3] = rolledback;
		byteArray[XidFactory.BRANCH_QUALIFIER_LENGTH + 2 + identifierByteArray.length + 4] = completed;
		byteArray[XidFactory.BRANCH_QUALIFIER_LENGTH + 2 + identifierByteArray.length + 5] = heuristic;

		return byteArray;
	}

	public Object deserialize(TransactionXid xid, byte[] array) {
		XAResourceDeserializer deserializer = this.beanFactory.getResourceDeserializer();

		ByteBuffer buffer = ByteBuffer.wrap(array);

		XAResourceArchive archive = new XAResourceArchive();

		byte[] branchQualifier = new byte[XidFactory.BRANCH_QUALIFIER_LENGTH];
		buffer.get(branchQualifier);
		XidFactory xidFactory = this.beanFactory.getXidFactory();
		TransactionXid branchXid = xidFactory.createBranchXid(xid, branchQualifier);
		archive.setXid(branchXid);

		byte resourceType = buffer.get();
		byte length = buffer.get();
		byte[] byteArray = new byte[length];
		buffer.get(byteArray);
		String identifier = new String(byteArray);

		XAResourceDescriptor descriptor = null;
		if (resourceType == 0x01) {
			archive.setIdentified(true);
			descriptor = deserializer.deserialize(identifier);
		} else if (resourceType == 0x02) {
			archive.setIdentified(true);
			descriptor = deserializer.deserialize(identifier);
		} else if (resourceType == 0x03) {
			archive.setIdentified(true);
			descriptor = deserializer.deserialize(identifier);
		} else {
			descriptor = new UnidentifiedResourceDescriptor();
		}

		if (CommonResourceDescriptor.class.isInstance(descriptor)) {
			((CommonResourceDescriptor) descriptor).setRecoverXid(branchXid);
		}

		archive.setDescriptor(descriptor);

		int branchVote = buffer.get();
		int readonly = buffer.get();
		int committedValue = buffer.get();
		int rolledbackValue = buffer.get();
		int completedValue = buffer.get();
		int heuristicValue = buffer.get();
		archive.setVote(branchVote);
		archive.setReadonly(readonly != 0);
		archive.setCommitted(committedValue != 0);
		archive.setRolledback(rolledbackValue != 0);
		archive.setCompleted(completedValue != 0);
		archive.setHeuristic(heuristicValue != 0);

		return archive;
	}

	public TransactionBeanFactory getBeanFactory() {
		return this.beanFactory;
	}

	public void setBeanFactory(TransactionBeanFactory tbf) {
		this.beanFactory = tbf;
	}

}


================================================
FILE: bytejta-core/src/main/java/org/bytesoft/bytejta/logging/store/VirtualLoggingFile.java
================================================
/**
 * Copyright 2014-2016 yangming.liu<bytefox@126.com>.
 *
 * This copyrighted material is made available to anyone wishing to use, modify,
 * copy, or redistribute it subject to the terms and conditions of the GNU
 * Lesser General Public License, as published by the Free Software Foundation.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
 * or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Lesser General Public License
 * for more details.
 *
 * You should have received a copy of the GNU Lesser General Public License
 * along with this distribution; if not, see <http://www.gnu.org/licenses/>.
 */
package org.bytesoft.bytejta.logging.store;

import java.io.File;
import java.io.IOException;
import java.io.RandomAccessFile;
import java.nio.MappedByteBuffer;
import java.nio.channels.FileChannel.MapMode;
import java.util.Arrays;

import org.bytesoft.transaction.logging.store.VirtualLoggingTrigger;
import org.bytesoft.transaction.xa.XidFactory;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

public class VirtualLoggingFile {
	static final Logger logger = LoggerFactory.getLogger(VirtualLoggingFile.class);

	static final long DEFAULT_SIZE = 1024 * 1024;
	static final long INCREASE_SIZE = 1024 * 512;

	static final int DEFAULT_MAJOR_VERSION = 0;
	static final int DEFAULT_MINOR_VERSION = 2;

	private MappedByteBuffer readable;
	private MappedByteBuffer writable;

	private RandomAccessFile raf;

	private byte[] identifier;

	private boolean initialized;

	private int startIdx;
	private int endIndex;

	private boolean marked;
	private boolean master;

	private int majorVersion = DEFAULT_MAJOR_VERSION;
	private int minorVersion = DEFAULT_MINOR_VERSION;

	private VirtualLoggingTrigger trigger;

	public VirtualLoggingFile(File file) throws IOException {
		this(file, DEFAULT_MAJOR_VERSION, DEFAULT_MINOR_VERSION);
	}

	public VirtualLoggingFile(File file, int major, int minor) throws IOException {
		this.majorVersion = major;
		this.minorVersion = minor;

		this.initialized = file.exists();
		this.raf = new RandomAccessFile(file, "rw");
		if (this.initialized == false) {
			this.configMappedByteBuffer(DEFAULT_SIZE);
		} else {
			this.configMappedByteBuffer(this.raf.length());
		}
	}

	public void clearMarkedFlag() {
		int pos = this.writable.position();

		this.writable.position(identifier.length + 2 + 8 + 4);
		this.writable.put((byte) 0x0);

		this.marked = false;

		this.writable.position(pos);
	}

	public void fixSwitchError() {
		int pos = this.writable.position();

		this.writable.position(identifier.length + 2 + 8 + 4 + 1);
		this.writable.put((byte) 0x1);
		this.writable.position(identifier.length + 2 + 8 + 4);
		this.writable.put((byte) 0x0);

		this.marked = false;
		this.master = true;

		this.writable.position(pos);
	}

	public void initialize(boolean master) {
		this.checkLoggingIdentifier();
		this.checkLoggingVersion();
		this.checkCreatedTime();
		this.checkStartIndex();
		this.checkMasterFlag(master);
		this.checkModifiedTime();
		this.checkEndIndex();

		this.initialized = true;
	}

	private void checkLoggingIdentifier() {
		byte[] array = new byte[identifier.length];
		this.writable.position(0);
		this.writable.get(array);
		if (Arrays.equals(identifier, array)) {
			// ignore
		} else if (this.initialized == false) {
			writable.position(0);
			writable.put(identifier);
		} else {
			throw new IllegalStateException("Illegal file format!");
		}
	}

	private void checkLoggingVersion() {
		this.writable.position(identifier.length);
		int major = this.writable.get();
		int minor = this.writable.get();
		if (major == this.majorVersion && minor == this.minorVersion) {
			// ignore
		} else if (this.initialized == false) {
			writable.position(identifier.length);
			writable.put((byte) this.majorVersion);
			writable.put((byte) this.minorVersion);
		} else {
			throw new IllegalStateException("Incompatible version!");
		}
	}

	private void checkCreatedTime() {
		if (this.initialized == false) {
			writable.position(identifier.length + 2);
			writable.putLong(System.currentTimeMillis());
		}
	}

	private void checkStartIndex() {
		this.writable.position(identifier.length + 2 + 8);
		int start = this.writable.getInt();
		if (start == identifier.length + 2 + 8 + 4 + 2 + 8 + 4) {
			this.startIdx = start;
		} else if (this.initialized == false) {
			this.startIdx = identifier.length + 2 + 8 + 4 + 2 + 8 + 4;
			writable.position(identifier.length + 2 + 8);
			writable.putInt(identifier.length + 2 + 8 + 4 + 2 + 8 + 4);
		} else {
			throw new IllegalStateException();
		}
	}

	private void checkMasterFlag(boolean master) {
		if (this.initialized == false) {
			this.master = master;
			this.marked = false;
			writable.position(identifier.length + 2 + 8 + 4);
			writable.put((byte) 0x0);
			writable.put(master ? (byte) 0x1 : (byte) 0x0);
		} else {
			this.writable.position(identifier.length + 2 + 8 + 4);
			this.marked = this.writable.get() == 0x1;
			this.master = this.writable.get() == 0x1;
		}
	}

	private void checkModifiedTime() {
		if (this.initialized == false) {
			writable.position(identifier.length + 2 + 8 + 4 + 2);
			writable.putLong(System.currentTimeMillis());
		}
	}

	private void checkEndIndex() {
		if (this.initialized == false) {
			this.endIndex = identifier.length + 2 + 8 + 4 + 2 + 8 + 4;
			writable.position(identifier.length + 2 + 8 + 4 + 2 + 8);
			writable.putInt(identifier.length + 2 + 8 + 4 + 2 + 8 + 4);
		} else {
			this.writable.position(identifier.length + 2 + 8 + 4 + 2 + 8);
			this.endIndex = this.writable.getInt();
		}
	}

	public void markAsMaster() {
		this.writable.position(identifier.length + 2 + 8 + 4);
		this.writable.put((byte) 0x1);
	}

	public void switchToMaster() {
		this.writable.position(identifier.length + 2 + 8 + 4 + 1);
		this.writable.put((byte) 0x1);
		this.writable.position(identifier.length + 2 + 8 + 4);
		this.writable.put((byte) 0x0);

		this.master = true;
		this.marked = false;

		this.readable.position(this.startIdx);
	}

	public void switchToSlaver() {
		this.writable.position(identifier.length + 2 + 8 + 4);
		this.writable.put((byte) 0x0);
		this.writable.put((byte) 0x0);

		this.master = false;
		this.marked = false;

		writable.position(identifier.length + 2 + 8 + 4 + 2);
		this.writable.putLong(System.currentTimeMillis());
		this.endIndex = this.startIdx;
		this.writable.putInt(this.endIndex);
	}

	public void prepareForReading() {
		this.readable.position(this.startIdx);
	}

	public byte[] read() {
		if (this.readable.position() < this.endIndex) {
			int pos = this.readable.position();
			this.readable.position(pos + XidFactory.GLOBAL_TRANSACTION_LENGTH + 1);
			int size = this.readable.getInt();
			byte[] byteArray = new byte[XidFactory.GLOBAL_TRANSACTION_LENGTH + 1 + 4 + size];
			this.readable.position(pos);
			this.readable.get(byteArray);
			return byteArray;
		} else {
			return new byte[0];
		}
	}

	public void write(byte[] byteArray) {
		if (this.writable.capacity() < this.endIndex + byteArray.length) {
			this.resizeMappedByteBuffer(this.endIndex + INCREASE_SIZE);
		}
		this.writable.position(this.endIndex);
		this.writable.put(byteArray);

		writable.position(identifier.length + 2 + 8 + 4 + 2);
		this.writable.putLong(System.currentTimeMillis());
		this.endIndex = this.endIndex + byteArray.length;
		this.writable.putInt(this.endIndex);

		int threshold = (this.writable.capacity() * 2) / 3;
		if (this.endIndex > threshold) {
			this.trigger.fireSwapImmediately();
		}

	}

	private void resizeMappedByteBuffer(long size) {
		try {
			this.raf.setLength(this.endIndex + INCREASE_SIZE);
			this.readable = this.raf.getChannel().map(MapMode.READ_ONLY, 0, size);
			this.writable = this.raf.getChannel().map(MapMode.READ_WRITE, 0, size);
		} catch (IOException ex) {
			logger.error("Error occurred while resizing the logging file!", ex);
		}
	}

	private void configMappedByteBuffer(long size) throws IOException {
		this.readable = this.raf.getChannel().map(MapMode.READ_ONLY, 0, size);
		this.writable = this.raf.getChannel().map(MapMode.READ_WRITE, 0, size);
	}

	public void flushImmediately() {
		if (this.writable != null) {
			this.writable.force();
		}
	}

	public void closeQuietly() {
		if (this.raf != null) {
			try {
				this.raf.close();
			} catch (Exception ex) {
				logger.debug(ex.getMessage(), ex);
			}
		}
	}

	public byte[] getIdentifier() {
		return identifier;
	}

	public void setIdentifier(byte[] identifier) {
		this.identifier = identifier;
	}

	public VirtualLoggingTrigger getTrigger() {
		return trigger;
	}

	public void setTrigger(VirtualLoggingTrigger trigger) {
		this.trigger = trigger;
	}

	public boolean isMarked() {
		return marked;
	}

	public void setMarked(boolean marked) {
		this.marked = marked;
	}

	public boolean isMaster() {
		return master;
	}

	public void setMaster(boolean master) {
		this.master = master;
	}

	public int getStartIdx() {
		return startIdx;
	}

	public int getEndIndex() {
		return endIndex;
	}

	public int getMajorVersion() {
		return majorVersion;
	}

	public int getMinorVersion() {
		return minorVersion;
	}

}


================================================
FILE: bytejta-core/src/main/java/org/bytesoft/bytejta/logging/store/VirtualLoggingSystemImpl.java
================================================
/**
 * Copyright 2014-2016 yangming.liu<bytefox@126.com>.
 *
 * This copyrighted material is made available to anyone wishing to use, modify,
 * copy, or redistribute it subject to the terms and conditions of the GNU
 * Lesser General Public License, as published by the Free Software Foundation.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
 * or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Lesser General Public License
 * for more details.
 *
 * You should have received a copy of the GNU Lesser General Public License
 * along with this distribution; if not, see <http://www.gnu.org/licenses/>.
 */
package org.bytesoft.bytejta.logging.store;

import java.io.File;
import java.io.IOException;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.locks.Condition;
import java.util.concurrent.locks.Lock;
import java.util.concurrent.locks.ReentrantLock;

import javax.resource.spi.work.Work;
import javax.transaction.xa.Xid;

import org.bytesoft.common.utils.ByteUtils;
import org.bytesoft.transaction.logging.store.VirtualLoggingKey;
import org.bytesoft.transaction.logging.store.VirtualLoggingListener;
import org.bytesoft.transaction.logging.store.VirtualLoggingRecord;
import org.bytesoft.transaction.logging.store.VirtualLoggingSystem;
import org.bytesoft.transaction.logging.store.VirtualLoggingTrigger;
import org.bytesoft.transaction.xa.XidFactory;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

public abstract class VirtualLoggingSystemImpl implements VirtualLoggingSystem, VirtualLoggingTrigger, Work {
	static final Logger logger = LoggerFactory.getLogger(VirtualLoggingSystemImpl.class);
	static final int COMPRESS_BATCH_SIZE = 10000;

	private final Lock lock = new ReentrantLock();
	private final Lock timingLock = new ReentrantLock();
	private final Condition timingCondition = this.timingLock.newCondition();

	private boolean released;

	private File directory;

	private VirtualLoggingFile master;
	private VirtualLoggingFile slaver;

	private boolean optimized = true;
	private boolean initialized;

	private int switchThreshold = 1024 * 1024 * 8;
	private int switchInterval = 60;

	public synchronized void construct() throws IOException {
		if (this.initialized == false) {
			this.initialize();
			this.initialized = true;
		}
	}

	private void initialize() throws IOException {
		if (this.directory == null) {
			this.directory = this.getDefaultDirectory();
		}

		if (this.directory.exists() == false) {
			if (this.directory.mkdirs() == false) {
				throw new RuntimeException(String.format("Failed to create directory %s!", this.directory.getAbsolutePath()));
			}
		}

		File fmaster = new File(this.directory, String.format("%s1.log", this.getLoggingFilePrefix()));
		File fslaver = new File(this.directory, String.format("%s2.log", this.getLoggingFilePrefix()));

		VirtualLoggingFile masterMgr = this.createTransactionLogging(fmaster);
		VirtualLoggingFile slaverMgr = this.createTransactionLogging(fslaver);

		masterMgr.initialize(true);
		slaverMgr.initialize(false);

		this.initialize(masterMgr, slaverMgr);

		this.flushAllIfNecessary();
	}

	private void initialize(VirtualLoggingFile prev, VirtualLoggingFile next) {
		boolean prevMaster = prev.isMaster();
		boolean nextMaster = next.isMaster();

		if (prevMaster && nextMaster) {
			throw new IllegalStateException();
		} else if (prevMaster == false && nextMaster == false) {
			this.fixSwitchError(prev, next);
		} else if (prevMaster) {
			this.master = prev;
			this.slaver = next;

			this.master.clearMarkedFlag();
			this.slaver.clearMarkedFlag();
		} else {
			this.master = next;
			this.slaver = prev;

			this.master.clearMarkedFlag();
			this.slaver.clearMarkedFlag();
		}

	}

	private void fixSwitchError(VirtualLoggingFile prev, VirtualLoggingFile next) {
		boolean prevMarked = prev.isMarked();
		boolean nextMarked = next.isMarked();
		if (prevMarked && nextMarked) {
			throw new IllegalStateException();
		} else if (prevMarked == false && nextMarked == false) {
			throw new IllegalStateException();
		} else if (prevMarked) {
			prev.fixSwitchError();

			this.master = prev;
			this.slaver = next;
		} else {
			next.fixSwitchError();

			this.master = next;
			this.slaver = prev;
		}
	}

	public void run() {
		int lastEndIndex = this.master.getEndIndex();
		while (this.released == false) {
			try {
				this.timingLock.lock();
				this.timingCondition.await(this.switchInterval, TimeUnit.SECONDS);
			} catch (Exception ex) {
				logger.debug(ex.getMessage(), ex);
			} finally {
				this.timingLock.unlock();
			}

			int increment = this.master.getEndIndex() - lastEndIndex;
			if (increment < this.switchThreshold) {
				continue;
			} // end-if (increasement < this.switchThreshold)

			this.syncMasterAndSlaver();
			this.swapMasterAndSlaver();

			lastEndIndex = this.master.getEndIndex();
		}
	}

	public void fireSwapImmediately() {
		try {
			this.timingLock.lock();
			this.timingCondition.signalAll();
		} finally {
			this.timingLock.unlock();
		}
	}

	public void traversal(VirtualLoggingListener listener) {
		this.master.prepareForReading();
		while (true) {
			byte[] byteArray = null;
			try {
				byteArray = this.master.read();
			} catch (RuntimeException rex) {
				byteArray = new byte[0];
			}

			if (byteArray.length == 0) {
				break;
			}

			byte[] keyByteArray = new byte[XidFactory.GLOBAL_TRANSACTION_LENGTH];
			System.arraycopy(byteArray, 0, keyByteArray, 0, keyByteArray.length);
			int operator = byteArray[keyByteArray.length];
			byte[] valueByteArray = new byte[byteArray.length - XidFactory.GLOBAL_TRANSACTION_LENGTH - 1 - 4];
			System.arraycopy(byteArray, XidFactory.GLOBAL_TRANSACTION_LENGTH + 1 + 4, valueByteArray, 0, valueByteArray.length);

			VirtualLoggingKey xid = new VirtualLoggingKey();
			xid.setGlobalTransactionId(keyByteArray);

			VirtualLoggingRecord record = new VirtualLoggingRecord();
			record.setIdentifier(xid);
			record.setOperator(operator);
			record.setContent(byteArray);
			record.setValue(valueByteArray);

			listener.recvOperation(record);
		}

	}

	public void create(Xid xid, byte[] textByteArray) {
		byte[] keyByteArray = xid.getGlobalTransactionId();
		byte[] sizeByteArray = ByteUtils.intToByteArray(textByteArray.length);

		byte[] byteArray = new byte[keyByteArray.length + 1 + sizeByteArray.length + textByteArray.length];

		System.arraycopy(keyByteArray, 0, byteArray, 0, keyByteArray.length);
		byteArray[keyByteArray.length] = (byte) (OPERATOR_CREATE & 0xFF);
		System.arraycopy(sizeByteArray, 0, byteArray, keyByteArray.length + 1, sizeByteArray.length);
		System.arraycopy(textByteArray, 0, byteArray, keyByteArray.length + 1 + sizeByteArray.length, textByteArray.length);

		try {
			this.lock.lock();
			this.master.write(byteArray);

			this.flushMasterIfNecessary();
		} finally {
			this.lock.unlock();
		}
	}

	public void delete(Xid xid) {
		byte[] keyByteArray = xid.getGlobalTransactionId();
		byte[] sizeByteArray = ByteUtils.intToByteArray(0);

		byte[] byteArray = new byte[keyByteArray.length + 1 + sizeByteArray.length];

		System.arraycopy(keyByteArray, 0, byteArray, 0, keyByteArray.length);
		byteArray[keyByteArray.length] = (byte) (OPERATOR_DELETE & 0xFF);
		System.arraycopy(sizeByteArray, 0, byteArray, keyByteArray.length + 1, sizeByteArray.length);

		try {
			this.lock.lock();
			this.master.write(byteArray);

			this.flushMasterIfNecessary();
		} finally {
			this.lock.unlock();
		}
	}

	public void modify(Xid xid, byte[] textByteArray) {
		byte[] keyByteArray = xid.getGlobalTransactionId();
		byte[] sizeByteArray = ByteUtils.intToByteArray(textByteArray.length);

		byte[] byteArray = new byte[keyByteArray.length + 1 + sizeByteArray.length + textByteArray.length];

		System.arraycopy(keyByteArray, 0, byteArray, 0, keyByteArray.length);
		byteArray[keyByteArray.length] = (byte) (OPERATOR_MOFIFY & 0xFF);
		System.arraycopy(sizeByteArray, 0, byteArray, keyByteArray.length + 1, sizeByteArray.length);
		System.arraycopy(textByteArray, 0, byteArray, keyByteArray.length + 1 + sizeByteArray.length, textByteArray.length);

		try {
			this.lock.lock();
			this.master.write(byteArray);

			this.flushMasterIfNecessary();
		} finally {
			this.lock.unlock();
		}
	}

	public void syncMasterAndSlaver() {
		this.master.prepareForReading();
		Map<Xid, Boolean> recordMap = this.syncStepOne();
		this.master.prepareForReading();
		this.syncStepTwo(recordMap, true);

		this.flushSlaverIfNecessary();
	}

	public Map<Xid, Boolean> syncStepOne() {
		Map<Xid, Boolean> recordMap = new HashMap<Xid, Boolean>();
		while (true) {
			byte[] byteArray = null;
			try {
				byteArray = this.master.read();
			} catch (RuntimeException rex) {
				byteArray = new byte[0];
			}

			if (byteArray.length == 0) {
				break;
			}

			byte[] keyByteArray = new byte[XidFactory.GLOBAL_TRANSACTION_LENGTH];
			System.arraycopy(byteArray, 0, keyByteArray, 0, keyByteArray.length);
			int operator = byteArray[keyByteArray.length];

			VirtualLoggingKey xid = new VirtualLoggingKey();
			xid.setGlobalTransactionId(keyByteArray);

			VirtualLoggingRecord record = new VirtualLoggingRecord();
			record.setIdentifier(xid);
			record.setOperator(operator);
			record.setContent(byteArray);

			if (operator == OPERATOR_DELETE) {
				recordMap.put(xid, true);
			}

		}

		return recordMap;

	}

	public List<VirtualLoggingRecord> compressIfNecessary(List<VirtualLoggingRecord> recordList) {
		return recordList;
	}

	public void syncStepTwo(Map<Xid, Boolean> recordMap, boolean compressRequired) {
		final List<VirtualLoggingRecord> recordList = new ArrayList<VirtualLoggingRecord>(COMPRESS_BATCH_SIZE);
		while (true) {
			byte[] byteArray = null;
			try {
				byteArray = this.master.read();
			} catch (RuntimeException rex) {
				byteArray = new byte[0];
			}

			if (byteArray.length == 0) {
				break;
			}

			byte[] keyByteArray = new byte[XidFactory.GLOBAL_TRANSACTION_LENGTH];
			System.arraycopy(byteArray, 0, keyByteArray, 0, keyByteArray.length);
			int operator = byteArray[keyByteArray.length];
			byte[] valueByteArray = new byte[byteArray.length - XidFactory.GLOBAL_TRANSACTION_LENGTH - 1 - 4];
			System.arraycopy(byteArray, XidFactory.GLOBAL_TRANSACTION_LENGTH + 1 + 4, valueByteArray, 0, valueByteArray.length);

			VirtualLoggingKey xid = new VirtualLoggingKey();
			xid.setGlobalTransactionId(keyByteArray);

			if (recordMap.containsKey(xid)) /* deleted */ {
				continue;
			}

			VirtualLoggingRecord record = new VirtualLoggingRecord();
			record.setIdentifier(xid);
			record.setOperator(operator);
			record.setContent(byteArray);
			record.setValue(valueByteArray);

			recordList.add(record);

			if (compressRequired == false) {
				continue;
			} else if (recordList.size() % COMPRESS_BATCH_SIZE != 0) {
				continue;
			}

			List<VirtualLoggingRecord> compressedList = this.compressIfNecessary(recordList);
			if (compressedList != recordList && compressedList != null) {
				recordList.clear();
				recordList.addAll(compressedList);
			} // end-if (compressedList != recordList && compressedList != null)

		}

		for (int i = 0; recordList != null && i < recordList.size(); i++) {
			VirtualLoggingRecord record = recordList.get(i);
			Xid xid = record.getIdentifier();
			if (recordMap.containsKey(xid) == false) {
				byte[] byteArray = record.getContent();
				this.slaver.write(byteArray);
			}
		}

	}

	public void swapMasterAndSlaver() {
		try {
			this.lock.lock();
			this.syncStepTwo(new HashMap<Xid, Boolean>(), false);

			this.slaver.markAsMaster();
			this.master.switchToSlaver();
			this.slaver.switchToMaster();

			this.flushAllIfNecessary();

			VirtualLoggingFile theNextMaster = this.slaver;
			this.slaver = this.master;
			this.master = theNextMaster;

		} finally {
			this.lock.unlock();
		}
	}

	private void flushAllIfNecessary() {
		this.flushMasterIfNecessary();
		this.flushSlaverIfNecessary();
	}

	private void flushMasterIfNecessary() {
		if (this.optimized == false) {
			this.master.flushImmediately();
		}
	}

	private void flushSlaverIfNecessary() {
		if (this.optimized == false) {
			this.slaver.flushImmediately();
		}
	}

	public void flushImmediately() {
		this.master.flushImmediately();
	}

	public void shutdown() {
		this.master.flushImmediately();
		this.slaver.flushImmediately();

		this.master.closeQuietly();
		this.slaver.closeQuietly();
	}

	public void release() {
		this.released = true;
	}

	public abstract File getDefaultDirectory();

	public abstract int getMajorVersion();

	public abstract int getMinorVersion();

	public abstract String getLoggingIdentifier();

	public abstract String getLoggingFilePrefix();

	public VirtualLoggingFile createTransactionLogging(File file) throws IOException {
		int major = this.getMajorVersion();
		int minor = this.getMinorVersion();

		VirtualLoggingFile logging = new VirtualLoggingFile(file, major, minor);
		logging.setTrigger(this);
		logging.setIdentifier(this.getLoggingIdentifier().getBytes());
		return logging;
	}

	public int getSwitchThreshold() {
		return switchThreshold;
	}

	public void setSwitchThreshold(int switchThreshold) {
		this.switchThreshold = switchThreshold;
	}

	public int getSwitchInterval() {
		return switchInterval;
	}

	public void setSwitchInterval(int switchInterval) {
		this.switchInterval = switchInterval;
	}

	public boolean isOptimized() {
		return optimized;
	}

	public void setOptimized(boolean optimized) {
		this.optimized = optimized;
	}

	public File getDirectory() {
		return directory;
	}

	public void setDirectory(File directory) {
		this.directory = directory;
	}

}


================================================
FILE: bytejta-core/src/main/java/org/bytesoft/bytejta/resource/XATerminatorImpl.java
================================================
/**
 * Copyright 2014-2016 yangming.liu<bytefox@126.com>.
 *
 * This copyrighted material is made available to anyone wishing to use, modify,
 * copy, or redistribute it subject to the terms and conditions of the GNU
 * Lesser General Public License, as published by the Free Software Foundation.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
 * or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Lesser General Public License
 * for more details.
 *
 * You should have received a copy of the GNU Lesser General Public License
 * along with this distribution; if not, see <http://www.gnu.org/licenses/>.
 */
package org.bytesoft.bytejta.resource;

import java.util.ArrayList;
import java.util.List;

import javax.transaction.xa.XAException;
import javax.transaction.xa.XAResource;
import javax.transaction.xa.Xid;

import org.bytesoft.common.utils.ByteUtils;
import org.bytesoft.transaction.TransactionBeanFactory;
import org.bytesoft.transaction.archive.XAResourceArchive;
import org.bytesoft.transaction.logging.TransactionLogger;
import org.bytesoft.transaction.resource.XATerminator;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

public class XATerminatorImpl implements XATerminator {
	static final Logger logger = LoggerFactory.getLogger(XATerminatorImpl.class);

	private TransactionBeanFactory beanFactory;
	private final List<XAResourceArchive> resources = new ArrayList<XAResourceArchive>();

	public synchronized int prepare(Xid xid) throws XAException {
		TransactionLogger transactionLogger = this.beanFactory.getTransactionLogger();

		int globalVote = XAResource.XA_RDONLY;
		for (int i = 0; i < this.resources.size(); i++) {
			XAResourceArchive archive = this.resources.get(i);

			boolean prepared = archive.getVote() != XAResourceArchive.DEFAULT_VOTE;
			if (prepared) {
				globalVote = archive.getVote() == XAResource.XA_RDONLY ? globalVote : XAResource.XA_OK;
			} else {
				int branchVote = archive.prepare(archive.getXid());
				archive.setVote(branchVote);

				if (branchVote == XAResource.XA_RDONLY) {
					archive.setReadonly(true);
					archive.setCompleted(true);
				} else {
					globalVote = XAResource.XA_OK;
				}

				transactionLogger.updateParticipant(archive);
			}

			logger.info("{}> prepare: xares= {}, branch= {}, vote= {}",
					ByteUtils.byteArrayToString(archive.getXid().getGlobalTransactionId()), archive,
					ByteUtils.byteArrayToString(archive.getXid().getBranchQualifier()), archive.getVote());
		}

		return globalVote;
	}

	/** error: XA_HEURHAZ, XA_HEURMIX, XA_HEURCOM, XA_HEURRB, XA_RDONLY, XAER_RMERR */
	public synchronized void commit(Xid xid, boolean onePhase) throws XAException {
		if (onePhase) {
			this.fireOnePhaseCommit(xid);
		} else {
			this.fireTwoPhaseCommit(xid);
		}
	}

	private void fireOnePhaseCommit(Xid xid) throws XAException {

		if (this.reso
Download .txt
gitextract_1m8l_8vc/

├── .github/
│   └── FUNDING.yml
├── .gitignore
├── LICENSE
├── README-zh.md
├── README.md
├── bytejta-core/
│   ├── pom.xml
│   └── src/
│       └── main/
│           └── java/
│               └── org/
│                   └── bytesoft/
│                       ├── bytejta/
│                       │   ├── TransactionBeanFactoryImpl.java
│                       │   ├── TransactionCoordinator.java
│                       │   ├── TransactionImpl.java
│                       │   ├── TransactionManagerImpl.java
│                       │   ├── TransactionRecoveryImpl.java
│                       │   ├── TransactionRepositoryImpl.java
│                       │   ├── TransactionStrategy.java
│                       │   ├── UserTransactionImpl.java
│                       │   ├── VacantTransactionLock.java
│                       │   ├── logging/
│                       │   │   ├── ArchiveDeserializerImpl.java
│                       │   │   ├── SampleTransactionLogger.java
│                       │   │   ├── deserializer/
│                       │   │   │   ├── TransactionArchiveDeserializer.java
│                       │   │   │   └── XAResourceArchiveDeserializer.java
│                       │   │   └── store/
│                       │   │       ├── VirtualLoggingFile.java
│                       │   │       └── VirtualLoggingSystemImpl.java
│                       │   ├── resource/
│                       │   │   ├── XATerminatorImpl.java
│                       │   │   └── XATerminatorOptd.java
│                       │   ├── strategy/
│                       │   │   ├── CommonTransactionStrategy.java
│                       │   │   ├── LastResourceOptimizeStrategy.java
│                       │   │   ├── SimpleTransactionStrategy.java
│                       │   │   └── VacantTransactionStrategy.java
│                       │   ├── supports/
│                       │   │   ├── jdbc/
│                       │   │   │   ├── DataSourceHolder.java
│                       │   │   │   ├── LocalXACompatible.java
│                       │   │   │   ├── LocalXAConnection.java
│                       │   │   │   ├── LocalXAResource.java
│                       │   │   │   ├── LogicalConnection.java
│                       │   │   │   └── RecoveredResource.java
│                       │   │   └── resource/
│                       │   │       ├── CommonResourceDescriptor.java
│                       │   │       ├── LocalXAResourceDescriptor.java
│                       │   │       ├── RemoteResourceDescriptor.java
│                       │   │       └── UnidentifiedResourceDescriptor.java
│                       │   ├── work/
│                       │   │   └── TransactionWork.java
│                       │   └── xa/
│                       │       └── XidFactoryImpl.java
│                       ├── common/
│                       │   └── utils/
│                       │       ├── ByteUtils.java
│                       │       ├── CommonUtils.java
│                       │       └── SerializeUtils.java
│                       └── transaction/
│                           ├── CommitRequiredException.java
│                           ├── RemoteSystemException.java
│                           ├── RollbackRequiredException.java
│                           ├── Transaction.java
│                           ├── TransactionBeanFactory.java
│                           ├── TransactionContext.java
│                           ├── TransactionException.java
│                           ├── TransactionLock.java
│                           ├── TransactionManager.java
│                           ├── TransactionParticipant.java
│                           ├── TransactionRecovery.java
│                           ├── TransactionRepository.java
│                           ├── adapter/
│                           │   └── ResourceAdapterImpl.java
│                           ├── archive/
│                           │   ├── TransactionArchive.java
│                           │   └── XAResourceArchive.java
│                           ├── aware/
│                           │   ├── TransactionBeanFactoryAware.java
│                           │   ├── TransactionDebuggable.java
│                           │   └── TransactionEndpointAware.java
│                           ├── cmd/
│                           │   └── CommandDispatcher.java
│                           ├── internal/
│                           │   ├── SynchronizationImpl.java
│                           │   ├── SynchronizationList.java
│                           │   ├── TransactionListenerList.java
│                           │   └── TransactionResourceListenerList.java
│                           ├── logging/
│                           │   ├── ArchiveDeserializer.java
│                           │   ├── LoggingFlushable.java
│                           │   ├── TransactionLogger.java
│                           │   └── store/
│                           │       ├── VirtualLoggingKey.java
│                           │       ├── VirtualLoggingListener.java
│                           │       ├── VirtualLoggingRecord.java
│                           │       ├── VirtualLoggingSystem.java
│                           │       └── VirtualLoggingTrigger.java
│                           ├── recovery/
│                           │   ├── TransactionRecoveryCallback.java
│                           │   └── TransactionRecoveryListener.java
│                           ├── remote/
│                           │   ├── RemoteAddr.java
│                           │   ├── RemoteCoordinator.java
│                           │   ├── RemoteNode.java
│                           │   └── RemoteSvc.java
│                           ├── resource/
│                           │   └── XATerminator.java
│                           ├── supports/
│                           │   ├── TransactionExtra.java
│                           │   ├── TransactionListener.java
│                           │   ├── TransactionListenerAdapter.java
│                           │   ├── TransactionResourceListener.java
│                           │   ├── TransactionResourceListenerAdapter.java
│                           │   ├── TransactionStatistic.java
│                           │   ├── TransactionTimer.java
│                           │   ├── resource/
│                           │   │   └── XAResourceDescriptor.java
│                           │   ├── rpc/
│                           │   │   ├── TransactionInterceptor.java
│                           │   │   ├── TransactionRequest.java
│                           │   │   └── TransactionResponse.java
│                           │   └── serialize/
│                           │       └── XAResourceDeserializer.java
│                           ├── work/
│                           │   ├── SimpleWork.java
│                           │   ├── SimpleWorkListener.java
│                           │   └── SimpleWorkManager.java
│                           └── xa/
│                               ├── TransactionXid.java
│                               └── XidFactory.java
├── bytejta-supports/
│   ├── pom.xml
│   └── src/
│       └── main/
│           ├── java/
│           │   └── org/
│           │       └── bytesoft/
│           │           └── bytejta/
│           │               └── supports/
│           │                   ├── boot/
│           │                   │   └── jdbc/
│           │                   │       ├── DataSourceCciBuilder.java
│           │                   │       └── DataSourceSpiBuilder.java
│           │                   ├── internal/
│           │                   │   ├── RemoteCoordinatorRegistry.java
│           │                   │   └── TransactionCommandDispatcher.java
│           │                   ├── jdbc/
│           │                   │   └── LocalXADataSource.java
│           │                   ├── jpa/
│           │                   │   └── hibernate/
│           │                   │       └── HibernateJtaPlatform.java
│           │                   ├── resource/
│           │                   │   ├── ManagedConnectionFactoryHandler.java
│           │                   │   ├── ManagedConnectionHandler.java
│           │                   │   ├── ManagedXASessionHandler.java
│           │                   │   ├── jdbc/
│           │                   │   │   ├── CallableStatementImpl.java
│           │                   │   │   ├── ConnectionImpl.java
│           │                   │   │   ├── DatabaseMetaDataImpl.java
│           │                   │   │   ├── PreparedStatementImpl.java
│           │                   │   │   ├── StatementImpl.java
│           │                   │   │   ├── XAConnectionImpl.java
│           │                   │   │   └── XADataSourceImpl.java
│           │                   │   └── properties/
│           │                   │       ├── ConnectorResourcePropertySource.java
│           │                   │       └── ConnectorResourcePropertySourceFactory.java
│           │                   ├── rpc/
│           │                   │   ├── TransactionInterceptorImpl.java
│           │                   │   ├── TransactionRequestImpl.java
│           │                   │   └── TransactionResponseImpl.java
│           │                   ├── serialize/
│           │                   │   └── XAResourceDeserializerImpl.java
│           │                   └── spring/
│           │                       ├── ManagedConnectionFactoryPostProcessor.java
│           │                       ├── TransactionBeanFactoryAutoInjector.java
│           │                       └── TransactionDebuggablePostProcessor.java
│           └── resources/
│               ├── bytejta-supports-core.xml
│               ├── bytejta-supports-standalone.xml
│               └── bytejta-supports-task.xml
├── bytejta-supports-dubbo/
│   ├── pom.xml
│   └── src/
│       └── main/
│           ├── java/
│           │   └── org/
│           │       └── bytesoft/
│           │           └── bytejta/
│           │               └── supports/
│           │                   └── dubbo/
│           │                       ├── DubboRemoteCoordinator.java
│           │                       ├── InvocationContextRegistry.java
│           │                       ├── TransactionBeanRegistry.java
│           │                       ├── config/
│           │                       │   └── DubboSupportConfiguration.java
│           │                       ├── ext/
│           │                       │   └── ILoadBalancer.java
│           │                       ├── internal/
│           │                       │   ├── TransactionBeanConfigValidator.java
│           │                       │   ├── TransactionEndpointAutoInjector.java
│           │                       │   └── TransactionParticipantRegistrant.java
│           │                       ├── serialize/
│           │                       │   └── XAResourceDeserializerImpl.java
│           │                       └── spi/
│           │                           ├── TransactionLoadBalance.java
│           │                           ├── TransactionLoadBalancer.java
│           │                           └── TransactionServiceFilter.java
│           └── resources/
│               ├── META-INF/
│               │   └── dubbo/
│               │       ├── com.alibaba.dubbo.rpc.Filter
│               │       ├── com.alibaba.dubbo.rpc.cluster.LoadBalance
│               │       └── org.bytesoft.bytejta.supports.dubbo.ext.ILoadBalancer
│               └── bytejta-supports-dubbo.xml
├── bytejta-supports-springcloud/
│   ├── pom.xml
│   └── src/
│       └── main/
│           ├── java/
│           │   └── org/
│           │       └── bytesoft/
│           │           └── bytejta/
│           │               └── supports/
│           │                   └── springcloud/
│           │                       ├── SpringCloudBeanRegistry.java
│           │                       ├── SpringCloudCoordinator.java
│           │                       ├── SpringCloudEndpointPostProcessor.java
│           │                       ├── config/
│           │                       │   └── SpringCloudConfiguration.java
│           │                       ├── controller/
│           │                       │   └── TransactionCoordinatorController.java
│           │                       ├── dbcp/
│           │                       │   └── CommonDBCPXADataSourceWrapper.java
│           │                       ├── feign/
│           │                       │   ├── TransactionClientRegistry.java
│           │                       │   ├── TransactionFeignBeanPostProcessor.java
│           │                       │   ├── TransactionFeignContract.java
│           │                       │   ├── TransactionFeignDecoder.java
│           │                       │   ├── TransactionFeignErrorDecoder.java
│           │                       │   ├── TransactionFeignHandler.java
│           │                       │   └── TransactionFeignInterceptor.java
│           │                       ├── hystrix/
│           │                       │   ├── TransactionHystrixBeanPostProcessor.java
│           │                       │   ├── TransactionHystrixFallbackFactoryHandler.java
│           │                       │   ├── TransactionHystrixFallbackHandler.java
│           │                       │   ├── TransactionHystrixFeignHandler.java
│           │                       │   ├── TransactionHystrixInvocation.java
│           │                       │   ├── TransactionHystrixInvocationHandler.java
│           │                       │   └── TransactionHystrixMethodHandler.java
│           │                       ├── loadbalancer/
│           │                       │   ├── TransactionLoadBalancerInterceptor.java
│           │                       │   └── TransactionLoadBalancerRuleImpl.java
│           │                       ├── property/
│           │                       │   ├── TransactionPropertySource.java
│           │                       │   └── TransactionPropertySourceFactory.java
│           │                       ├── rule/
│           │                       │   ├── TransactionRule.java
│           │                       │   └── TransactionRuleImpl.java
│           │                       ├── serialize/
│           │                       │   └── XAResourceDeserializerImpl.java
│           │                       └── web/
│           │                           ├── TransactionHandlerInterceptor.java
│           │                           └── TransactionRequestInterceptor.java
│           └── resources/
│               └── bytejta-supports-springcloud.xml
└── pom.xml
Download .txt
Showing preview only (230K chars total). Download the full file or copy to clipboard to get everything.
SYMBOL INDEX (2194 symbols across 157 files)

FILE: bytejta-core/src/main/java/org/bytesoft/bytejta/TransactionBeanFactoryImpl.java
  class TransactionBeanFactoryImpl (line 31) | public class TransactionBeanFactoryImpl implements TransactionBeanFactory {
    method TransactionBeanFactoryImpl (line 47) | private TransactionBeanFactoryImpl() {
    method getInstance (line 53) | public static TransactionBeanFactoryImpl getInstance() {
    method getTransactionManager (line 57) | public TransactionManager getTransactionManager() {
    method setTransactionManager (line 61) | public void setTransactionManager(TransactionManager transactionManage...
    method getXidFactory (line 65) | public XidFactory getXidFactory() {
    method setXidFactory (line 69) | public void setXidFactory(XidFactory xidFactory) {
    method getTransactionTimer (line 73) | public TransactionTimer getTransactionTimer() {
    method setTransactionTimer (line 77) | public void setTransactionTimer(TransactionTimer transactionTimer) {
    method getTransactionRepository (line 81) | public TransactionRepository getTransactionRepository() {
    method setTransactionRepository (line 85) | public void setTransactionRepository(TransactionRepository transaction...
    method getTransactionInterceptor (line 89) | public TransactionInterceptor getTransactionInterceptor() {
    method setTransactionInterceptor (line 93) | public void setTransactionInterceptor(TransactionInterceptor transacti...
    method getTransactionLock (line 97) | public TransactionLock getTransactionLock() {
    method setTransactionLock (line 101) | public void setTransactionLock(TransactionLock transactionLock) {
    method getTransactionRecovery (line 105) | public TransactionRecovery getTransactionRecovery() {
    method setTransactionRecovery (line 109) | public void setTransactionRecovery(TransactionRecovery transactionReco...
    method getNativeParticipant (line 113) | public RemoteCoordinator getNativeParticipant() {
    method setTransactionCoordinator (line 117) | public void setTransactionCoordinator(RemoteCoordinator remoteCoordina...
    method getTransactionLogger (line 121) | public TransactionLogger getTransactionLogger() {
    method setTransactionLogger (line 125) | public void setTransactionLogger(TransactionLogger transactionLogger) {
    method getArchiveDeserializer (line 129) | public ArchiveDeserializer getArchiveDeserializer() {
    method setArchiveDeserializer (line 133) | public void setArchiveDeserializer(ArchiveDeserializer archiveDeserial...
    method getResourceDeserializer (line 137) | public XAResourceDeserializer getResourceDeserializer() {
    method setResourceDeserializer (line 141) | public void setResourceDeserializer(XAResourceDeserializer resourceDes...

FILE: bytejta-core/src/main/java/org/bytesoft/bytejta/TransactionCoordinator.java
  class TransactionCoordinator (line 52) | public class TransactionCoordinator implements RemoteCoordinator, Transa...
    method getTransactionQuietly (line 62) | public Transaction getTransactionQuietly() {
    method start (line 67) | public Transaction start(TransactionContext transactionContext, int fl...
    method end (line 102) | public Transaction end(TransactionContext transactionContext, int flag...
    method start (line 108) | public void start(Xid xid, int flags) throws XAException {
    method end (line 138) | public void end(Xid xid, int flags) throws XAException {
    method commit (line 160) | public void commit(Xid xid, boolean onePhaseCommit) throws XAException {
    method forgetQuietly (line 273) | public void forgetQuietly(Xid xid) {
    method forget (line 290) | public void forget(Xid xid) throws XAException {
    method getTransactionTimeout (line 325) | public int getTransactionTimeout() throws XAException {
    method isSameRM (line 329) | public boolean isSameRM(XAResource xares) throws XAException {
    method prepare (line 333) | public int prepare(Xid xid) throws XAException {
    method recover (line 381) | public Xid[] recover(int flag) throws XAException {
    method rollback (line 409) | public void rollback(Xid xid) throws XAException {
    method markParticipantReady (line 465) | public void markParticipantReady() {
    method checkParticipantReadyIfNecessary (line 474) | private void checkParticipantReadyIfNecessary() throws XAException {
    method checkParticipantReady (line 480) | private void checkParticipantReady() throws XAException {
    method setTransactionTimeout (line 491) | public boolean setTransactionTimeout(int seconds) throws XAException {
    method getEndpoint (line 495) | public String getEndpoint() {
    method setEndpoint (line 499) | public void setEndpoint(String identifier) {
    method getRemoteAddr (line 503) | public RemoteAddr getRemoteAddr() {
    method getRemoteNode (line 507) | public RemoteNode getRemoteNode() {
    method getIdentifier (line 511) | public String getIdentifier() {
    method getApplication (line 515) | public String getApplication() {
    method getBeanFactory (line 519) | public TransactionBeanFactory getBeanFactory() {
    method setBeanFactory (line 523) | public void setBeanFactory(TransactionBeanFactory tbf) {

FILE: bytejta-core/src/main/java/org/bytesoft/bytejta/TransactionImpl.java
  class TransactionImpl (line 72) | public class TransactionImpl implements Transaction {
    method TransactionImpl (line 100) | public TransactionImpl(TransactionContext txContext) {
    method participantPrepare (line 104) | public synchronized int participantPrepare() throws RollbackRequiredEx...
    method recoveryCommit (line 182) | public synchronized void recoveryCommit() throws CommitRequiredExcepti...
    method participantCommit (line 209) | public synchronized void participantCommit(boolean opc) throws Rollbac...
    method checkForTransactionExtraIfNecessary (line 231) | private void checkForTransactionExtraIfNecessary() throws RollbackExce...
    method compensableOnePhaseCommit (line 246) | private void compensableOnePhaseCommit() throws RollbackException, Heu...
    method participantOnePhaseCommit (line 299) | private void participantOnePhaseCommit() throws RollbackException, Heu...
    method participantTwoPhaseCommit (line 346) | private void participantTwoPhaseCommit() throws RollbackException, Heu...
    method invokeParticipantPrepare (line 387) | private void invokeParticipantPrepare() throws RollbackRequiredExcepti...
    method invokeParticipantCommit (line 425) | private void invokeParticipantCommit(boolean onePhaseCommit)
    method commit (line 467) | public synchronized void commit() throws RollbackException, HeuristicM...
    method fireCommit (line 485) | private void fireCommit() throws RollbackException, HeuristicMixedExce...
    method skipOnePhaseCommit (line 501) | public synchronized void skipOnePhaseCommit()
    method fireOnePhaseCommit (line 508) | public synchronized void fireOnePhaseCommit()
    method fireTwoPhaseCommit (line 554) | public synchronized void fireTwoPhaseCommit()
    method delistResource (line 646) | public synchronized boolean delistResource(XAResource xaRes, int flag)...
    method delistResource (line 661) | public boolean delistResource(XAResourceDescriptor descriptor, int fla...
    method delistResource (line 688) | private boolean delistResource(XAResourceArchive archive, int flag) th...
    method enlistResource (line 738) | public synchronized boolean enlistResource(XAResource xaRes)
    method getEnlistedResourceArchive (line 762) | private XAResourceArchive getEnlistedResourceArchive(XAResourceDescrip...
    method putEnlistedResourceArchive (line 771) | private void putEnlistedResourceArchive(XAResourceArchive archive) {
    method enlistResource (line 782) | public boolean enlistResource(XAResourceDescriptor descriptor)
    method enlistResource (line 882) | private Boolean enlistResource(XAResourceArchive archive, int flag) th...
    method getStatus (line 949) | public int getStatus() /* throws SystemException */ {
    method registerSynchronization (line 953) | public synchronized void registerSynchronization(Synchronization sync)
    method rollback (line 968) | public synchronized void rollback() throws IllegalStateException, Roll...
    method fireRollback (line 982) | private void fireRollback() throws IllegalStateException, RollbackRequ...
    method recoveryRollback (line 992) | public synchronized void recoveryRollback() throws RollbackRequiredExc...
    method participantRollback (line 1001) | public synchronized void participantRollback() throws IllegalStateExce...
    method invokeParticipantRollback (line 1022) | private void invokeParticipantRollback() throws SystemException {
    method suspend (line 1064) | public void suspend() throws RollbackRequiredException, SystemException {
    method resume (line 1092) | public void resume() throws RollbackRequiredException, SystemException {
    method fireBeforeTransactionCompletionQuietly (line 1114) | public synchronized void fireBeforeTransactionCompletionQuietly() {
    method fireBeforeTransactionCompletion (line 1119) | public synchronized void fireBeforeTransactionCompletion() throws Roll...
    method fireAfterTransactionCompletion (line 1124) | public synchronized void fireAfterTransactionCompletion() {
    method delistAllResourceQuietly (line 1128) | public void delistAllResourceQuietly() {
    method delistAllResource (line 1140) | private void delistAllResource() throws RollbackRequiredException, Sys...
    method isMarkedRollbackOnly (line 1171) | public boolean isMarkedRollbackOnly() {
    method setRollbackOnlyQuietly (line 1175) | public void setRollbackOnlyQuietly() {
    method setRollbackOnly (line 1183) | public synchronized void setRollbackOnly() throws IllegalStateExceptio...
    method recoverIfNecessary (line 1192) | public void recoverIfNecessary() throws SystemException {
    method recover (line 1198) | public synchronized void recover() throws SystemException {
    method recover4PreparingStatus (line 1208) | public void recover4PreparingStatus() throws SystemException {
    method recover4CommittingStatus (line 1238) | public void recover4CommittingStatus() throws SystemException {
    method recover4RollingBackStatus (line 1285) | public void recover4RollingBackStatus() throws SystemException {
    method recover (line 1312) | private boolean recover(XAResourceArchive archive) throws SystemExcept...
    method forgetQuietly (line 1364) | public synchronized void forgetQuietly() {
    method forget (line 1377) | public synchronized void forget() throws SystemException {
    method cleanup (line 1391) | public synchronized void cleanup() throws SystemException {
    method getTransactionArchive (line 1437) | public TransactionArchive getTransactionArchive() {
    method hashCode (line 1463) | public int hashCode() {
    method equals (line 1468) | public boolean equals(Object obj) {
    method registerTransactionListener (line 1483) | public void registerTransactionListener(TransactionListener listener) {
    method registerTransactionResourceListener (line 1487) | public void registerTransactionResourceListener(TransactionResourceLis...
    method stopTiming (line 1491) | public synchronized void stopTiming() {
    method changeTransactionTimeout (line 1495) | public synchronized void changeTransactionTimeout(int timeout) {
    method getTransactionStrategy (line 1500) | public TransactionStrategy getTransactionStrategy() {
    method initGetTransactionStrategy (line 1510) | private TransactionStrategy initGetTransactionStrategy() {
    method recoverTransactionStrategy (line 1555) | public void recoverTransactionStrategy(int transactionStrategyType) {
    method getResourceDescriptor (line 1618) | public XAResourceDescriptor getResourceDescriptor(String beanId) {
    method getRemoteCoordinator (line 1623) | public XAResourceDescriptor getRemoteCoordinator(RemoteSvc remoteSvc) {
    method getRemoteCoordinator (line 1628) | public XAResourceDescriptor getRemoteCoordinator(String application) {
    method getTransactionXid (line 1635) | public TransactionXid getTransactionXid() {
    method setBeanFactory (line 1639) | public void setBeanFactory(TransactionBeanFactory tbf) {
    method isLocalTransaction (line 1643) | public boolean isLocalTransaction() {
    method getCreatedAt (line 1647) | public Exception getCreatedAt() {
    method setCreatedAt (line 1651) | public void setCreatedAt(Exception createdAt) {
    method setTransactionStrategy (line 1655) | public void setTransactionStrategy(TransactionStrategy transactionStra...
    method getTransactionalExtra (line 1659) | public TransactionExtra getTransactionalExtra() {
    method setTransactionalExtra (line 1663) | public void setTransactionalExtra(TransactionExtra transactionalExtra) {
    method getTransactionContext (line 1667) | public TransactionContext getTransactionContext() {
    method isTiming (line 1671) | public boolean isTiming() {
    method setTiming (line 1675) | public void setTiming(boolean timing) {
    method getTransactionStatus (line 1679) | public int getTransactionStatus() {
    method setTransactionStatus (line 1683) | public void setTransactionStatus(int transactionStatus) {
    method getTransactionTimeout (line 1687) | public int getTransactionTimeout() {
    method setTransactionTimeout (line 1691) | public void setTransactionTimeout(int transactionTimeout) {
    method getParticipant (line 1695) | public XAResourceArchive getParticipant() {
    method getRemoteParticipantMap (line 1699) | public Map<RemoteSvc, XAResourceArchive> getRemoteParticipantMap() {
    method getNativeParticipantMap (line 1703) | public Map<String, XAResourceArchive> getNativeParticipantMap() {
    method getParticipantList (line 1707) | public List<XAResourceArchive> getParticipantList() {
    method setParticipant (line 1711) | public void setParticipant(XAResourceArchive participant) {
    method getNativeParticipantList (line 1715) | public List<XAResourceArchive> getNativeParticipantList() {
    method getRemoteParticipantList (line 1719) | public List<XAResourceArchive> getRemoteParticipantList() {

FILE: bytejta-core/src/main/java/org/bytesoft/bytejta/TransactionManagerImpl.java
  class TransactionManagerImpl (line 49) | public class TransactionManagerImpl
    method begin (line 60) | public void begin() throws NotSupportedException, SystemException {
    method commit (line 97) | public void commit() throws RollbackException, HeuristicMixedException...
    method rollback (line 190) | public void rollback() throws IllegalStateException, SecurityException...
    method rollback (line 206) | protected void rollback(Transaction transaction) throws IllegalStateEx...
    method associateThread (line 240) | public void associateThread(Transaction transaction) {
    method desociateThread (line 247) | public Transaction desociateThread() {
    method suspend (line 258) | public Transaction suspend() throws RollbackRequiredException, SystemE...
    method resume (line 268) | public void resume(javax.transaction.Transaction tobj)
    method getStatus (line 287) | public int getStatus() throws SystemException {
    method getTransaction (line 292) | public Transaction getTransaction(Xid transactionXid) {
    method getTransaction (line 296) | public Transaction getTransaction(Thread thread) {
    method getTransactionQuietly (line 300) | public Transaction getTransactionQuietly() {
    method getTransaction (line 310) | public Transaction getTransaction() throws SystemException {
    method setRollbackOnlyQuietly (line 314) | public void setRollbackOnlyQuietly() {
    method setRollbackOnly (line 321) | public void setRollbackOnly() throws IllegalStateException, SystemExce...
    method setTransactionTimeout (line 329) | public void setTransactionTimeout(int seconds) throws SystemException {
    method timingExecution (line 342) | public void timingExecution() {
    method timingRollback (line 368) | private void timingRollback(Transaction transaction) {
    method stopTiming (line 387) | public void stopTiming(Transaction transaction) {
    method isDebuggingEnabled (line 393) | public boolean isDebuggingEnabled() {
    method setDebuggingEnabled (line 397) | public void setDebuggingEnabled(boolean debuggingEnabled) {
    method getTimeoutSeconds (line 401) | public int getTimeoutSeconds() {
    method setTimeoutSeconds (line 405) | public void setTimeoutSeconds(int timeoutSeconds) {
    method getBeanFactory (line 409) | public TransactionBeanFactory getBeanFactory() {
    method setBeanFactory (line 413) | public void setBeanFactory(TransactionBeanFactory tbf) {

FILE: bytejta-core/src/main/java/org/bytesoft/bytejta/TransactionRecoveryImpl.java
  class TransactionRecoveryImpl (line 49) | public class TransactionRecoveryImpl implements TransactionRecovery, Tra...
    method timingRecover (line 58) | public synchronized void timingRecover() {
    method recoverTransaction (line 99) | public void recoverTransaction(Transaction transaction)
    method recoverCoordinator (line 114) | protected void recoverCoordinator(Transaction transaction)
    method recoverParticipant (line 140) | protected void recoverParticipant(Transaction transaction)
    method startRecovery (line 162) | public synchronized void startRecovery() {
    method reconstruct (line 189) | public org.bytesoft.transaction.Transaction reconstruct(TransactionArc...
    method branchRecover (line 259) | public synchronized void branchRecover() {
    method isInitialized (line 264) | public boolean isInitialized() {
    method getBeanFactory (line 268) | public TransactionBeanFactory getBeanFactory() {
    method setBeanFactory (line 272) | public void setBeanFactory(TransactionBeanFactory tbf) {
    method getListener (line 276) | public TransactionRecoveryListener getListener() {
    method setListener (line 280) | public void setListener(TransactionRecoveryListener listener) {

FILE: bytejta-core/src/main/java/org/bytesoft/bytejta/TransactionRepositoryImpl.java
  class TransactionRepositoryImpl (line 27) | public class TransactionRepositoryImpl implements TransactionRepository {
    method putTransaction (line 31) | public void putTransaction(TransactionXid globalXid, Transaction trans...
    method getTransaction (line 35) | public Transaction getTransaction(TransactionXid globalXid) {
    method removeTransaction (line 39) | public Transaction removeTransaction(TransactionXid globalXid) {
    method putErrorTransaction (line 43) | public void putErrorTransaction(TransactionXid globalXid, Transaction ...
    method getErrorTransaction (line 47) | public Transaction getErrorTransaction(TransactionXid globalXid) {
    method removeErrorTransaction (line 51) | public Transaction removeErrorTransaction(TransactionXid globalXid) {
    method getErrorTransactionList (line 55) | public List<Transaction> getErrorTransactionList() {
    method getActiveTransactionList (line 59) | public List<Transaction> getActiveTransactionList() {

FILE: bytejta-core/src/main/java/org/bytesoft/bytejta/TransactionStrategy.java
  type TransactionStrategy (line 27) | public interface TransactionStrategy /* extends TransactionBeanFactoryAw...
    method prepare (line 34) | public int prepare(Xid xid) throws RollbackRequiredException, CommitRe...
    method commit (line 36) | public void commit(Xid xid, boolean onePhaseCommit)
    method rollback (line 39) | public void rollback(Xid xid)

FILE: bytejta-core/src/main/java/org/bytesoft/bytejta/UserTransactionImpl.java
  class UserTransactionImpl (line 31) | public class UserTransactionImpl implements UserTransaction, Referenceab...
    method begin (line 37) | public void begin() throws NotSupportedException, SystemException {
    method commit (line 41) | public void commit() throws HeuristicMixedException, HeuristicRollback...
    method getStatus (line 46) | public int getStatus() throws SystemException {
    method rollback (line 50) | public void rollback() throws IllegalStateException, SecurityException...
    method setRollbackOnly (line 54) | public void setRollbackOnly() throws IllegalStateException, SystemExce...
    method setTransactionTimeout (line 58) | public void setTransactionTimeout(int timeout) throws SystemException {
    method getReference (line 62) | public Reference getReference() throws NamingException {
    method getTransactionManager (line 66) | public TransactionManager getTransactionManager() {
    method setTransactionManager (line 70) | public void setTransactionManager(TransactionManager transactionManage...

FILE: bytejta-core/src/main/java/org/bytesoft/bytejta/VacantTransactionLock.java
  class VacantTransactionLock (line 21) | public class VacantTransactionLock implements TransactionLock {
    method lockTransaction (line 23) | public boolean lockTransaction(TransactionXid transactionXid, String i...
    method unlockTransaction (line 27) | public void unlockTransaction(TransactionXid transactionXid, String id...

FILE: bytejta-core/src/main/java/org/bytesoft/bytejta/logging/ArchiveDeserializerImpl.java
  class ArchiveDeserializerImpl (line 23) | public class ArchiveDeserializerImpl implements ArchiveDeserializer {
    method serialize (line 30) | public byte[] serialize(TransactionXid xid, Object archive) {
    method deserialize (line 50) | public Object deserialize(TransactionXid xid, byte[] array) {
    method getXaResourceArchiveDeserializer (line 70) | public ArchiveDeserializer getXaResourceArchiveDeserializer() {
    method setXaResourceArchiveDeserializer (line 74) | public void setXaResourceArchiveDeserializer(ArchiveDeserializer xaRes...
    method getTransactionArchiveDeserializer (line 78) | public ArchiveDeserializer getTransactionArchiveDeserializer() {
    method setTransactionArchiveDeserializer (line 82) | public void setTransactionArchiveDeserializer(ArchiveDeserializer tran...

FILE: bytejta-core/src/main/java/org/bytesoft/bytejta/logging/SampleTransactionLogger.java
  class SampleTransactionLogger (line 49) | public class SampleTransactionLogger extends VirtualLoggingSystemImpl
    method construct (line 57) | @PostConstruct
    method initializeIfNecessary (line 62) | private void initializeIfNecessary() throws IllegalStateException {
    method createTransaction (line 72) | public void createTransaction(TransactionArchive archive) {
    method updateTransaction (line 83) | public void updateTransaction(TransactionArchive archive) {
    method deleteTransaction (line 94) | public void deleteTransaction(TransactionArchive archive) {
    method createParticipant (line 102) | public void createParticipant(XAResourceArchive archive) {
    method updateParticipant (line 105) | public void updateParticipant(XAResourceArchive archive) {
    method deleteParticipant (line 116) | public void deleteParticipant(XAResourceArchive archive) {
    method createResource (line 119) | public void createResource(XAResourceArchive archive) {
    method updateResource (line 122) | public void updateResource(XAResourceArchive archive) {
    method deleteResource (line 125) | public void deleteResource(XAResourceArchive archive) {
    method compressIfNecessary (line 128) | public List<VirtualLoggingRecord> compressIfNecessary(List<VirtualLogg...
    method recover (line 226) | public void recover(TransactionRecoveryCallback callback) {
    method getDefaultDirectory (line 322) | public File getDefaultDirectory() {
    method getMajorVersion (line 338) | public int getMajorVersion() {
    method getMinorVersion (line 342) | public int getMinorVersion() {
    method getLoggingFilePrefix (line 346) | public String getLoggingFilePrefix() {
    method getLoggingIdentifier (line 350) | public String getLoggingIdentifier() {
    method getEndpoint (line 354) | public String getEndpoint() {
    method setEndpoint (line 358) | public void setEndpoint(String identifier) {
    method getBeanFactory (line 363) | public TransactionBeanFactory getBeanFactory() {
    method setBeanFactory (line 367) | public void setBeanFactory(TransactionBeanFactory beanFactory) {

FILE: bytejta-core/src/main/java/org/bytesoft/bytejta/logging/deserializer/TransactionArchiveDeserializer.java
  class TransactionArchiveDeserializer (line 32) | public class TransactionArchiveDeserializer implements ArchiveDeserializ...
    method serialize (line 37) | public byte[] serialize(TransactionXid xid, Object obj) {
    method deserialize (line 179) | public Object deserialize(TransactionXid xid, byte[] array) {
    method getResourceArchiveDeserializer (line 266) | public ArchiveDeserializer getResourceArchiveDeserializer() {
    method setResourceArchiveDeserializer (line 270) | public void setResourceArchiveDeserializer(ArchiveDeserializer resourc...

FILE: bytejta-core/src/main/java/org/bytesoft/bytejta/logging/deserializer/XAResourceArchiveDeserializer.java
  class XAResourceArchiveDeserializer (line 35) | public class XAResourceArchiveDeserializer implements ArchiveDeserialize...
    method serialize (line 41) | public byte[] serialize(TransactionXid xid, Object obj) {
    method deserialize (line 88) | public Object deserialize(TransactionXid xid, byte[] array) {
    method getBeanFactory (line 143) | public TransactionBeanFactory getBeanFactory() {
    method setBeanFactory (line 147) | public void setBeanFactory(TransactionBeanFactory tbf) {

FILE: bytejta-core/src/main/java/org/bytesoft/bytejta/logging/store/VirtualLoggingFile.java
  class VirtualLoggingFile (line 30) | public class VirtualLoggingFile {
    method VirtualLoggingFile (line 59) | public VirtualLoggingFile(File file) throws IOException {
    method VirtualLoggingFile (line 63) | public VirtualLoggingFile(File file, int major, int minor) throws IOEx...
    method clearMarkedFlag (line 76) | public void clearMarkedFlag() {
    method fixSwitchError (line 87) | public void fixSwitchError() {
    method initialize (line 101) | public void initialize(boolean master) {
    method checkLoggingIdentifier (line 113) | private void checkLoggingIdentifier() {
    method checkLoggingVersion (line 127) | private void checkLoggingVersion() {
    method checkCreatedTime (line 142) | private void checkCreatedTime() {
    method checkStartIndex (line 149) | private void checkStartIndex() {
    method checkMasterFlag (line 163) | private void checkMasterFlag(boolean master) {
    method checkModifiedTime (line 177) | private void checkModifiedTime() {
    method checkEndIndex (line 184) | private void checkEndIndex() {
    method markAsMaster (line 195) | public void markAsMaster() {
    method switchToMaster (line 200) | public void switchToMaster() {
    method switchToSlaver (line 212) | public void switchToSlaver() {
    method prepareForReading (line 226) | public void prepareForReading() {
    method read (line 230) | public byte[] read() {
    method write (line 244) | public void write(byte[] byteArray) {
    method resizeMappedByteBuffer (line 263) | private void resizeMappedByteBuffer(long size) {
    method configMappedByteBuffer (line 273) | private void configMappedByteBuffer(long size) throws IOException {
    method flushImmediately (line 278) | public void flushImmediately() {
    method closeQuietly (line 284) | public void closeQuietly() {
    method getIdentifier (line 294) | public byte[] getIdentifier() {
    method setIdentifier (line 298) | public void setIdentifier(byte[] identifier) {
    method getTrigger (line 302) | public VirtualLoggingTrigger getTrigger() {
    method setTrigger (line 306) | public void setTrigger(VirtualLoggingTrigger trigger) {
    method isMarked (line 310) | public boolean isMarked() {
    method setMarked (line 314) | public void setMarked(boolean marked) {
    method isMaster (line 318) | public boolean isMaster() {
    method setMaster (line 322) | public void setMaster(boolean master) {
    method getStartIdx (line 326) | public int getStartIdx() {
    method getEndIndex (line 330) | public int getEndIndex() {
    method getMajorVersion (line 334) | public int getMajorVersion() {
    method getMinorVersion (line 338) | public int getMinorVersion() {

FILE: bytejta-core/src/main/java/org/bytesoft/bytejta/logging/store/VirtualLoggingSystemImpl.java
  class VirtualLoggingSystemImpl (line 42) | public abstract class VirtualLoggingSystemImpl implements VirtualLogging...
    method construct (line 63) | public synchronized void construct() throws IOException {
    method initialize (line 70) | private void initialize() throws IOException {
    method initialize (line 95) | private void initialize(VirtualLoggingFile prev, VirtualLoggingFile ne...
    method fixSwitchError (line 119) | private void fixSwitchError(VirtualLoggingFile prev, VirtualLoggingFil...
    method run (line 139) | public void run() {
    method fireSwapImmediately (line 163) | public void fireSwapImmediately() {
    method traversal (line 172) | public void traversal(VirtualLoggingListener listener) {
    method create (line 206) | public void create(Xid xid, byte[] textByteArray) {
    method delete (line 227) | public void delete(Xid xid) {
    method modify (line 247) | public void modify(Xid xid, byte[] textByteArray) {
    method syncMasterAndSlaver (line 268) | public void syncMasterAndSlaver() {
    method syncStepOne (line 277) | public Map<Xid, Boolean> syncStepOne() {
    method compressIfNecessary (line 313) | public List<VirtualLoggingRecord> compressIfNecessary(List<VirtualLogg...
    method syncStepTwo (line 317) | public void syncStepTwo(Map<Xid, Boolean> recordMap, boolean compressR...
    method swapMasterAndSlaver (line 377) | public void swapMasterAndSlaver() {
    method flushAllIfNecessary (line 397) | private void flushAllIfNecessary() {
    method flushMasterIfNecessary (line 402) | private void flushMasterIfNecessary() {
    method flushSlaverIfNecessary (line 408) | private void flushSlaverIfNecessary() {
    method flushImmediately (line 414) | public void flushImmediately() {
    method shutdown (line 418) | public void shutdown() {
    method release (line 426) | public void release() {
    method getDefaultDirectory (line 430) | public abstract File getDefaultDirectory();
    method getMajorVersion (line 432) | public abstract int getMajorVersion();
    method getMinorVersion (line 434) | public abstract int getMinorVersion();
    method getLoggingIdentifier (line 436) | public abstract String getLoggingIdentifier();
    method getLoggingFilePrefix (line 438) | public abstract String getLoggingFilePrefix();
    method createTransactionLogging (line 440) | public VirtualLoggingFile createTransactionLogging(File file) throws I...
    method getSwitchThreshold (line 450) | public int getSwitchThreshold() {
    method setSwitchThreshold (line 454) | public void setSwitchThreshold(int switchThreshold) {
    method getSwitchInterval (line 458) | public int getSwitchInterval() {
    method setSwitchInterval (line 462) | public void setSwitchInterval(int switchInterval) {
    method isOptimized (line 466) | public boolean isOptimized() {
    method setOptimized (line 470) | public void setOptimized(boolean optimized) {
    method getDirectory (line 474) | public File getDirectory() {
    method setDirectory (line 478) | public void setDirectory(File directory) {

FILE: bytejta-core/src/main/java/org/bytesoft/bytejta/resource/XATerminatorImpl.java
  class XATerminatorImpl (line 33) | public class XATerminatorImpl implements XATerminator {
    method prepare (line 39) | public synchronized int prepare(Xid xid) throws XAException {
    method commit (line 72) | public synchronized void commit(Xid xid, boolean onePhase) throws XAEx...
    method fireOnePhaseCommit (line 80) | private void fireOnePhaseCommit(Xid xid) throws XAException {
    method fireTwoPhaseCommit (line 159) | private void fireTwoPhaseCommit(Xid xid) throws XAException {
    method invokeOnePhaseCommit (line 265) | private void invokeOnePhaseCommit(XAResourceArchive archive) throws XA...
    method invokeTwoPhaseCommit (line 304) | private void invokeTwoPhaseCommit(XAResourceArchive archive) throws XA...
    method rollback (line 363) | public synchronized void rollback(Xid xid) throws XAException {
    method invokeRollback (line 466) | private void invokeRollback(XAResourceArchive archive) throws XAExcept...
    method getTransactionTimeout (line 533) | public int getTransactionTimeout() throws XAException {
    method setTransactionTimeout (line 537) | public boolean setTransactionTimeout(int seconds) throws XAException {
    method start (line 541) | public void start(Xid xid, int flags) throws XAException {
    method end (line 545) | public void end(Xid xid, int flags) throws XAException {
    method isSameRM (line 549) | public boolean isSameRM(XAResource xares) throws XAException {
    method recover (line 553) | public Xid[] recover(int flag) throws XAException {
    method forget (line 557) | public void forget(Xid xid) throws XAException {
    method getResourceArchives (line 596) | public List<XAResourceArchive> getResourceArchives() {
    method getBeanFactory (line 600) | public TransactionBeanFactory getBeanFactory() {
    method setBeanFactory (line 604) | public void setBeanFactory(TransactionBeanFactory beanFactory) {

FILE: bytejta-core/src/main/java/org/bytesoft/bytejta/resource/XATerminatorOptd.java
  class XATerminatorOptd (line 35) | public class XATerminatorOptd implements XATerminator {
    method prepare (line 41) | public synchronized int prepare(Xid xid) throws XAException {
    method commit (line 74) | public synchronized void commit(Xid xid, boolean onePhase) throws XAEx...
    method fireOnePhaseCommit (line 82) | private void fireOnePhaseCommit(Xid xid) throws XAException {
    method fireTwoPhaseCommit (line 166) | private void fireTwoPhaseCommit(Xid xid) throws XAException {
    method rollback (line 277) | public synchronized void rollback(Xid xid) throws XAException {
    method getTransactionTimeout (line 400) | public int getTransactionTimeout() throws XAException {
    method setTransactionTimeout (line 404) | public boolean setTransactionTimeout(int seconds) throws XAException {
    method start (line 408) | public void start(Xid xid, int flags) throws XAException {
    method end (line 412) | public void end(Xid xid, int flags) throws XAException {
    method isSameRM (line 416) | public boolean isSameRM(XAResource xares) throws XAException {
    method recover (line 420) | public Xid[] recover(int flag) throws XAException {
    method forget (line 424) | public void forget(Xid xid) throws XAException {
    method getResourceArchives (line 461) | public List<XAResourceArchive> getResourceArchives() {
    method getBeanFactory (line 578) | public TransactionBeanFactory getBeanFactory() {
    method setBeanFactory (line 582) | public void setBeanFactory(TransactionBeanFactory beanFactory) {

FILE: bytejta-core/src/main/java/org/bytesoft/bytejta/strategy/CommonTransactionStrategy.java
  class CommonTransactionStrategy (line 31) | public class CommonTransactionStrategy implements TransactionStrategy {
    method CommonTransactionStrategy (line 35) | public CommonTransactionStrategy(XATerminator nativeTerminator, XATerm...
    method prepare (line 46) | public int prepare(Xid xid) throws RollbackRequiredException, CommitRe...
    method commit (line 69) | public void commit(Xid xid, boolean onePhaseCommit)
    method rollback (line 152) | public void rollback(Xid xid)

FILE: bytejta-core/src/main/java/org/bytesoft/bytejta/strategy/LastResourceOptimizeStrategy.java
  class LastResourceOptimizeStrategy (line 31) | public class LastResourceOptimizeStrategy implements TransactionStrategy {
    method LastResourceOptimizeStrategy (line 35) | public LastResourceOptimizeStrategy(XATerminator terminatorOne, XATerm...
    method prepare (line 46) | public int prepare(Xid xid) throws RollbackRequiredException, CommitRe...
    method commit (line 81) | public void commit(Xid xid, boolean onePhaseCommit)
    method rollback (line 109) | public void rollback(Xid xid)

FILE: bytejta-core/src/main/java/org/bytesoft/bytejta/strategy/SimpleTransactionStrategy.java
  class SimpleTransactionStrategy (line 32) | public class SimpleTransactionStrategy implements TransactionStrategy {
    method SimpleTransactionStrategy (line 37) | public SimpleTransactionStrategy(XATerminator terminator) {
    method prepare (line 45) | public int prepare(Xid xid) throws RollbackRequiredException, CommitRe...
    method commit (line 57) | public void commit(Xid xid, boolean onePhaseCommit)
    method rollback (line 79) | public void rollback(Xid xid)

FILE: bytejta-core/src/main/java/org/bytesoft/bytejta/strategy/VacantTransactionStrategy.java
  class VacantTransactionStrategy (line 29) | public class VacantTransactionStrategy implements TransactionStrategy {
    method prepare (line 31) | public int prepare(Xid xid) throws RollbackRequiredException, CommitRe...
    method commit (line 35) | public void commit(Xid xid, boolean onePhaseCommit)
    method rollback (line 39) | public void rollback(Xid xid)

FILE: bytejta-core/src/main/java/org/bytesoft/bytejta/supports/jdbc/DataSourceHolder.java
  type DataSourceHolder (line 20) | public interface DataSourceHolder {
    method getDataSource (line 22) | public DataSource getDataSource();

FILE: bytejta-core/src/main/java/org/bytesoft/bytejta/supports/jdbc/LocalXACompatible.java
  type LocalXACompatible (line 18) | public interface LocalXACompatible {
    method compatibleLoggingLRO (line 20) | public boolean compatibleLoggingLRO();

FILE: bytejta-core/src/main/java/org/bytesoft/bytejta/supports/jdbc/LocalXAConnection.java
  class LocalXAConnection (line 33) | public class LocalXAConnection implements XAConnection {
    method LocalXAConnection (line 46) | public LocalXAConnection(Connection connection) {
    method getPhysicalConnection (line 50) | protected Connection getPhysicalConnection() {
    method getConnection (line 54) | public LogicalConnection getConnection() throws SQLException {
    method closeLogicalConnection (line 67) | public void closeLogicalConnection() throws SQLException {
    method releaseConnection (line 76) | private void releaseConnection() {
    method commitLocalTransaction (line 95) | public void commitLocalTransaction() throws SQLException {
    method rollbackLocalTransaction (line 105) | public void rollbackLocalTransaction() throws SQLException {
    method closeQuietly (line 115) | public void closeQuietly() {
    method close (line 123) | public void close() throws SQLException {
    method fireConnectionClosed (line 131) | private void fireConnectionClosed() {
    method fireConnectionErrorOccurred (line 143) | private void fireConnectionErrorOccurred() {
    method addConnectionEventListener (line 155) | public void addConnectionEventListener(ConnectionEventListener paramCo...
    method removeConnectionEventListener (line 159) | public void removeConnectionEventListener(ConnectionEventListener para...
    method addStatementEventListener (line 163) | public void addStatementEventListener(StatementEventListener paramStat...
    method removeStatementEventListener (line 166) | public void removeStatementEventListener(StatementEventListener paramS...
    method getXAResource (line 169) | public LocalXAResourceDescriptor getXAResource(boolean loggingRequired...
    method getXAResource (line 177) | public LocalXAResourceDescriptor getXAResource() throws SQLException {
    method getResourceId (line 181) | public String getResourceId() {
    method setResourceId (line 185) | public void setResourceId(String resourceId) {

FILE: bytejta-core/src/main/java/org/bytesoft/bytejta/supports/jdbc/LocalXAResource.java
  class LocalXAResource (line 34) | public class LocalXAResource implements XAResource {
    method LocalXAResource (line 43) | public LocalXAResource() {
    method LocalXAResource (line 46) | public LocalXAResource(LocalXAConnection managedConnection) {
    method recoverable (line 50) | public void recoverable(Xid xid) throws XAException {
    method start (line 100) | public synchronized void start(Xid xid, int flags) throws XAException {
    method end (line 142) | public synchronized void end(Xid xid, int flags) throws XAException {
    method prepare (line 164) | public synchronized int prepare(Xid xid) {
    method commit (line 177) | public synchronized void commit(Xid xid, boolean loggingRequired) thro...
    method rollback (line 203) | public synchronized void rollback(Xid xid) throws XAException {
    method createTransactionLogIfNecessary (line 225) | private void createTransactionLogIfNecessary(Xid xid) throws XAExcepti...
    method releasePhysicalConnection (line 275) | private void releasePhysicalConnection() {
    method isSameRM (line 289) | public boolean isSameRM(XAResource xares) {
    method forgetQuietly (line 302) | public void forgetQuietly(Xid xid) {
    method forget (line 310) | public synchronized void forget(Xid xid) throws XAException {
    method recover (line 320) | public Xid[] recover(int flags) throws XAException {
    method isTableExists (line 324) | protected boolean isTableExists(Connection conn) throws SQLException {
    method closeQuietly (line 349) | protected void closeQuietly(ResultSet closeable) {
    method closeQuietly (line 359) | protected void closeQuietly(Statement closeable) {
    method closeQuietly (line 369) | protected void closeQuietly(Connection closeable) {
    method getIdentifier (line 379) | protected String getIdentifier(byte[] globalByteArray, byte[] branchBy...
    method getTransactionTimeout (line 417) | public int getTransactionTimeout() {
    method setTransactionTimeout (line 421) | public boolean setTransactionTimeout(int transactionTimeout) {
    method getManagedConnection (line 425) | public LocalXAConnection getManagedConnection() {

FILE: bytejta-core/src/main/java/org/bytesoft/bytejta/supports/jdbc/LogicalConnection.java
  class LogicalConnection (line 40) | public class LogicalConnection implements Connection {
    method LogicalConnection (line 47) | public LogicalConnection(LocalXAConnection managedConnection, Connecti...
    method unwrap (line 52) | public <T> T unwrap(Class<T> iface) throws SQLException {
    method isWrapperFor (line 57) | public boolean isWrapperFor(Class<?> iface) throws SQLException {
    method createStatement (line 62) | public Statement createStatement() throws SQLException {
    method prepareStatement (line 67) | public PreparedStatement prepareStatement(String sql) throws SQLExcept...
    method prepareCall (line 72) | public CallableStatement prepareCall(String sql) throws SQLException {
    method nativeSQL (line 77) | public String nativeSQL(String sql) throws SQLException {
    method setAutoCommit (line 82) | public void setAutoCommit(boolean autoCommit) throws SQLException {
    method getAutoCommit (line 86) | public boolean getAutoCommit() throws SQLException {
    method commit (line 91) | public void commit() throws SQLException {
    method rollback (line 96) | public void rollback() throws SQLException {
    method close (line 101) | public synchronized void close() throws SQLException {
    method isClosed (line 110) | public boolean isClosed() throws SQLException {
    method getMetaData (line 114) | public DatabaseMetaData getMetaData() throws SQLException {
    method setReadOnly (line 119) | public void setReadOnly(boolean readOnly) throws SQLException {
    method isReadOnly (line 124) | public boolean isReadOnly() throws SQLException {
    method setCatalog (line 129) | public void setCatalog(String catalog) throws SQLException {
    method getCatalog (line 134) | public String getCatalog() throws SQLException {
    method setTransactionIsolation (line 139) | public void setTransactionIsolation(int level) throws SQLException {
    method getTransactionIsolation (line 144) | public int getTransactionIsolation() throws SQLException {
    method getWarnings (line 149) | public SQLWarning getWarnings() throws SQLException {
    method clearWarnings (line 154) | public void clearWarnings() throws SQLException {
    method createStatement (line 159) | public Statement createStatement(int resultSetType, int resultSetConcu...
    method prepareStatement (line 164) | public PreparedStatement prepareStatement(String sql, int resultSetTyp...
    method prepareCall (line 169) | public CallableStatement prepareCall(String sql, int resultSetType, in...
    method getTypeMap (line 174) | public Map<String, Class<?>> getTypeMap() throws SQLException {
    method setTypeMap (line 179) | public void setTypeMap(Map<String, Class<?>> map) throws SQLException {
    method setHoldability (line 184) | public void setHoldability(int holdability) throws SQLException {
    method getHoldability (line 189) | public int getHoldability() throws SQLException {
    method setSavepoint (line 194) | public Savepoint setSavepoint() throws SQLException {
    method setSavepoint (line 199) | public Savepoint setSavepoint(String name) throws SQLException {
    method rollback (line 204) | public void rollback(Savepoint savepoint) throws SQLException {
    method releaseSavepoint (line 209) | public void releaseSavepoint(Savepoint savepoint) throws SQLException {
    method createStatement (line 214) | public Statement createStatement(int resultSetType, int resultSetConcu...
    method prepareStatement (line 220) | public PreparedStatement prepareStatement(String sql, int resultSetTyp...
    method prepareCall (line 226) | public CallableStatement prepareCall(String sql, int resultSetType, in...
    method prepareStatement (line 232) | public PreparedStatement prepareStatement(String sql, int autoGenerate...
    method prepareStatement (line 237) | public PreparedStatement prepareStatement(String sql, int[] columnInde...
    method prepareStatement (line 242) | public PreparedStatement prepareStatement(String sql, String[] columnN...
    method createClob (line 247) | public Clob createClob() throws SQLException {
    method createBlob (line 252) | public Blob createBlob() throws SQLException {
    method createNClob (line 257) | public NClob createNClob() throws SQLException {
    method createSQLXML (line 262) | public SQLXML createSQLXML() throws SQLException {
    method isValid (line 267) | public boolean isValid(int timeout) throws SQLException {
    method setClientInfo (line 271) | public void setClientInfo(String name, String value) throws SQLClientI...
    method setClientInfo (line 280) | public void setClientInfo(Properties properties) throws SQLClientInfoE...
    method getClientInfo (line 289) | public String getClientInfo(String name) throws SQLException {
    method getClientInfo (line 294) | public Properties getClientInfo() throws SQLException {
    method createArrayOf (line 299) | public Array createArrayOf(String typeName, Object[] elements) throws ...
    method createStruct (line 304) | public Struct createStruct(String typeName, Object[] attributes) throw...
    method setSchema (line 309) | public void setSchema(String schema) throws SQLException {
    method getSchema (line 314) | public String getSchema() throws SQLException {
    method abort (line 319) | public void abort(Executor executor) throws SQLException {
    method setNetworkTimeout (line 324) | public void setNetworkTimeout(Executor executor, int milliseconds) thr...
    method getNetworkTimeout (line 329) | public int getNetworkTimeout() throws SQLException {
    method validateConnectionStatus (line 334) | private void validateConnectionStatus() throws SQLException {

FILE: bytejta-core/src/main/java/org/bytesoft/bytejta/supports/jdbc/RecoveredResource.java
  class RecoveredResource (line 37) | public class RecoveredResource extends LocalXAResource implements XAReso...
    method recoverable (line 42) | public void recoverable(Xid xid) throws XAException {
    method recover (line 81) | public Xid[] recover(int flags) throws XAException {
    method forgetQuietly (line 128) | public void forgetQuietly(Xid xid) {
    method forget (line 136) | public synchronized void forget(Xid[] xids) throws XAException {
    method forget (line 191) | public synchronized void forget(Xid xid) throws XAException {
    method setAutoCommitIfNecessary (line 239) | private void setAutoCommitIfNecessary(Connection conn, Boolean autoCom...
    method getDataSource (line 249) | public DataSource getDataSource() {
    method setDataSource (line 253) | public void setDataSource(DataSource dataSource) {

FILE: bytejta-core/src/main/java/org/bytesoft/bytejta/supports/resource/CommonResourceDescriptor.java
  class CommonResourceDescriptor (line 26) | public class CommonResourceDescriptor implements XAResourceDescriptor {
    method isTransactionCommitted (line 36) | public boolean isTransactionCommitted(Xid xid) throws IllegalStateExce...
    method toString (line 40) | public String toString() {
    method setTransactionTimeoutQuietly (line 44) | public void setTransactionTimeoutQuietly(int timeout) {
    method commit (line 52) | public void commit(Xid arg0, boolean arg1) throws XAException {
    method end (line 56) | public void end(Xid arg0, int arg1) throws XAException {
    method forget (line 60) | public void forget(Xid arg0) throws XAException {
    method closeIfNecessary (line 68) | private void closeIfNecessary() {
    method closeQuietly (line 80) | private void closeQuietly(javax.jms.XAConnection closeable) {
    method closeQuietly (line 90) | private void closeQuietly(javax.sql.XAConnection closeable) {
    method closeQuietly (line 100) | private void closeQuietly(javax.resource.spi.ManagedConnection closeab...
    method getTransactionTimeout (line 116) | public int getTransactionTimeout() throws XAException {
    method isSameRM (line 120) | public boolean isSameRM(XAResource arg0) throws XAException {
    method prepare (line 124) | public int prepare(Xid arg0) throws XAException {
    method recover (line 128) | public Xid[] recover(int arg0) throws XAException {
    method rollback (line 143) | public void rollback(Xid arg0) throws XAException {
    method setTransactionTimeout (line 147) | public boolean setTransactionTimeout(int arg0) throws XAException {
    method start (line 151) | public void start(Xid arg0, int arg1) throws XAException {
    method getDelegate (line 155) | public XAResource getDelegate() {
    method setDelegate (line 159) | public void setDelegate(XAResource delegate) {
    method getIdentifier (line 163) | public String getIdentifier() {
    method setIdentifier (line 167) | public void setIdentifier(String identifier) {
    method getRecoverXid (line 171) | public Xid getRecoverXid() {
    method setRecoverXid (line 175) | public void setRecoverXid(Xid recoverXid) {
    method getManaged (line 179) | public Object getManaged() {
    method setManaged (line 183) | public void setManaged(Object managed) {

FILE: bytejta-core/src/main/java/org/bytesoft/bytejta/supports/resource/LocalXAResourceDescriptor.java
  class LocalXAResourceDescriptor (line 27) | public class LocalXAResourceDescriptor implements XAResourceDescriptor {
    method isTransactionCommitted (line 33) | public boolean isTransactionCommitted(Xid xid) throws IllegalStateExce...
    method toString (line 51) | public String toString() {
    method setTransactionTimeoutQuietly (line 55) | public void setTransactionTimeoutQuietly(int timeout) {
    method commit (line 63) | public void commit(Xid arg0, boolean arg1) throws XAException {
    method end (line 70) | public void end(Xid arg0, int arg1) throws XAException {
    method forget (line 77) | public void forget(Xid arg0) throws XAException {
    method getTransactionTimeout (line 84) | public int getTransactionTimeout() throws XAException {
    method isSameRM (line 91) | public boolean isSameRM(XAResource xares) throws XAException {
    method prepare (line 107) | public int prepare(Xid arg0) throws XAException {
    method recover (line 114) | public Xid[] recover(int arg0) throws XAException {
    method rollback (line 121) | public void rollback(Xid arg0) throws XAException {
    method setTransactionTimeout (line 128) | public boolean setTransactionTimeout(int arg0) throws XAException {
    method start (line 135) | public void start(Xid arg0, int arg1) throws XAException {
    method isLoggingRequired (line 142) | public boolean isLoggingRequired() {
    method setLoggingRequired (line 146) | public void setLoggingRequired(boolean loggingRequired) {
    method getIdentifier (line 150) | public String getIdentifier() {
    method setIdentifier (line 154) | public void setIdentifier(String identifier) {
    method getDelegate (line 158) | public XAResource getDelegate() {
    method setDelegate (line 162) | public void setDelegate(LocalXAResource delegate) {

FILE: bytejta-core/src/main/java/org/bytesoft/bytejta/supports/resource/RemoteResourceDescriptor.java
  class RemoteResourceDescriptor (line 30) | public class RemoteResourceDescriptor implements XAResourceDescriptor {
    method setIdentifier (line 36) | public void setIdentifier(String identifier) {
    method getIdentifier (line 40) | public String getIdentifier() {
    method getRemoteAddr (line 51) | public RemoteAddr getRemoteAddr() {
    method getRemoteNode (line 55) | public RemoteNode getRemoteNode() {
    method getRemoteSvc (line 59) | public RemoteSvc getRemoteSvc() {
    method isTransactionCommitted (line 63) | public boolean isTransactionCommitted(Xid xid) throws IllegalStateExce...
    method toString (line 67) | public String toString() {
    method setTransactionTimeoutQuietly (line 71) | public void setTransactionTimeoutQuietly(int timeout) {
    method commit (line 74) | public void commit(Xid arg0, boolean arg1) throws XAException {
    method end (line 78) | public void end(Xid arg0, int arg1) throws XAException {
    method forget (line 82) | public void forget(Xid arg0) throws XAException {
    method getTransactionTimeout (line 86) | public int getTransactionTimeout() throws XAException {
    method isSameRM (line 90) | public boolean isSameRM(XAResource xares) throws XAException {
    method prepare (line 111) | public int prepare(Xid arg0) throws XAException {
    method recover (line 115) | public Xid[] recover(int arg0) throws XAException {
    method rollback (line 119) | public void rollback(Xid arg0) throws XAException {
    method setTransactionTimeout (line 123) | public boolean setTransactionTimeout(int arg0) throws XAException {
    method start (line 127) | public void start(Xid arg0, int arg1) throws XAException {
    method getDelegate (line 131) | public RemoteCoordinator getDelegate() {
    method setDelegate (line 135) | public void setDelegate(RemoteCoordinator delegate) {

FILE: bytejta-core/src/main/java/org/bytesoft/bytejta/supports/resource/UnidentifiedResourceDescriptor.java
  class UnidentifiedResourceDescriptor (line 24) | public class UnidentifiedResourceDescriptor implements XAResourceDescrip...
    method isTransactionCommitted (line 29) | public boolean isTransactionCommitted(Xid xid) throws IllegalStateExce...
    method toString (line 33) | public String toString() {
    method setTransactionTimeoutQuietly (line 37) | public void setTransactionTimeoutQuietly(int timeout) {
    method commit (line 45) | public void commit(Xid arg0, boolean arg1) throws XAException {
    method end (line 52) | public void end(Xid arg0, int arg1) throws XAException {
    method forget (line 59) | public void forget(Xid arg0) throws XAException {
    method getTransactionTimeout (line 66) | public int getTransactionTimeout() throws XAException {
    method isSameRM (line 73) | public boolean isSameRM(XAResource arg0) throws XAException {
    method prepare (line 80) | public int prepare(Xid arg0) throws XAException {
    method recover (line 87) | public Xid[] recover(int arg0) throws XAException {
    method rollback (line 94) | public void rollback(Xid arg0) throws XAException {
    method setTransactionTimeout (line 101) | public boolean setTransactionTimeout(int arg0) throws XAException {
    method start (line 108) | public void start(Xid arg0, int arg1) throws XAException {
    method getIdentifier (line 115) | public String getIdentifier() {
    method setIdentifier (line 119) | public void setIdentifier(String identifier) {
    method getDelegate (line 123) | public XAResource getDelegate() {
    method setDelegate (line 127) | public void setDelegate(XAResource delegate) {

FILE: bytejta-core/src/main/java/org/bytesoft/bytejta/work/TransactionWork.java
  class TransactionWork (line 27) | public class TransactionWork implements Work, TransactionBeanFactoryAware {
    method run (line 38) | public void run() {
    method fireGlobalRecovery (line 77) | private void fireGlobalRecovery() {
    method fireBranchRecovery (line 88) | private void fireBranchRecovery() {
    method waitForMillis (line 99) | private void waitForMillis(long millis) {
    method release (line 107) | public void release() {
    method currentActive (line 111) | protected boolean currentActive() {
    method getDelayOfStoping (line 115) | public long getDelayOfStoping() {
    method setDelayOfStoping (line 119) | public void setDelayOfStoping(long delayOfStoping) {
    method getRecoveryInterval (line 123) | public long getRecoveryInterval() {
    method setRecoveryInterval (line 127) | public void setRecoveryInterval(long recoveryInterval) {
    method getBeanFactory (line 131) | public TransactionBeanFactory getBeanFactory() {
    method setBeanFactory (line 135) | public void setBeanFactory(TransactionBeanFactory tbf) {

FILE: bytejta-core/src/main/java/org/bytesoft/bytejta/xa/XidFactoryImpl.java
  class XidFactoryImpl (line 30) | public class XidFactoryImpl implements XidFactory {
    method getHardwareAddress (line 43) | private static byte[] getHardwareAddress() {
    method createGlobalXid (line 79) | public TransactionXid createGlobalXid() {
    method createGlobalXid (line 91) | public TransactionXid createGlobalXid(byte[] globalTransactionId) {
    method createBranchXid (line 102) | public TransactionXid createBranchXid(TransactionXid globalXid) {
    method createBranchXid (line 125) | public TransactionXid createBranchXid(TransactionXid globalXid, byte[]...
    method generateUniqueKey (line 146) | public byte[] generateUniqueKey() {

FILE: bytejta-core/src/main/java/org/bytesoft/common/utils/ByteUtils.java
  class ByteUtils (line 18) | public class ByteUtils {
    method byteArrayToShort (line 19) | public static short byteArrayToShort(final byte[] buf) {
    method byteArrayToInt (line 23) | public static int byteArrayToInt(final byte[] buf) {
    method byteArrayToLong (line 27) | public static long byteArrayToLong(final byte[] buf) {
    method byteArrayToLong (line 31) | public static long byteArrayToLong(final byte[] buf, final int start) {
    method longToByteArray (line 47) | public static byte[] longToByteArray(final long value) {
    method byteArrayToInt (line 60) | public static int byteArrayToInt(final byte[] buf, final int start) {
    method intToByteArray (line 71) | public static byte[] intToByteArray(final int value) {
    method byteArrayToShort (line 80) | public static short byteArrayToShort(final byte[] buf, final int start) {
    method shortToByteArray (line 89) | public static byte[] shortToByteArray(final short value) {
    method byteArrayToString (line 96) | public static String byteArrayToString(final byte[] bytes, final int s...
    method byteArrayToString (line 106) | public static String byteArrayToString(final byte[] bytes) {
    method stringToByteArray (line 110) | public static byte[] stringToByteArray(String str) {
    method indexOf (line 129) | private static int indexOf(char chr) {

FILE: bytejta-core/src/main/java/org/bytesoft/common/utils/CommonUtils.java
  class CommonUtils (line 38) | public class CommonUtils {
    method getRemoteAddr (line 41) | public static RemoteAddr getRemoteAddr(String identifier) {
    method getRemoteNode (line 57) | public static RemoteNode getRemoteNode(String identifier) {
    method getRemoteSvc (line 74) | public static RemoteSvc getRemoteSvc(RemoteNode remoteNode) {
    method getRemoteSvc (line 82) | public static RemoteSvc getRemoteSvc(String identifier) {
    method getApplication (line 87) | public static String getApplication(String identifier) {
    method getInstanceKey (line 96) | public static String getInstanceKey(String identifier) {
    method applicationEquals (line 105) | public static boolean applicationEquals(String source, String target) {
    method instanceKeyEquals (line 115) | public static boolean instanceKeyEquals(String source, String target) {
    method equals (line 129) | public static boolean equals(Object o1, Object o2) {
    method closeQuietly (line 133) | public static void closeQuietly(Closeable closeable) {
    method getInetAddress (line 137) | public static String getInetAddress() {
    class InetAddrComparator (line 181) | private static class InetAddrComparator implements Comparator<InetAddr...
      method compare (line 182) | public int compare(InetAddress o1, InetAddress o2) {
    method getInetAddress (line 203) | public static String getInetAddress(String host) {
    method getLocalHostAddress (line 213) | public static String getLocalHostAddress() {

FILE: bytejta-core/src/main/java/org/bytesoft/common/utils/SerializeUtils.java
  class SerializeUtils (line 45) | public class SerializeUtils {
    method create (line 69) | public Kryo create() {
    method serializeObject (line 76) | public static byte[] serializeObject(Serializable obj, int serializerT...
    method serializeObject (line 97) | public static byte[] serializeObject(Serializable obj) throws IOExcept...
    method deserializeObject (line 109) | public static Serializable deserializeObject(byte[] bytes) throws IOEx...
    method javaSerialize (line 131) | public static byte[] javaSerialize(final Serializable obj) throws IOEx...
    method javaDeserialize (line 142) | public static Serializable javaDeserialize(byte[] byteArray) throws IO...
    method kryoSerialize (line 153) | public static byte[] kryoSerialize(final Serializable obj) throws IOEx...
    method kryoDeserialize (line 171) | public static Serializable kryoDeserialize(byte[] byteArray) throws IO...
    method hessianSerialize (line 185) | public static byte[] hessianSerialize(Serializable obj) throws IOExcep...
    method hessianDeserialize (line 197) | public static Serializable hessianDeserialize(byte[] bytes) throws IOE...
    method serializeClass (line 208) | public static String serializeClass(Class<?> clazz) {
    method deserializeClass (line 234) | public static Class<?> deserializeClass(String classDesc) {
    method deserializeClass (line 254) | public static Class<?> deserializeClass(final char character) {
    method serializeMethod (line 277) | public static String serializeMethod(Method method) {
    method deserializeMethod (line 292) | public static Method deserializeMethod(Class<?> interfaceClass, String...

FILE: bytejta-core/src/main/java/org/bytesoft/transaction/CommitRequiredException.java
  class CommitRequiredException (line 20) | public class CommitRequiredException extends SystemException {
    method CommitRequiredException (line 23) | public CommitRequiredException() {
    method CommitRequiredException (line 27) | public CommitRequiredException(String s) {
    method CommitRequiredException (line 31) | public CommitRequiredException(int errcode) {

FILE: bytejta-core/src/main/java/org/bytesoft/transaction/RemoteSystemException.java
  class RemoteSystemException (line 22) | public class RemoteSystemException extends SystemException {
    method RemoteSystemException (line 25) | public RemoteSystemException() {
    method RemoteSystemException (line 29) | public RemoteSystemException(String s) {
    method RemoteSystemException (line 33) | public RemoteSystemException(int errcode) {
    method initCause (line 37) | public Throwable initCause(Throwable cause) {
    method getRemoteException (line 44) | public RemoteException getRemoteException() {

FILE: bytejta-core/src/main/java/org/bytesoft/transaction/RollbackRequiredException.java
  class RollbackRequiredException (line 20) | public class RollbackRequiredException extends SystemException {
    method RollbackRequiredException (line 23) | public RollbackRequiredException() {
    method RollbackRequiredException (line 27) | public RollbackRequiredException(String s) {
    method RollbackRequiredException (line 31) | public RollbackRequiredException(int errcode) {

FILE: bytejta-core/src/main/java/org/bytesoft/transaction/Transaction.java
  type Transaction (line 30) | public interface Transaction extends javax.transaction.Transaction, Tran...
    method fireBeforeTransactionCompletion (line 32) | public void fireBeforeTransactionCompletion() throws RollbackRequiredE...
    method fireBeforeTransactionCompletionQuietly (line 34) | public void fireBeforeTransactionCompletionQuietly();
    method fireAfterTransactionCompletion (line 36) | public void fireAfterTransactionCompletion();
    method isLocalTransaction (line 38) | public boolean isLocalTransaction();
    method isMarkedRollbackOnly (line 40) | public boolean isMarkedRollbackOnly();
    method setRollbackOnlyQuietly (line 42) | public void setRollbackOnlyQuietly();
    method getTransactionStatus (line 44) | public int getTransactionStatus();
    method setTransactionStatus (line 46) | public void setTransactionStatus(int status);
    method resume (line 48) | public void resume() throws SystemException;
    method suspend (line 50) | public void suspend() throws SystemException;
    method isTiming (line 52) | public boolean isTiming();
    method setTransactionTimeout (line 54) | public void setTransactionTimeout(int seconds);
    method registerTransactionListener (line 56) | public void registerTransactionListener(TransactionListener listener);
    method registerTransactionResourceListener (line 58) | public void registerTransactionResourceListener(TransactionResourceLis...
    method getTransactionalExtra (line 60) | public TransactionExtra getTransactionalExtra();
    method setTransactionalExtra (line 62) | public void setTransactionalExtra(TransactionExtra transactionalExtra);
    method getResourceDescriptor (line 64) | public XAResourceDescriptor getResourceDescriptor(String beanName);
    method getRemoteCoordinator (line 66) | public XAResourceDescriptor getRemoteCoordinator(RemoteSvc remoteSvc);
    method getRemoteCoordinator (line 68) | public XAResourceDescriptor getRemoteCoordinator(String application);
    method getTransactionContext (line 70) | public TransactionContext getTransactionContext();
    method getTransactionArchive (line 72) | public TransactionArchive getTransactionArchive();
    method participantPrepare (line 74) | public int participantPrepare() throws RollbackRequiredException, Comm...
    method participantCommit (line 76) | public void participantCommit(boolean opc) throws RollbackException, H...
    method participantRollback (line 79) | public void participantRollback() throws IllegalStateException, Rollba...
    method forget (line 81) | public void forget() throws SystemException;
    method forgetQuietly (line 83) | public void forgetQuietly();
    method recover (line 85) | public void recover() throws SystemException;
    method recoveryCommit (line 87) | public void recoveryCommit() throws CommitRequiredException, SystemExc...
    method recoveryRollback (line 89) | public void recoveryRollback() throws RollbackRequiredException, Syste...
    method getCreatedAt (line 91) | public Exception getCreatedAt();

FILE: bytejta-core/src/main/java/org/bytesoft/transaction/TransactionBeanFactory.java
  type TransactionBeanFactory (line 25) | public interface TransactionBeanFactory {
    method getTransactionLock (line 27) | public TransactionLock getTransactionLock();
    method getTransactionManager (line 29) | public TransactionManager getTransactionManager();
    method getXidFactory (line 31) | public XidFactory getXidFactory();
    method getTransactionTimer (line 33) | public TransactionTimer getTransactionTimer();
    method getTransactionRepository (line 35) | public TransactionRepository getTransactionRepository();
    method getTransactionInterceptor (line 37) | public TransactionInterceptor getTransactionInterceptor();
    method getTransactionRecovery (line 39) | public TransactionRecovery getTransactionRecovery();
    method getNativeParticipant (line 41) | public TransactionParticipant getNativeParticipant();
    method getTransactionLogger (line 43) | public TransactionLogger getTransactionLogger();
    method getArchiveDeserializer (line 45) | public ArchiveDeserializer getArchiveDeserializer();
    method getResourceDeserializer (line 47) | public XAResourceDeserializer getResourceDeserializer();

FILE: bytejta-core/src/main/java/org/bytesoft/transaction/TransactionContext.java
  class TransactionContext (line 22) | public class TransactionContext implements Serializable, Cloneable {
    method clone (line 37) | public TransactionContext clone() {
    method getRecoveredTimes (line 47) | public int getRecoveredTimes() {
    method setRecoveredTimes (line 51) | public void setRecoveredTimes(int recoveredTimes) {
    method isCoordinator (line 55) | public boolean isCoordinator() {
    method setCoordinator (line 59) | public void setCoordinator(boolean coordinator) {
    method isRecoveried (line 63) | public boolean isRecoveried() {
    method setRecoveried (line 67) | public void setRecoveried(boolean recoveried) {
    method getXid (line 71) | public TransactionXid getXid() {
    method setXid (line 75) | public void setXid(TransactionXid xid) {
    method getCreatedTime (line 79) | public long getCreatedTime() {
    method setCreatedTime (line 83) | public void setCreatedTime(long createdTime) {
    method getExpiredTime (line 87) | public long getExpiredTime() {
    method setExpiredTime (line 91) | public void setExpiredTime(long expiredTime) {
    method getConfigFlags (line 95) | public long getConfigFlags() {
    method setConfigFlags (line 99) | public void setConfigFlags(long configFlags) {
    method isPropagated (line 103) | public boolean isPropagated() {
    method setPropagated (line 107) | public void setPropagated(boolean propagated) {
    method getPropagatedBy (line 111) | public Object getPropagatedBy() {
    method setPropagatedBy (line 115) | public void setPropagatedBy(Object propagatedBy) {
    method isRollbackOnly (line 119) | public boolean isRollbackOnly() {
    method setRollbackOnly (line 123) | public void setRollbackOnly(boolean rollbackOnly) {

FILE: bytejta-core/src/main/java/org/bytesoft/transaction/TransactionException.java
  class TransactionException (line 18) | public class TransactionException extends RuntimeException {
    method TransactionException (line 24) | public TransactionException(int errcode) {

FILE: bytejta-core/src/main/java/org/bytesoft/transaction/TransactionLock.java
  type TransactionLock (line 20) | public interface TransactionLock {
    method lockTransaction (line 22) | public boolean lockTransaction(TransactionXid transactionXid, String i...
    method unlockTransaction (line 24) | public void unlockTransaction(TransactionXid transactionXid, String id...

FILE: bytejta-core/src/main/java/org/bytesoft/transaction/TransactionManager.java
  type TransactionManager (line 20) | public interface TransactionManager extends javax.transaction.Transactio...
    method getTimeoutSeconds (line 22) | public int getTimeoutSeconds();
    method setTimeoutSeconds (line 24) | public void setTimeoutSeconds(int timeoutSeconds);
    method associateThread (line 26) | public void associateThread(Transaction transaction);
    method desociateThread (line 28) | public Transaction desociateThread();
    method getTransaction (line 30) | public Transaction getTransaction(Thread thread);
    method getTransactionQuietly (line 32) | public Transaction getTransactionQuietly();
    method getTransaction (line 34) | public Transaction getTransaction() throws SystemException;
    method suspend (line 36) | public Transaction suspend() throws SystemException;
    method setRollbackOnlyQuietly (line 38) | public void setRollbackOnlyQuietly();

FILE: bytejta-core/src/main/java/org/bytesoft/transaction/TransactionParticipant.java
  type TransactionParticipant (line 22) | public interface TransactionParticipant extends XAResource {
    method end (line 24) | public Transaction end(TransactionContext transactionContext, int flag...
    method forgetQuietly (line 26) | public void forgetQuietly(Xid xid);
    method start (line 28) | public Transaction start(TransactionContext transactionContext, int fl...

FILE: bytejta-core/src/main/java/org/bytesoft/transaction/TransactionRecovery.java
  type TransactionRecovery (line 20) | public interface TransactionRecovery {
    method reconstruct (line 22) | public Transaction reconstruct(TransactionArchive archive);
    method timingRecover (line 24) | public void timingRecover();
    method startRecovery (line 26) | public void startRecovery();
    method branchRecover (line 28) | public void branchRecover();
    method isInitialized (line 30) | public boolean isInitialized();

FILE: bytejta-core/src/main/java/org/bytesoft/transaction/TransactionRepository.java
  type TransactionRepository (line 22) | public interface TransactionRepository {
    method putTransaction (line 25) | public void putTransaction(TransactionXid xid, Transaction transaction);
    method getTransaction (line 27) | public Transaction getTransaction(TransactionXid xid);
    method removeTransaction (line 29) | public Transaction removeTransaction(TransactionXid xid);
    method putErrorTransaction (line 32) | public void putErrorTransaction(TransactionXid xid, Transaction transa...
    method getErrorTransaction (line 34) | public Transaction getErrorTransaction(TransactionXid xid);
    method removeErrorTransaction (line 36) | public Transaction removeErrorTransaction(TransactionXid xid);
    method getErrorTransactionList (line 38) | public List<Transaction> getErrorTransactionList();
    method getActiveTransactionList (line 40) | public List<Transaction> getActiveTransactionList();

FILE: bytejta-core/src/main/java/org/bytesoft/transaction/adapter/ResourceAdapterImpl.java
  class ResourceAdapterImpl (line 35) | public class ResourceAdapterImpl implements ResourceAdapter {
    method start (line 41) | public void start(BootstrapContext ctx) throws ResourceAdapterInternal...
    method stop (line 57) | public void stop() {
    method endpointActivation (line 68) | public void endpointActivation(MessageEndpointFactory endpointFactory,...
    method endpointDeactivation (line 71) | public void endpointDeactivation(MessageEndpointFactory endpointFactor...
    method getXAResources (line 74) | public XAResource[] getXAResources(ActivationSpec[] specs) throws Reso...
    method getWorkList (line 78) | public List<Work> getWorkList() {
    method setWorkList (line 82) | public void setWorkList(List<Work> workList) {

FILE: bytejta-core/src/main/java/org/bytesoft/transaction/archive/TransactionArchive.java
  class TransactionArchive (line 23) | public class TransactionArchive {
    method getRecoveredTimes (line 39) | public int getRecoveredTimes() {
    method setRecoveredTimes (line 43) | public void setRecoveredTimes(int recoveredTimes) {
    method getRecoveredAt (line 47) | public long getRecoveredAt() {
    method setRecoveredAt (line 51) | public void setRecoveredAt(long recoveredAt) {
    method getEndpoint (line 55) | public String getEndpoint() {
    method setEndpoint (line 59) | public void setEndpoint(String endpoint) {
    method getXid (line 63) | public Xid getXid() {
    method setXid (line 67) | public void setXid(Xid xid) {
    method getStatus (line 71) | public int getStatus() {
    method setStatus (line 75) | public void setStatus(int status) {
    method getVote (line 79) | public int getVote() {
    method setVote (line 83) | public void setVote(int vote) {
    method isCoordinator (line 87) | public boolean isCoordinator() {
    method setCoordinator (line 91) | public void setCoordinator(boolean coordinator) {
    method getPropagatedBy (line 95) | public Object getPropagatedBy() {
    method setPropagatedBy (line 99) | public void setPropagatedBy(Object propagatedBy) {
    method getNativeResources (line 103) | public List<XAResourceArchive> getNativeResources() {
    method getRemoteResources (line 107) | public List<XAResourceArchive> getRemoteResources() {
    method getOptimizedResource (line 111) | public XAResourceArchive getOptimizedResource() {
    method setOptimizedResource (line 115) | public void setOptimizedResource(XAResourceArchive optimizedResource) {
    method getTransactionStrategyType (line 119) | public int getTransactionStrategyType() {
    method setTransactionStrategyType (line 123) | public void setTransactionStrategyType(int transactionStrategyType) {

FILE: bytejta-core/src/main/java/org/bytesoft/transaction/archive/XAResourceArchive.java
  class XAResourceArchive (line 26) | public class XAResourceArchive implements XAResource {
    method commit (line 46) | public void commit(Xid ignore, boolean onePhase) throws XAException {
    method end (line 58) | public void end(Xid ignore, int flags) throws XAException {
    method forget (line 62) | public void forget(Xid ignore) throws XAException {
    method forgetQuietly (line 66) | public void forgetQuietly(Xid ignore) {
    method getTransactionTimeout (line 74) | public int getTransactionTimeout() throws XAException {
    method isSameRM (line 78) | public boolean isSameRM(XAResource xares) throws XAException {
    method prepare (line 87) | public int prepare(Xid ignore) throws XAException {
    method recover (line 96) | public Xid[] recover(int flag) throws XAException {
    method rollback (line 100) | public void rollback(Xid ignore) throws XAException {
    method setTransactionTimeout (line 114) | public boolean setTransactionTimeout(int seconds) throws XAException {
    method start (line 118) | public void start(Xid ignore, int flags) throws XAException {
    method toString (line 122) | public String toString() {
    method getStickiness (line 126) | public XAResourceDescriptor getStickiness() {
    method setStickiness (line 130) | public void setStickiness(XAResourceDescriptor stickiness) {
    method getDescriptor (line 134) | public XAResourceDescriptor getDescriptor() {
    method setDescriptor (line 138) | public void setDescriptor(XAResourceDescriptor descriptor) {
    method isSuspended (line 142) | public boolean isSuspended() {
    method setSuspended (line 146) | public void setSuspended(boolean suspended) {
    method isDelisted (line 150) | public boolean isDelisted() {
    method setDelisted (line 154) | public void setDelisted(boolean delisted) {
    method getXid (line 158) | public Xid getXid() {
    method setXid (line 162) | public void setXid(Xid xid) {
    method getVote (line 166) | public int getVote() {
    method setVote (line 170) | public void setVote(int vote) {
    method isCompleted (line 174) | public boolean isCompleted() {
    method setCompleted (line 178) | public void setCompleted(boolean completed) {
    method isCommitted (line 182) | public boolean isCommitted() {
    method setCommitted (line 186) | public void setCommitted(boolean committed) {
    method isRolledback (line 190) | public boolean isRolledback() {
    method setRolledback (line 194) | public void setRolledback(boolean rolledback) {
    method isReadonly (line 198) | public boolean isReadonly() {
    method setReadonly (line 202) | public void setReadonly(boolean readonly) {
    method isHeuristic (line 206) | public boolean isHeuristic() {
    method setHeuristic (line 210) | public void setHeuristic(boolean heuristic) {
    method isRecovered (line 214) | public boolean isRecovered() {
    method setRecovered (line 218) | public void setRecovered(boolean recovered) {
    method isIdentified (line 222) | public boolean isIdentified() {
    method setIdentified (line 226) | public void setIdentified(boolean identified) {

FILE: bytejta-core/src/main/java/org/bytesoft/transaction/aware/TransactionBeanFactoryAware.java
  type TransactionBeanFactoryAware (line 20) | public interface TransactionBeanFactoryAware {
    method getBeanFactory (line 23) | public TransactionBeanFactory getBeanFactory();
    method setBeanFactory (line 25) | public void setBeanFactory(TransactionBeanFactory tbf);

FILE: bytejta-core/src/main/java/org/bytesoft/transaction/aware/TransactionDebuggable.java
  type TransactionDebuggable (line 18) | public interface TransactionDebuggable {
    method isDebuggingEnabled (line 20) | public boolean isDebuggingEnabled();
    method setDebuggingEnabled (line 22) | public void setDebuggingEnabled(boolean debuggingEnabled);

FILE: bytejta-core/src/main/java/org/bytesoft/transaction/aware/TransactionEndpointAware.java
  type TransactionEndpointAware (line 18) | public interface TransactionEndpointAware {
    method getEndpoint (line 21) | public String getEndpoint();
    method setEndpoint (line 23) | public void setEndpoint(String identifier);

FILE: bytejta-core/src/main/java/org/bytesoft/transaction/cmd/CommandDispatcher.java
  type CommandDispatcher (line 20) | public interface CommandDispatcher {
    method dispatch (line 22) | public Object dispatch(Callable<Object> callable) throws Exception;
    method dispatch (line 24) | public void dispatch(Runnable runnable) throws Exception;

FILE: bytejta-core/src/main/java/org/bytesoft/transaction/internal/SynchronizationImpl.java
  class SynchronizationImpl (line 24) | public class SynchronizationImpl implements Synchronization {
    method SynchronizationImpl (line 31) | public SynchronizationImpl(Synchronization sync) {
    method beforeCompletion (line 41) | public void beforeCompletion() {
    method afterCompletion (line 53) | public void afterCompletion(int status) {
    method toString (line 65) | public String toString() {

FILE: bytejta-core/src/main/java/org/bytesoft/transaction/internal/SynchronizationList.java
  class SynchronizationList (line 26) | public class SynchronizationList implements Synchronization {
    method registerSynchronizationQuietly (line 33) | public void registerSynchronizationQuietly(Synchronization sync) {
    method beforeCompletion (line 38) | public synchronized void beforeCompletion() {
    method afterCompletion (line 54) | public synchronized void afterCompletion(int status) {

FILE: bytejta-core/src/main/java/org/bytesoft/transaction/internal/TransactionListenerList.java
  class TransactionListenerList (line 27) | public class TransactionListenerList extends TransactionListenerAdapter {
    method registerTransactionListener (line 32) | public void registerTransactionListener(TransactionListener listener) {
    method onPrepareStart (line 36) | public void onPrepareStart(TransactionXid xid) {
    method onPrepareSuccess (line 47) | public void onPrepareSuccess(TransactionXid xid) {
    method onPrepareFailure (line 58) | public void onPrepareFailure(TransactionXid xid) {
    method onCommitStart (line 69) | public void onCommitStart(TransactionXid xid) {
    method onCommitSuccess (line 80) | public void onCommitSuccess(TransactionXid xid) {
    method onCommitFailure (line 91) | public void onCommitFailure(TransactionXid xid) {
    method onCommitHeuristicMixed (line 102) | public void onCommitHeuristicMixed(TransactionXid xid) {
    method onCommitHeuristicRolledback (line 113) | public void onCommitHeuristicRolledback(TransactionXid xid) {
    method onRollbackStart (line 124) | public void onRollbackStart(TransactionXid xid) {
    method onRollbackSuccess (line 135) | public void onRollbackSuccess(TransactionXid xid) {
    method onRollbackFailure (line 146) | public void onRollbackFailure(TransactionXid xid) {

FILE: bytejta-core/src/main/java/org/bytesoft/transaction/internal/TransactionResourceListenerList.java
  class TransactionResourceListenerList (line 28) | public class TransactionResourceListenerList implements TransactionResou...
    method registerTransactionResourceListener (line 33) | public void registerTransactionResourceListener(TransactionResourceLis...
    method onEnlistResource (line 37) | public void onEnlistResource(Xid xid, XAResource xares) {
    method onDelistResource (line 48) | public void onDelistResource(Xid xid, XAResource xares) {

FILE: bytejta-core/src/main/java/org/bytesoft/transaction/logging/ArchiveDeserializer.java
  type ArchiveDeserializer (line 20) | public interface ArchiveDeserializer {
    method serialize (line 22) | public byte[] serialize(TransactionXid xid, Object archive);
    method deserialize (line 24) | public Object deserialize(TransactionXid xid, byte[] array);

FILE: bytejta-core/src/main/java/org/bytesoft/transaction/logging/LoggingFlushable.java
  type LoggingFlushable (line 18) | public interface LoggingFlushable {
    method flushImmediately (line 20) | public void flushImmediately();

FILE: bytejta-core/src/main/java/org/bytesoft/transaction/logging/TransactionLogger.java
  type TransactionLogger (line 22) | public interface TransactionLogger {
    method createTransaction (line 25) | public void createTransaction(TransactionArchive archive);
    method updateTransaction (line 27) | public void updateTransaction(TransactionArchive archive);
    method deleteTransaction (line 29) | public void deleteTransaction(TransactionArchive archive);
    method createResource (line 32) | public void createResource(XAResourceArchive archive);
    method updateResource (line 34) | public void updateResource(XAResourceArchive archive);
    method deleteResource (line 36) | public void deleteResource(XAResourceArchive archive);
    method createParticipant (line 39) | public void createParticipant(XAResourceArchive archive);
    method updateParticipant (line 41) | public void updateParticipant(XAResourceArchive archive);
    method deleteParticipant (line 43) | public void deleteParticipant(XAResourceArchive archive);
    method recover (line 46) | public void recover(TransactionRecoveryCallback callback);

FILE: bytejta-core/src/main/java/org/bytesoft/transaction/logging/store/VirtualLoggingKey.java
  class VirtualLoggingKey (line 7) | public class VirtualLoggingKey implements Xid {
    method hashCode (line 13) | public int hashCode() {
    method equals (line 21) | public boolean equals(Object obj) {
    method getFormatId (line 38) | public int getFormatId() {
    method getGlobalTransactionId (line 42) | public byte[] getGlobalTransactionId() {
    method setGlobalTransactionId (line 46) | public void setGlobalTransactionId(byte[] globalTransactionId) {
    method getBranchQualifier (line 50) | public byte[] getBranchQualifier() {
    method setBranchQualifier (line 54) | public void setBranchQualifier(byte[] branchQualifier) {

FILE: bytejta-core/src/main/java/org/bytesoft/transaction/logging/store/VirtualLoggingListener.java
  type VirtualLoggingListener (line 18) | public interface VirtualLoggingListener {
    method recvOperation (line 20) | public void recvOperation(VirtualLoggingRecord action);

FILE: bytejta-core/src/main/java/org/bytesoft/transaction/logging/store/VirtualLoggingRecord.java
  class VirtualLoggingRecord (line 20) | public class VirtualLoggingRecord {
    method getOperator (line 27) | public int getOperator() {
    method setOperator (line 31) | public void setOperator(int operator) {
    method getIdentifier (line 35) | public Xid getIdentifier() {
    method setIdentifier (line 39) | public void setIdentifier(Xid identifier) {
    method getValue (line 43) | public byte[] getValue() {
    method setValue (line 47) | public void setValue(byte[] value) {
    method getContent (line 51) | public byte[] getContent() {
    method setContent (line 55) | public void setContent(byte[] content) {

FILE: bytejta-core/src/main/java/org/bytesoft/transaction/logging/store/VirtualLoggingSystem.java
  type VirtualLoggingSystem (line 20) | public interface VirtualLoggingSystem {
    method create (line 25) | public void create(Xid xid, byte[] byteArray);
    method delete (line 27) | public void delete(Xid xid);
    method modify (line 29) | public void modify(Xid xid, byte[] byteArray);
    method traversal (line 31) | public void traversal(VirtualLoggingListener listener);

FILE: bytejta-core/src/main/java/org/bytesoft/transaction/logging/store/VirtualLoggingTrigger.java
  type VirtualLoggingTrigger (line 18) | public interface VirtualLoggingTrigger {
    method fireSwapImmediately (line 20) | public void fireSwapImmediately();

FILE: bytejta-core/src/main/java/org/bytesoft/transaction/recovery/TransactionRecoveryCallback.java
  type TransactionRecoveryCallback (line 20) | public interface TransactionRecoveryCallback {
    method recover (line 22) | public void recover(TransactionArchive archive);

FILE: bytejta-core/src/main/java/org/bytesoft/transaction/recovery/TransactionRecoveryListener.java
  type TransactionRecoveryListener (line 20) | public interface TransactionRecoveryListener {
    method onRecovery (line 22) | public void onRecovery(Transaction transaction);

FILE: bytejta-core/src/main/java/org/bytesoft/transaction/remote/RemoteAddr.java
  class RemoteAddr (line 22) | public class RemoteAddr implements Serializable {
    method hashCode (line 28) | public int hashCode() {
    method equals (line 35) | public boolean equals(Object obj) {
    method toString (line 47) | public String toString() {
    method getServerHost (line 51) | public String getServerHost() {
    method setServerHost (line 55) | public void setServerHost(String serverHost) {
    method getServerPort (line 59) | public int getServerPort() {
    method setServerPort (line 63) | public void setServerPort(int serverPort) {

FILE: bytejta-core/src/main/java/org/bytesoft/transaction/remote/RemoteCoordinator.java
  type RemoteCoordinator (line 20) | public interface RemoteCoordinator extends TransactionParticipant {
    method getIdentifier (line 22) | public String getIdentifier();
    method getRemoteAddr (line 24) | public RemoteAddr getRemoteAddr();
    method getRemoteNode (line 26) | public RemoteNode getRemoteNode();
    method getApplication (line 28) | public String getApplication();

FILE: bytejta-core/src/main/java/org/bytesoft/transaction/remote/RemoteNode.java
  class RemoteNode (line 20) | public class RemoteNode extends RemoteAddr {
    method hashCode (line 25) | public int hashCode() {
    method equals (line 33) | public boolean equals(Object obj) {
    method toString (line 46) | public String toString() {
    method getServiceKey (line 50) | public String getServiceKey() {
    method setServiceKey (line 54) | public void setServiceKey(String serviceKey) {

FILE: bytejta-core/src/main/java/org/bytesoft/transaction/remote/RemoteSvc.java
  class RemoteSvc (line 20) | public class RemoteSvc extends RemoteAddr {
    method hashCode (line 25) | public int hashCode() {
    method equals (line 31) | public boolean equals(Object obj) {
    method toString (line 41) | public String toString() {
    method getServiceKey (line 45) | public String getServiceKey() {
    method setServiceKey (line 49) | public void setServiceKey(String serviceKey) {

FILE: bytejta-core/src/main/java/org/bytesoft/transaction/resource/XATerminator.java
  type XATerminator (line 22) | public interface XATerminator extends javax.transaction.xa.XAResource {
    method getResourceArchives (line 24) | public List<XAResourceArchive> getResourceArchives();

FILE: bytejta-core/src/main/java/org/bytesoft/transaction/supports/TransactionExtra.java
  type TransactionExtra (line 20) | public interface TransactionExtra {
    method getTransactionXid (line 22) | public TransactionXid getTransactionXid();

FILE: bytejta-core/src/main/java/org/bytesoft/transaction/supports/TransactionListener.java
  type TransactionListener (line 20) | public interface TransactionListener {
    method onPrepareStart (line 22) | public void onPrepareStart(TransactionXid xid);
    method onPrepareSuccess (line 24) | public void onPrepareSuccess(TransactionXid xid);
    method onPrepareFailure (line 26) | public void onPrepareFailure(TransactionXid xid);
    method onCommitStart (line 28) | public void onCommitStart(TransactionXid xid);
    method onCommitSuccess (line 30) | public void onCommitSuccess(TransactionXid xid);
    method onCommitFailure (line 32) | public void onCommitFailure(TransactionXid xid);
    method onCommitHeuristicMixed (line 34) | public void onCommitHeuristicMixed(TransactionXid xid);
    method onCommitHeuristicRolledback (line 36) | public void onCommitHeuristicRolledback(TransactionXid xid);
    method onRollbackStart (line 38) | public void onRollbackStart(TransactionXid xid);
    method onRollbackSuccess (line 40) | public void onRollbackSuccess(TransactionXid xid);
    method onRollbackFailure (line 42) | public void onRollbackFailure(TransactionXid xid);

FILE: bytejta-core/src/main/java/org/bytesoft/transaction/supports/TransactionListenerAdapter.java
  class TransactionListenerAdapter (line 20) | public class TransactionListenerAdapter implements TransactionListener {
    method onPrepareStart (line 22) | public void onPrepareStart(TransactionXid xid) {
    method onPrepareSuccess (line 25) | public void onPrepareSuccess(TransactionXid xid) {
    method onPrepareFailure (line 28) | public void onPrepareFailure(TransactionXid xid) {
    method onCommitStart (line 31) | public void onCommitStart(TransactionXid xid) {
    method onCommitSuccess (line 34) | public void onCommitSuccess(TransactionXid xid) {
    method onCommitFailure (line 37) | public void onCommitFailure(TransactionXid xid) {
    method onCommitHeuristicMixed (line 40) | public void onCommitHeuristicMixed(TransactionXid xid) {
    method onCommitHeuristicRolledback (line 43) | public void onCommitHeuristicRolledback(TransactionXid xid) {
    method onRollbackStart (line 46) | public void onRollbackStart(TransactionXid xid) {
    method onRollbackSuccess (line 49) | public void onRollbackSuccess(TransactionXid xid) {
    method onRollbackFailure (line 52) | public void onRollbackFailure(TransactionXid xid) {

FILE: bytejta-core/src/main/java/org/bytesoft/transaction/supports/TransactionResourceListener.java
  type TransactionResourceListener (line 21) | public interface TransactionResourceListener {
    method onEnlistResource (line 23) | public void onEnlistResource(Xid xid, XAResource xares);
    method onDelistResource (line 25) | public void onDelistResource(Xid xid, XAResource xares);

FILE: bytejta-core/src/main/java/org/bytesoft/transaction/supports/TransactionResourceListenerAdapter.java
  class TransactionResourceListenerAdapter (line 21) | public class TransactionResourceListenerAdapter implements TransactionRe...
    method onEnlistResource (line 23) | public void onEnlistResource(Xid xid, XAResource xares) {
    method onDelistResource (line 26) | public void onDelistResource(Xid xid, XAResource xares) {

FILE: bytejta-core/src/main/java/org/bytesoft/transaction/supports/TransactionStatistic.java
  type TransactionStatistic (line 20) | public interface TransactionStatistic {
    method fireBeginTransaction (line 31) | public void fireBeginTransaction(TransactionImpl transaction);
    method firePreparingTransaction (line 33) | public void firePreparingTransaction(TransactionImpl transaction);
    method firePreparedTransaction (line 35) | public void firePreparedTransaction(TransactionImpl transaction);
    method fireCommittingTransaction (line 37) | public void fireCommittingTransaction(TransactionImpl transaction);
    method fireCommittedTransaction (line 39) | public void fireCommittedTransaction(TransactionImpl transaction);
    method fireRollingBackTransaction (line 41) | public void fireRollingBackTransaction(TransactionImpl transaction);
    method fireRolledbackTransaction (line 43) | public void fireRolledbackTransaction(TransactionImpl transaction);
    method fireCompleteFailure (line 45) | public void fireCompleteFailure(TransactionImpl transaction);
    method fireCleanupTransaction (line 47) | public void fireCleanupTransaction(TransactionImpl transaction);
    method fireRecoverTransaction (line 49) | public void fireRecoverTransaction(TransactionImpl transaction);

FILE: bytejta-core/src/main/java/org/bytesoft/transaction/supports/TransactionTimer.java
  type TransactionTimer (line 20) | public interface TransactionTimer {
    method timingExecution (line 22) | public void timingExecution();
    method stopTiming (line 24) | public void stopTiming(Transaction tx);

FILE: bytejta-core/src/main/java/org/bytesoft/transaction/supports/resource/XAResourceDescriptor.java
  type XAResourceDescriptor (line 21) | public interface XAResourceDescriptor extends XAResource {
    method setIdentifier (line 23) | public void setIdentifier(String identifier);
    method getIdentifier (line 25) | public String getIdentifier();
    method getDelegate (line 27) | public XAResource getDelegate();
    method setTransactionTimeoutQuietly (line 29) | public void setTransactionTimeoutQuietly(int timeout);
    method isTransactionCommitted (line 31) | public boolean isTransactionCommitted(Xid xid) throws IllegalStateExce...

FILE: bytejta-core/src/main/java/org/bytesoft/transaction/supports/rpc/TransactionInterceptor.java
  type TransactionInterceptor (line 18) | public interface TransactionInterceptor {
    method beforeSendRequest (line 20) | public void beforeSendRequest(TransactionRequest request) throws Illeg...
    method beforeSendResponse (line 22) | public void beforeSendResponse(TransactionResponse response) throws Il...
    method afterReceiveRequest (line 24) | public void afterReceiveRequest(TransactionRequest request) throws Ill...
    method afterReceiveResponse (line 26) | public void afterReceiveResponse(TransactionResponse response) throws ...

FILE: bytejta-core/src/main/java/org/bytesoft/transaction/supports/rpc/TransactionRequest.java
  type TransactionRequest (line 21) | public interface TransactionRequest {
    method getTargetTransactionCoordinator (line 23) | public RemoteCoordinator getTargetTransactionCoordinator();
    method getTransactionContext (line 25) | public TransactionContext getTransactionContext();
    method setTransactionContext (line 27) | public void setTransactionContext(TransactionContext transactionContext);
    method getHeader (line 29) | public Object getHeader(String name);
    method setHeader (line 31) | public void setHeader(String name, Object value);

FILE: bytejta-core/src/main/java/org/bytesoft/transaction/supports/rpc/TransactionResponse.java
  type TransactionResponse (line 21) | public interface TransactionResponse {
    method isParticipantStickyRequired (line 23) | public boolean isParticipantStickyRequired();
    method isParticipantRollbackOnly (line 25) | public boolean isParticipantRollbackOnly();
    method getSourceTransactionCoordinator (line 27) | public RemoteCoordinator getSourceTransactionCoordinator();
    method getTransactionContext (line 29) | public TransactionContext getTransactionContext();
    method setTransactionContext (line 31) | public void setTransactionContext(TransactionContext transactionContext);
    method getHeader (line 33) | public Object getHeader(String name);
    method setHeader (line 35) | public void setHeader(String name, Object value);

FILE: bytejta-core/src/main/java/org/bytesoft/transaction/supports/serialize/XAResourceDeserializer.java
  type XAResourceDeserializer (line 20) | public interface XAResourceDeserializer {
    method deserialize (line 22) | public XAResourceDescriptor deserialize(String identifier);

FILE: bytejta-core/src/main/java/org/bytesoft/transaction/work/SimpleWork.java
  class SimpleWork (line 22) | public class SimpleWork implements Runnable {
    method run (line 28) | public void run() {
    method setSource (line 34) | public void setSource(Object source) {
    method setWork (line 38) | public void setWork(Work work) {
    method setWorkListener (line 42) | public void setWorkListener(WorkListener workListener) {

FILE: bytejta-core/src/main/java/org/bytesoft/transaction/work/SimpleWorkListener.java
  class SimpleWorkListener (line 28) | public class SimpleWorkListener implements WorkListener {
    method SimpleWorkListener (line 38) | public SimpleWorkListener(WorkListener workListener) {
    method waitForStart (line 42) | public long waitForStart() {
    method signalStarted (line 58) | public void signalStarted() {
    method workAccepted (line 67) | public void workAccepted(WorkEvent event) {
    method workCompleted (line 74) | public void workCompleted(WorkEvent event) {
    method workRejected (line 80) | public void workRejected(WorkEvent event) {
    method workStarted (line 86) | public void workStarted(WorkEvent event) {

FILE: bytejta-core/src/main/java/org/bytesoft/transaction/work/SimpleWorkManager.java
  class SimpleWorkManager (line 35) | public class SimpleWorkManager implements WorkManager {
    method doWork (line 42) | public void doWork(Work work) throws WorkException {
    method doWork (line 46) | public void doWork(Work work, long startTimeout, ExecutionContext exec...
    method startWork (line 65) | public long startWork(Work work) throws WorkException {
    method startWork (line 69) | public long startWork(Work work, long startTimeout, ExecutionContext e...
    method scheduleWork (line 81) | public void scheduleWork(Work work) throws WorkException {
    method scheduleWork (line 85) | public void scheduleWork(Work work, long startTimeout, ExecutionContex...

FILE: bytejta-core/src/main/java/org/bytesoft/transaction/xa/TransactionXid.java
  class TransactionXid (line 25) | public class TransactionXid implements Xid, Cloneable, Serializable {
    method TransactionXid (line 32) | public TransactionXid() {
    method TransactionXid (line 35) | public TransactionXid(int formatId, byte[] global) {
    method TransactionXid (line 39) | public TransactionXid(int formatId, byte[] global, byte[] branch) {
    method clone (line 63) | public TransactionXid clone() {
    method getFormatId (line 78) | public int getFormatId() {
    method hashCode (line 82) | public int hashCode() {
    method equals (line 90) | public boolean equals(Object obj) {
    method toString (line 109) | public String toString() {
    method getGlobalTransactionId (line 115) | public byte[] getGlobalTransactionId() {
    method setGlobalTransactionId (line 119) | public void setGlobalTransactionId(byte[] globalTransactionId) {
    method getBranchQualifier (line 123) | public byte[] getBranchQualifier() {
    method setBranchQualifier (line 127) | public void setBranchQualifier(byte[] branchQualifier) {
    method setFormatId (line 131) | public void setFormatId(int formatId) {

FILE: bytejta-core/src/main/java/org/bytesoft/transaction/xa/XidFactory.java
  type XidFactory (line 18) | public interface XidFactory {
    method createGlobalXid (line 25) | public TransactionXid createGlobalXid();
    method createGlobalXid (line 27) | public TransactionXid createGlobalXid(byte[] globalTransactionId);
    method createBranchXid (line 29) | public TransactionXid createBranchXid(TransactionXid globalXid);
    method createBranchXid (line 31) | public TransactionXid createBranchXid(TransactionXid globalXid, byte[]...

FILE: bytejta-supports-dubbo/src/main/java/org/bytesoft/bytejta/supports/dubbo/DubboRemoteCoordinator.java
  class DubboRemoteCoordinator (line 35) | public class DubboRemoteCoordinator implements InvocationHandler {
    method invoke (line 47) | public Object invoke(Object proxy, Method method, Object[] args) throw...
    method getParticipantsIdentifier (line 107) | private String getParticipantsIdentifier(Object proxy, Method method, ...
    method getParticipantsApplication (line 123) | private Object getParticipantsApplication(Object proxy, Method method,...
    method invokeForGeneric (line 162) | public Object invokeForGeneric(Object proxy, Method method, Object[] a...
    method invokeForSpecifiedDestination (line 176) | public Object invokeForSpecifiedDestination(Object proxy, Method metho...
    method toString (line 201) | public String toString() {
    method getInvocationContext (line 206) | public RemoteNode getInvocationContext() {
    method setInvocationContext (line 210) | public void setInvocationContext(RemoteNode invocationContext) {
    method getCoordinatorType (line 214) | public int getCoordinatorType() {
    method setCoordinatorType (line 218) | public void setCoordinatorType(int coordinatorType) {
    method getProxyCoordinator (line 222) | public RemoteCoordinator getProxyCoordinator() {
    method setProxyCoordinator (line 226) | public void setProxyCoordinator(RemoteCoordinator proxyCoordinator) {
    method getRemoteCoordinator (line 230) | public RemoteCoordinator getRemoteCoordinator() {
    method setRemoteCoordinator (line 234) | public void setRemoteCoordinator(RemoteCoordinator remoteCoordinator) {

FILE: bytejta-supports-dubbo/src/main/java/org/bytesoft/bytejta/supports/dubbo/InvocationContextRegistry.java
  class InvocationContextRegistry (line 23) | public final class InvocationContextRegistry {
    method InvocationContextRegistry (line 28) | private InvocationContextRegistry() {
    method getInstance (line 34) | public static InvocationContextRegistry getInstance() {
    method associateInvocationContext (line 38) | public void associateInvocationContext(RemoteNode context) {
    method desociateInvocationContext (line 42) | public RemoteNode desociateInvocationContext() {
    method getInvocationContext (line 46) | public RemoteNode getInvocationContext() {

FILE: bytejta-supports-dubbo/src/main/java/org/bytesoft/bytejta/supports/dubbo/TransactionBeanRegistry.java
  class TransactionBeanRegistry (line 35) | public class TransactionBeanRegistry implements TransactionBeanFactoryAw...
    method TransactionBeanRegistry (line 49) | private TransactionBeanRegistry() {
    method getInstance (line 55) | public static TransactionBeanRegistry getInstance() {
    method getConsumeCoordinator (line 59) | public RemoteCoordinator getConsumeCoordinator() {
    method doGetConsumeCoordinator (line 67) | private RemoteCoordinator doGetConsumeCoordinator() {
    method setConsumeCoordinator (line 85) | public void setConsumeCoordinator(RemoteCoordinator consumeCoordinator) {
    method getBean (line 100) | public <T> T getBean(Class<T> requiredType) {
    method setApplicationContext (line 108) | public void setApplicationContext(ApplicationContext applicationContex...
    method getEnvironment (line 112) | public Environment getEnvironment() {
    method setEnvironment (line 116) | public void setEnvironment(Environment environment) {
    method setBeanFactory (line 120) | public void setBeanFactory(TransactionBeanFactory tbf) {
    method getBeanFactory (line 124) | public TransactionBeanFactory getBeanFactory() {

FILE: bytejta-supports-dubbo/src/main/java/org/bytesoft/bytejta/supports/dubbo/config/DubboSupportConfiguration.java
  class DubboSupportConfiguration (line 38) | @PropertySource(value = "bytejta:connector.config", factory = ConnectorR...
    method annotationDrivenTransactionManager (line 49) | public PlatformTransactionManager annotationDrivenTransactionManager() {
    method getEnvironment (line 56) | public Environment getEnvironment() {
    method setEnvironment (line 60) | public void setEnvironment(Environment environment) {
    method getApplicationContext (line 64) | public ApplicationContext getApplicationContext() {
    method setApplicationContext (line 68) | public void setApplicationContext(ApplicationContext applicationContex...

FILE: bytejta-supports-dubbo/src/main/java/org/bytesoft/bytejta/supports/dubbo/ext/ILoadBalancer.java
  type ILoadBalancer (line 26) | @SPI
    method select (line 29) | public <T> Invoker<T> select(List<Invoker<T>> invokers, URL url, Invoc...

FILE: bytejta-supports-dubbo/src/main/java/org/bytesoft/bytejta/supports/dubbo/internal/TransactionBeanConfigValidator.java
  class TransactionBeanConfigValidator (line 39) | public class TransactionBeanConfigValidator implements BeanPostProcessor...
    method postProcessBeforeInitialization (line 42) | public Object postProcessBeforeInitialization(Object bean, String bean...
    method postProcessAfterInitialization (line 46) | public Object postProcessAfterInitialization(Object bean, String beanN...
    method validateProtocolConfig (line 56) | private void validateProtocolConfig(String beanName, ProtocolConfig pr...
    method validateServiceBean (line 67) | private void validateServiceBean(String beanName, ServiceBean<?> servi...
    method validateReferenceConfig (line 99) | private void validateReferenceConfig(String beanName, BeanDefinition b...
    method postProcessBeanFactory (line 164) | public void postProcessBeanFactory(ConfigurableListableBeanFactory bea...

FILE: bytejta-supports-dubbo/src/main/java/org/bytesoft/bytejta/supports/dubbo/internal/TransactionEndpointAutoInjector.java
  class TransactionEndpointAutoInjector (line 36) | public class TransactionEndpointAutoInjector implements InitializingBean...
    method afterPropertiesSet (line 41) | public void afterPropertiesSet() throws Exception {
    method postProcessBeforeInitialization (line 105) | public Object postProcessBeforeInitialization(Object bean, String bean...
    method postProcessAfterInitialization (line 114) | public Object postProcessAfterInitialization(Object bean, String beanN...
    method initializeEndpointIfNecessary (line 123) | private void initializeEndpointIfNecessary(TransactionEndpointAware aw...
    method setApplicationContext (line 159) | public void setApplicationContext(ApplicationContext applicationContex...

FILE: bytejta-supports-dubbo/src/main/java/org/bytesoft/bytejta/supports/dubbo/internal/TransactionParticipantRegistrant.java
  class TransactionParticipantRegistrant (line 37) | public class TransactionParticipantRegistrant
    method afterSingletonsInstantiated (line 44) | public void afterSingletonsInstantiated() {
    method initializeForProvider (line 59) | public void initializeForProvider(RemoteCoordinator reference) throws ...
    method initializeForConsumer (line 121) | public void initializeForConsumer(TransactionBeanRegistry beanRegistry...
    method setBeanFactory (line 167) | public void setBeanFactory(BeanFactory beanFactory) throws BeansExcept...
    method getEndpoint (line 171) | public String getEndpoint() {
    method setEndpoint (line 175) | public void setEndpoint(String identifier) {

FILE: bytejta-supports-dubbo/src/main/java/org/bytesoft/bytejta/supports/dubbo/serialize/XAResourceDeserializerImpl.java
  class XAResourceDeserializerImpl (line 44) | public class XAResourceDeserializerImpl implements XAResourceDeserialize...
    method deserialize (line 51) | public XAResourceDescriptor deserialize(String identifier) {
    method initializePhysicalInstanceIfNecessary (line 86) | private void initializePhysicalInstanceIfNecessary(RemoteAddr remoteAd...
    method processInitPhysicalInstanceIfNecessary (line 102) | private void processInitPhysicalInstanceIfNecessary(RemoteAddr remoteA...
    method initializeRemoteParticipantIfNecessary (line 141) | private void initializeRemoteParticipantIfNecessary(final String syste...
    method processInitRemoteParticipantIfNecessary (line 155) | private void processInitRemoteParticipantIfNecessary(String applicatio...
    method getResourceDeserializer (line 193) | public XAResourceDeserializer getResourceDeserializer() {
    method setResourceDeserializer (line 197) | public void setResourceDeserializer(XAResourceDeserializer resourceDes...
    method setApplicationContext (line 201) | public void setApplicationContext(ApplicationContext applicationContex...
    method getApplicationContext (line 205) | public ApplicationContext getApplicationContext() {

FILE: bytejta-supports-dubbo/src/main/java/org/bytesoft/bytejta/supports/dubbo/spi/TransactionLoadBalance.java
  class TransactionLoadBalance (line 41) | public final class TransactionLoadBalance implements LoadBalance {
    method fireInitializeIfNecessary (line 46) | private void fireInitializeIfNecessary() {
    method initializeIfNecessary (line 52) | private synchronized void initializeIfNecessary() {
    method select (line 61) | public <T> Invoker<T> select(List<Invoker<T>> invokers, URL url, Invoc...
    method selectConfigedInvoker (line 71) | public <T> Invoker<T> selectConfigedInvoker(List<Invoker<T>> invokers,...
    method selectSpecificInvoker (line 127) | public <T> Invoker<T> selectSpecificInvoker(List<Invoker<T>> invokers,...

FILE: bytejta-supports-dubbo/src/main/java/org/bytesoft/bytejta/supports/dubbo/spi/TransactionLoadBalancer.java
  class TransactionLoadBalancer (line 28) | public class TransactionLoadBalancer implements ILoadBalancer {
    method select (line 31) | public <T> Invoker<T> select(List<Invoker<T>> invokers, URL url, Invoc...

FILE: bytejta-supports-dubbo/src/main/java/org/bytesoft/bytejta/supports/dubbo/spi/TransactionServiceFilter.java
  class TransactionServiceFilter (line 73) | public class TransactionServiceFilter implements Filter {
    method invoke (line 82) | public Result invoke(Invoker<?> invoker, Invocation invocation) throws...
    method providerInvoke (line 90) | public Result providerInvoke(Invoker<?> invoker, Invocation invocation...
    method providerInvokeForKey (line 114) | public Result providerInvokeForKey(Invoker<?> invoker, Invocation invo...
    method providerInvokeForJTA (line 134) | public Result providerInvokeForJTA(Invoker<?> invoker, Invocation invo...
    method providerInvokeForSVC (line 201) | public Result providerInvokeForSVC(Invoker<?> invoker, Invocation invo...
    method wrapResultForProvider (line 264) | public Result wrapResultForProvider(Invoker<?> invoker, Invocation inv...
    method convertResultForProvider (line 280) | private Result convertResultForProvider(RpcResult result, String propa...
    method createErrorResultForProvider (line 300) | private Result createErrorResultForProvider(Throwable throwable, Strin...
    method beforeProviderInvokeForSVC (line 320) | private void beforeProviderInvokeForSVC(Invocation invocation, Transac...
    method afterProviderInvokeForSVC (line 356) | private void afterProviderInvokeForSVC(Invocation invocation, Transact...
    method consumerInvoke (line 375) | public Result consumerInvoke(Invoker<?> invoker, Invocation invocation...
    method consumerInvokeForKey (line 399) | public Result consumerInvokeForKey(Invoker<?> invoker, Invocation invo...
    method consumerInvokeForJTA (line 447) | public Result consumerInvokeForJTA(Invoker<?> invoker, Invocation invo...
    method consumerInvokeForSVC (line 472) | public Result consumerInvokeForSVC(Invoker<?> invoker, Invocation invo...
    method getParticipantByRemoteAddr (line 561) | private RemoteCoordinator getParticipantByRemoteAddr(Invoker<?> invoke...
    method beforeConsumerInvokeForSVC (line 594) | private void beforeConsumerInvokeForSVC(Invocation invocation, Transac...
    method afterConsumerInvokeForSVC (line 620) | private void afterConsumerInvokeForSVC(Invocation invocation, Transact...
    method registerRemoteParticipantIfNecessary (line 654) | private void registerRemoteParticipantIfNecessary(String instanceId) {
    method initializePhysicalInstanceIfNecessary (line 666) | private void initializePhysicalInstanceIfNecessary(RemoteAddr remoteAd...
    method processInitPhysicalInstanceIfNecessary (line 684) | private void processInitPhysicalInstanceIfNecessary(RemoteAddr remoteA...
    class InvocationResult (line 723) | static class InvocationResult implements HessianHandle, Serializable {
      method isFailure (line 730) | public boolean isFailure() {
      method getValue (line 734) | public Object getValue() {
      method setValue (line 738) | public void setValue(Object value) {
      method setVariable (line 742) | public void setVariable(String key, Serializable value) {
      method getVariable (line 746) | public Serializable getVariable(String key) {
      method getError (line 750) | public Throwable getError() {
      method setError (line 754) | public void setError(Throwable error) {

FILE: bytejta-supports-springcloud/src/main/java/org/bytesoft/bytejta/supports/springcloud/SpringCloudBeanRegistry.java
  class SpringCloudBeanRegistry (line 35) | public final class SpringCloudBeanRegistry implements TransactionBeanFac...
    method SpringCloudBeanRegistry (line 45) | private SpringCloudBeanRegistry() {
    method getInstance (line 51) | public static SpringCloudBeanRegistry getInstance() {
    method getConsumeCoordinator (line 55) | public RemoteCoordinator getConsumeCoordinator(String identifier) {
    method getLoadBalancerInterceptor (line 96) | public TransactionLoadBalancerInterceptor getLoadBalancerInterceptor() {
    method setLoadBalancerInterceptor (line 100) | public void setLoadBalancerInterceptor(TransactionLoadBalancerIntercep...
    method removeLoadBalancerInterceptor (line 104) | public void removeLoadBalancerInterceptor() {
    method getRestTemplate (line 108) | public RestTemplate getRestTemplate() {
    method setRestTemplate (line 112) | public void setRestTemplate(RestTemplate restTemplate) {
    method setBeanFactory (line 116) | public void setBeanFactory(TransactionBeanFactory tbf) {
    method getBeanFactory (line 120) | public TransactionBeanFactory getBeanFactory() {
    method getEnvironment (line 124) | public Environment getEnvironment() {
    method setEnvironment (line 128) | public void setEnvironment(Environment environment) {

FILE: bytejta-supports-springcloud/src/main/java/org/bytesoft/bytejta/supports/springcloud/SpringCloudCoordinator.java
  class SpringCloudCoordinator (line 45) | public class SpringCloudCoordinator implements InvocationHandler {
    method invoke (line 52) | public Object invoke(Object proxy, Method method, Object[] args) throw...
    method invokeHttpPostRequest (line 96) | public Object invokeHttpPostRequest(Object proxy, Method method, Objec...
    method invokeTransactionRecover (line 160) | public Object invokeTransactionRecover(Object proxy, Method method, Ob...
    method serialize (line 223) | private String serialize(Serializable arg) throws IOException {
    method toString (line 238) | public String toString() {
    method getIdentifier (line 242) | public String getIdentifier() {
    method setIdentifier (line 246) | public void setIdentifier(String identifier) {
    method getEnvironment (line 250) | public Environment getEnvironment() {
    method setEnvironment (line 254) | public void setEnvironment(Environment environment) {

FILE: bytejta-supports-springcloud/src/main/java/org/bytesoft/bytejta/supports/springcloud/SpringCloudEndpointPostProcessor.java
  class SpringCloudEndpointPostProcessor (line 35) | public class SpringCloudEndpointPostProcessor
    method setEnvironment (line 43) | public void setEnvironment(Environment environment) {
    method postProcessBeanFactory (line 47) | public void postProcessBeanFactory(ConfigurableListableBeanFactory bea...
    method getBeanFactory (line 83) | public TransactionBeanFactory getBeanFactory() {
    method setBeanFactory (line 87) | public void setBeanFactory(TransactionBeanFactory beanFactory) {

FILE: bytejta-supports-springcloud/src/main/java/org/bytesoft/bytejta/supports/springcloud/config/SpringCloudConfiguration.java
  class SpringCloudConfiguration (line 79) | @PropertySource(value = "bytejta:loadbalancer.config", factory = Transac...
    method afterSingletonsInstantiated (line 96) | public void afterSingletonsInstantiated() /* Check if the rule is set ...
    method afterPropertiesSet (line 111) | public void afterPropertiesSet() throws Exception {
    method annotationDrivenTransactionManager (line 118) | public PlatformTransactionManager annotationDrivenTransactionManager() {
    method feignPostProcessor (line 126) | @org.springframework.context.annotation.Bean
    method hystrixPostProcessor (line 132) | @org.springframework.context.annotation.Bean
    method transactionFeignInterceptor (line 139) | @org.springframework.context.annotation.Bean
    method feignContract (line 146) | @org.springframework.boot.autoconfigure.condition.ConditionalOnMissing...
    method transactionFeignContract (line 152) | @org.springframework.context.annotation.Primary
    method feignDecoder (line 158) | @org.springframework.boot.autoconfigure.condition.ConditionalOnMissing...
    method transactionFeignDecoder (line 164) | @org.springframework.context.annotation.Primary
    method errorDecoder (line 173) | @org.springframework.boot.autoconfigure.condition.ConditionalOnMissing...
    method transactionErrorDecoder (line 179) | @org.springframework.context.annotation.Primary
    method transactionHandlerInterceptor (line 185) | @org.springframework.context.annotation.Bean
    method transactionRequestInterceptor (line 192) | @org.springframework.context.annotation.Bean
    method defaultRequestFactory (line 199) | @org.springframework.boot.autoconfigure.condition.ConditionalOnMissing...
    method transactionTemplate (line 206) | @org.springframework.context.annotation.Bean("transactionRestTemplate")
    method beanRegistry (line 213) | @DependsOn("transactionRestTemplate")
    method defaultRestTemplate (line 221) | @org.springframework.context.annotation.Primary
    method addInterceptors (line 230) | public void addInterceptors(InterceptorRegistry registry) {
    method postProcessBeanFactory (line 236) | public void postProcessBeanFactory(ConfigurableListableBeanFactory bea...
    method fireAfterPropertiesSet (line 260) | public void fireAfterPropertiesSet() {
    method getEndpoint (line 301) | public String getEndpoint() {
    method setEndpoint (line 305) | public void setEndpoint(String identifier) {
    method setEnvironment (line 309) | public void setEnvironment(Environment environment) {
    method setApplicationContext (line 313) | public void setApplicationContext(ApplicationContext applicationContex...

FILE: bytejta-supports-springcloud/src/main/java/org/bytesoft/bytejta/supports/springcloud/controller/TransactionCoordinatorController.java
  class TransactionCoordinatorController (line 39) | @Controller
    method prepare (line 48) | @RequestMapping(value = "/org/bytesoft/bytejta/prepare/{xid}", method ...
    method commit (line 74) | @RequestMapping(value = "/org/bytesoft/bytejta/commit/{xid}/{opc}", me...
    method rollback (line 98) | @RequestMapping(value = "/org/bytesoft/bytejta/rollback/{xid}", method...
    method recover (line 121) | @RequestMapping(value = "/org/bytesoft/bytejta/recover/{flag}", method...
    method forget (line 142) | @RequestMapping(value = "/org/bytesoft/bytejta/forget/{xid}", method =...
    method getBeanFactory (line 165) | public TransactionBeanFactory getBeanFactory() {
    method setBeanFactory (line 169) | public void setBeanFactory(TransactionBeanFactory tbf) {

FILE: bytejta-supports-springcloud/src/main/java/org/bytesoft/bytejta/supports/springcloud/dbcp/CommonDBCPXADataSourceWrapper.java
  class CommonDBCPXADataSourceWrapper (line 27) | public class CommonDBCPXADataSourceWrapper implements XADataSourceWrapper {
    method wrapDataSource (line 31) | public DataSource wrapDataSource(XADataSource xaDataSource) throws Exc...

FILE: bytejta-supports-springcloud/src/main/java/org/bytesoft/bytejta/supports/springcloud/feign/TransactionClientRegistry.java
  class TransactionClientRegistry (line 21) | public class TransactionClientRegistry {
    method TransactionClientRegistry (line 26) | private TransactionClientRegistry() {
    method getInstance (line 32) | public static TransactionClientRegistry getInstance() {
    method registerClient (line 36) | public void registerClient(String name) {
    method unRegisterClient (line 40) | public void unRegisterClient(String name) {
    method containsClient (line 44) | public boolean containsClient(String name) {

FILE: bytejta-supports-springcloud/src/main/java/org/bytesoft/bytejta/supports/springcloud/feign/TransactionFeignBeanPostProcessor.java
  class TransactionFeignBeanPostProcessor (line 30) | public class TransactionFeignBeanPostProcessor implements BeanPostProces...
    method afterPropertiesSet (line 35) | public void afterPropertiesSet() throws Exception {
    method postProcessBeforeInitialization (line 41) | public Object postProcessBeforeInitialization(Object bean, String bean...
    method postProcessAfterInitialization (line 45) | public Object postProcessAfterInitialization(Object bean, String beanN...
    method createProxiedObject (line 97) | private Object createProxiedObject(Object origin) {

FILE: bytejta-supports-springcloud/src/main/java/org/bytesoft/bytejta/supports/springcloud/feign/TransactionFeignContract.java
  class TransactionFeignContract (line 28) | public class TransactionFeignContract implements feign.Contract, Initial...
    method TransactionFeignContract (line 32) | public TransactionFeignContract() {
    method TransactionFeignContract (line 35) | public TransactionFeignContract(feign.Contract contract) {
    method afterPropertiesSet (line 39) | public void afterPropertiesSet() throws Exception {
    method invokeAfterPropertiesSet (line 45) | public void invokeAfterPropertiesSet() throws Exception {
    method parseAndValidatateMetadata (line 68) | public List<MethodMetadata> parseAndValidatateMetadata(Class<?> target...
    method getDelegate (line 79) | public feign.Contract getDelegate() {
    method setDelegate (line 83) | public void setDelegate(feign.Contract delegate) {
    method setApplicationContext (line 87) | public void setApplicationContext(ApplicationContext applicationContex...

FILE: bytejta-supports-springcloud/src/main/java/org/bytesoft/bytejta/supports/springcloud/feign/TransactionFeignDecoder.java
  class TransactionFeignDecoder (line 46) | public class TransactionFeignDecoder implements feign.codec.Decoder, Ini...
    method TransactionFeignDecoder (line 57) | public TransactionFeignDecoder() {
    method TransactionFeignDecoder (line 60) | public TransactionFeignDecoder(feign.codec.Decoder decoder) {
    method afterPropertiesSet (line 64) | public void afterPropertiesSet() throws Exception {
    method invokeAfterPropertiesSet (line 70) | public void invokeAfterPropertiesSet() throws Exception {
    method decode (line 93) | public Object decode(Response resp, Type type) throws IOException, Dec...
    method getHeaderValue (line 128) | private String getHeaderValue(Request req, String headerName) {
    method getHeaderValue (line 140) | private String getHeaderValue(Response resp, String headerName) {
    method getDelegate (line 152) | public feign.codec.Decoder getDelegate() {
    method setDelegate (line 156) | public void setDelegate(feign.codec.Decoder delegate) {
    method getObjectFactory (line 160) | public ObjectFactory<HttpMessageConverters> getObjectFactory() {
    method setObjectFactory (line 164) | public void setObjectFactory(ObjectFactory<HttpMessageConverters> obje...
    method setApplicationContext (line 168) | public void setApplicationContext(ApplicationContext applicationContex...

FILE: bytejta-supports-springcloud/src/main/java/org/bytesoft/bytejta/supports/springcloud/feign/TransactionFeignErrorDecoder.java
  class TransactionFeignErrorDecoder (line 40) | public class TransactionFeignErrorDecoder implements feign.codec.ErrorDe...
    method TransactionFeignErrorDecoder (line 49) | public TransactionFeignErrorDecoder() {
    method TransactionFeignErrorDecoder (line 52) | public TransactionFeignErrorDecoder(feign.codec.ErrorDecoder decoder) {
    method afterPropertiesSet (line 56) | public void afterPropertiesSet() throws Exception {
    method invokeAfterPropertiesSet (line 62) | public void invokeAfterPropertiesSet() throws Exception {
    method decode (line 85) | public Exception decode(String methodKey, Response resp) {
    method getHeaderValue (line 121) | private String getHeaderValue(Request req, String headerName) {
    method getHeaderValue (line 133) | private String getHeaderValue(Response resp, String headerName) {
    method getDelegate (line 145) | public feign.codec.ErrorDecoder getDelegate() {
    method setDelegate (line 149) | public void setDelegate(feign.codec.ErrorDecoder delegate) {
    method setApplicationContext (line 153) | public void setApplicationContext(ApplicationContext applicationContex...

FILE: bytejta-supports-springcloud/src/main/java/org/bytesoft/bytejta/supports/springcloud/feign/TransactionFeignHandler.java
  class TransactionFeignHandler (line 45) | public class TransactionFeignHandler implements InvocationHandler {
    method invoke (line 50) | public Object invoke(Object proxy, Method method, Object[] args) throw...
    method getDelegate (line 175) | public InvocationHandler getDelegate() {
    method setDelegate (line 179) | public void setDelegate(InvocationHandler delegate) {

FILE: bytejta-supports-springcloud/src/main/java/org/bytesoft/bytejta/supports/springcloud/feign/TransactionFeignInterceptor.java
  class TransactionFeignInterceptor (line 34) | public class TransactionFeignInterceptor
    method apply (line 42) | public void apply(feign.RequestTemplate template) {
    method getEndpoint (line 71) | public String getEndpoint() {
    method setEndpoint (line 75) | public void setEndpoint(String identifier) {
    method getApplicationContext (line 79) | public ApplicationContext getApplicationContext() {
    method setApplicationContext (line 83) | public void setApplicationContext(ApplicationContext applicationContex...

FILE: bytejta-supports-springcloud/src/main/java/org/bytesoft/bytejta/supports/springcloud/hystrix/TransactionHystrixBeanPostProcessor.java
  class TransactionHystrixBeanPostProcessor (line 41) | public class TransactionHystrixBeanPostProcessor implements BeanPostProc...
    method afterPropertiesSet (line 56) | public void afterPropertiesSet() throws Exception {
    method postProcessBeforeInitialization (line 62) | public Object postProcessBeforeInitialization(Object bean, String bean...
    method postProcessAfterInitialization (line 66) | public Object postProcessAfterInitialization(Object bean, String beanN...
    method createProxiedObject (line 116) | @SuppressWarnings("unchecked")

FILE: bytejta-supports-springcloud/src/main/java/org/bytesoft/bytejta/supports/springcloud/hystrix/TransactionHystrixFallbackFactoryHandler.java
  class TransactionHystrixFallbackFactoryHandler (line 24) | public class TransactionHystrixFallbackFactoryHandler implements Invocat...
    method TransactionHystrixFallbackFactoryHandler (line 28) | public TransactionHystrixFallbackFactoryHandler(FallbackFactory<?> fal...
    method invoke (line 33) | public Object invoke(Object proxy, Method method, Object[] args) throw...
    method getFallbackFactory (line 41) | public FallbackFactory<?> getFallbackFactory() {

FILE: bytejta-supports-springcloud/src/main/java/org/bytesoft/bytejta/supports/springcloud/hystrix/TransactionHystrixFallbackHandler.java
  class TransactionHystrixFallbackHandler (line 21) | public class TransactionHystrixFallbackHandler implements InvocationHand...
    method TransactionHystrixFallbackHandler (line 24) | public TransactionHystrixFallbackHandler(Object fallback) {
    method invoke (line 28) | public Object invoke(Object proxy, Method method, Object[] args) throw...
    method getFallback (line 35) | public Object getFallback() {

FILE: bytejta-supports-springcloud/src/main/java/org/bytesoft/bytejta/supports/springcloud/hystrix/TransactionHystrixFeignHandler.java
  class TransactionHystrixFeignHandler (line 28) | public class TransactionHystrixFeignHandler implements InvocationHandler {
    method invoke (line 33) | public Object invoke(Object proxy, Method method, Object[] args) throw...
    method getDelegate (line 59) | public InvocationHandler getDelegate() {
    method setDelegate (line 63) | public void setDelegate(InvocationHandler delegate) {

FILE: bytejta-supports-springcloud/src/main/java/org/bytesoft/bytejta/supports/springcloud/hystrix/TransactionHystrixInvocation.java
  class TransactionHystrixInvocation (line 20) | public class TransactionHystrixInvocation {
    method getThread (line 26) | public Thread getThread() {
    method setThread (line 30) | public void setThread(Thread thread) {
    method getMethod (line 34) | public Method getMethod() {
    method setMethod (line 38) | public void setMethod(Method method) {
    method getArgs (line 42) | public Object[] getArgs() {
    method setArgs (line 46) | public void setArgs(Object[] args) {

FILE: bytejta-supports-springcloud/src/main/java/org/bytesoft/bytejta/supports/springcloud/hystrix/TransactionHystrixInvocationHandler.java
  type TransactionHystrixInvocationHandler (line 18) | public interface TransactionHystrixInvocationHandler {
    method invoke (line 20) | public Object invoke(TransactionHystrixInvocation invocation);

FILE: bytejta-supports-springcloud/src/main/java/org/bytesoft/bytejta/supports/springcloud/hystrix/TransactionHystrixMethodHandler.java
  class TransactionHystrixMethodHandler (line 46) | public class TransactionHystrixMethodHandler implements MethodHandler {
    method TransactionHystrixMethodHandler (line 51) | public TransactionHystrixMethodHandler(Map<Method, MethodHandler> hand...
    method invoke (line 55) | public Object invoke(Object[] argv) throws Throwable {
    method getDispatch (line 188) | public Map<Method, MethodHandler> getDispatch() {

FILE: bytejta-supports-springcloud/src/main/java/org/bytesoft/bytejta/supports/springcloud/loadbalancer/TransactionLoadBalancerInterceptor.java
  type TransactionLoadBalancerInterceptor (line 22) | public interface TransactionLoadBalancerInterceptor {
    method beforeCompletion (line 24) | public List<Server> beforeCompletion(List<Server> servers);
    method afterCompletion (line 26) | public void afterCompletion(Server server);

FILE: bytejta-supports-springcloud/src/main/java/org/bytesoft/bytejta/supports/springcloud/loadbalancer/TransactionLoadBalancerRuleImpl.java
  class TransactionLoadBalancerRuleImpl (line 34) | public class TransactionLoadBalancerRuleImpl extends AbstractLoadBalance...
    method choose (line 42) | public Server choose(Object key) {
    method initWithNiwsConfig (line 95) | public void initWithNiwsConfig(IClientConfig clientConfig) {
    method getClientConfig (line 99) | public IClientConfig getClientConfig() {

FILE: bytejta-supports-springcloud/src/main/java/org/bytesoft/bytejta/supports/springcloud/property/TransactionPropertySource.java
  class TransactionPropertySource (line 25) | public class TransactionPropertySource extends PropertySource<Object> {
    method TransactionPropertySource (line 29) | public TransactionPropertySource(String name, EncodedResource source) {
    method getProperty (line 57) | public Object getProperty(String name) {

FILE: bytejta-supports-springcloud/src/main/java/org/bytesoft/bytejta/supports/springcloud/property/TransactionPropertySourceFactory.java
  class TransactionPropertySourceFactory (line 24) | public class TransactionPropertySourceFactory implements PropertySourceF...
    method createPropertySource (line 26) | public PropertySource<?> createPropertySource(String name, EncodedReso...

FILE: bytejta-supports-springcloud/src/main/java/org/bytesoft/bytejta/supports/springcloud/rule/TransactionRule.java
  type TransactionRule (line 24) | public interface TransactionRule extends IClientConfigAware {
    method chooseServer (line 26) | public Server chooseServer(Object key, List<Server> serverList);
    method chooseServer (line 28) | public Server chooseServer(Object key);
    method getLoadBalancer (line 30) | public ILoadBalancer getLoadBalancer();
    method setLoadBalancer (line 32) | public void setLoadBalancer(ILoadBalancer loadBalancer);

FILE: bytejta-supports-springcloud/src/main/java/org/bytesoft/bytejta/supports/springcloud/rule/TransactionRuleImpl.java
  class TransactionRuleImpl (line 25) | public class TransactionRuleImpl implements TransactionRule {
    method initWithNiwsConfig (line 30) | public void initWithNiwsConfig(IClientConfig clientConfig) {
    method chooseServer (line 34) | public Server chooseServer(Object key, List<Server> serverList) {
    method chooseServer (line 44) | public Server chooseServer(Object key) {
    method getClientConfig (line 57) | public IClientConfig getClientConfig() {
    method getLoadBalancer (line 61) | public ILoadBalancer getLoadBalancer() {
    method setLoadBalancer (line 65) | public void setLoadBalancer(ILoadBalancer loadBalancer) {

FILE: bytejta-supports-springcloud/src/main/java/org/bytesoft/bytejta/supports/springcloud/serialize/XAResourceDeserializerImpl.java
  class XAResourceDeserializerImpl (line 39) | public class XAResourceDeserializerImpl implements XAResourceDeserialize...
    method deserialize (line 47) | public XAResourceDescriptor deserialize(String identifier) {
    method getResourceDeserializer (line 90) | public XAResourceDeserializer getResourceDeserializer() {
    method setResourceDeserializer (line 94) | public void setResourceDeserializer(XAResourceDeserializer resourceDes...
    method setEnvironment (line 98) | public void setEnvironment(Environment environment) {
    method setApplicationContext (line 102) | public void setApplicationContext(ApplicationContext applicationContex...
    method getApplicationContext (line 106) | public ApplicationContext getApplicationContext() {

FILE: bytejta-supports-springcloud/src/main/java/org/bytesoft/bytejta/supports/springcloud/web/TransactionHandlerInterceptor.java
  class TransactionHandlerInterceptor (line 45) | public class TransactionHandlerInterceptor implements HandlerInterceptor...
    method preHandle (line 54) | public boolean preHandle(HttpServletRequest request, HttpServletRespon...
    method postHandle (line 108) | public void postHandle(HttpServletRequest request, HttpServletResponse...
    method afterCompletion (line 112) | public void afterCompletion(HttpServletRequest request, HttpServletRes...
    method getEndpoint (line 152) | public String getEndpoint() {
    method setEndpoint (line 156) | public void setEndpoint(String identifier) {
    method getApplicationContext (line 160) | public ApplicationContext getApplicationContext() {
    method setApplicationContext (line 164) | public void setApplicationContext(ApplicationContext applicationContex...

FILE: bytejta-supports-springcloud/src/main/java/org/bytesoft/bytejta/supports/springcloud/web/TransactionRequestInterceptor.java
  class TransactionRequestInterceptor (line 57) | public class TransactionRequestInterceptor
    method intercept (line 68) | public ClientHttpResponse intercept(final HttpRequest httpRequest, byt...
    method invokeBeforeSendRequest (line 191) | private void invokeBeforeSendRequest(HttpRequest httpRequest, String i...
    method invokeAfterRecvResponse (line 217) | private void invokeAfterRecvResponse(ClientHttpResponse httpResponse, ...
    method getApplicationContext (line 240) | public ApplicationContext getApplicationContext() {
    method setApplicationContext (line 244) | public void setApplicationContext(ApplicationContext applicationContex...
    method getEndpoint (line 248) | public String getEndpoint() {
    method setEndpoint (line 252) | public void setEndpoint(String identifier) {

FILE: bytejta-supports/src/main/java/org/bytesoft/bytejta/supports/boot/jdbc/DataSourceCciBuilder.java
  class DataSourceCciBuilder (line 40) | public class DataSourceCciBuilder<T extends DataSource> {
    method DataSourceCciBuilder (line 46) | private DataSourceCciBuilder(XADataSource xaDataSourceInstance) {
    method create (line 53) | @SuppressWarnings("rawtypes")
    method build (line 58) | @SuppressWarnings("unchecked")
    method validateXADataSourceInstance (line 70) | private void validateXADataSourceInstance() {
    method bind (line 82) | private void bind(DataSource dataSource) {

FILE: bytejta-supports/src/main/java/org/bytesoft/bytejta/supports/boot/jdbc/DataSourceSpiBuilder.java
  class DataSourceSpiBuilder (line 34) | public class DataSourceSpiBuilder<T extends XADataSource> {
    method DataSourceSpiBuilder (line 43) | private DataSourceSpiBuilder(ClassLoader classLoader) {
    method create (line 47) | @SuppressWarnings("rawtypes")
    method create (line 52) | @SuppressWarnings("rawtypes")
    method build (line 57) | @SuppressWarnings("deprecation")
    method bind (line 65) | private void bind(XADataSource result) {
    method type (line 74) | public DataSourceSpiBuilder<?> type(Class<? extends XADataSource> type) {
    method url (line 79) | public DataSourceSpiBuilder<?> url(String url) {
    method username (line 84) | public DataSourceSpiBuilder<?> username(String username) {
    method password (line 89) | public DataSourceSpiBuilder<?> password(String password) {
    method getType (line 94) | private Class<? extends XADataSource> getType() {
    method findType (line 103) | @SuppressWarnings("unchecked")

FILE: bytejta-supports/src/main/java/org/bytesoft/bytejta/supports/internal/RemoteCoordinatorRegistry.java
  class RemoteCoordinatorRegistry (line 28) | public class RemoteCoordinatorRegistry {
    method putInvocationDef (line 41) | public void putInvocationDef(InvocationDef invocationDef, RemoteNode r...
    method getRemoteNodeByInvocationDef (line 45) | public RemoteNode getRemoteNodeByInvocationDef(InvocationDef invocatio...
    method containsInvocationDef (line 49) | public boolean containsInvocationDef(InvocationDef invocationDef) {
    method removetInvocationDef (line 53) | public void removetInvocationDef(InvocationDef invocationDef) {
    method putPhysicalInstance (line 57) | public void putPhysicalInstance(RemoteAddr remoteAddr, RemoteCoordinat...
    method getPhysicalInstance (line 61) | public RemoteCoordinator getPhysicalInstance(RemoteAddr remoteAddr) {
    method containsPhysicalInstance (line 65) | public boolean containsPhysicalInstance(RemoteAddr remoteAddr) {
    method removePhysicalInstance (line 69) | public void removePhysicalInstance(RemoteAddr remoteAddr) {
    method putRemoteNode (line 73) | public void putRemoteNode(RemoteAddr remoteAddr, RemoteNode remoteNode) {
    method getRemoteNode (line 77) | public RemoteNode getRemoteNode(RemoteAddr remoteAddr) {
    method containsRemoteNode (line 81) | public boolean containsRemoteNode(RemoteAddr remoteAddr) {
    method removeRemoteNode (line 85) | public void removeRemoteNode(RemoteAddr remoteAddr) {
    method putParticipant (line 89) | public void putParticipant(String application, RemoteCoordinator parti...
    method containsParticipant (line 93) | public boolean containsParticipant(String application) {
    method getParticipant (line 97) | public RemoteCoordinator getParticipant(String application) {
    method removeParticipant (line 101) | public void removeParticipant(String application) {
    method RemoteCoordinatorRegistry (line 105) | private RemoteCoordinatorRegistry() {
    method getInstance (line 111) | public static RemoteCoordinatorRegistry getInstance() {
    class InvocationDef (line 115) | public static class InvocationDef {
      method hashCode (line 120) | public int hashCode() {
      method equals (line 128) | public boolean equals(Object obj) {
      method getInterfaceClass (line 141) | public Class<?> getInterfaceClass() {
      method setInterfaceClass (line 145) | public void setInterfaceClass(Class<?> interfaceClass) {
      method getMethodName (line 149) | public String getMethodName() {
      method setMethodName (line 153) | public void setMethodName(String methodName) {
      method getParameterTypes (line 157) | public Class<?>[] getParameterTypes() {
      method setParameterTypes (line 161) | public void setParameterTypes(Class<?>[] parameterTypes) {

FILE: bytejta-supports/src/main/java/org/bytesoft/bytejta/supports/internal/TransactionCommandDispatcher.java
  class TransactionCommandDispatcher (line 39) | public class TransactionCommandDispatcher
    method dispatch (line 60) | public void dispatch(Runnable runnable) throws Exception {
    method dispatch (line 71) | public Object dispatch(Callable<Object> callable) throws Exception {
    method checkExecutionPermission (line 83) | private void checkExecutionPermission() {
    method takeLeadership (line 91) | public void takeLeadership(CuratorFramework client) throws Exception {
    method hasLeadership (line 106) | public boolean hasLeadership() {
    method stateChanged (line 114) | public void stateChanged(CuratorFramework client, ConnectionState newS...
    method afterSingletonsInstantiated (line 128) | public void afterSingletonsInstantiated() {
    method createPersistentPathIfNecessary (line 142) | private void createPersistentPathIfNecessary(String path) throws Excep...
    method getWorkDirectory (line 151) | public String getWorkDirectory() {
    method setWorkDirectory (line 155) | public void setWorkDirectory(String workDirectory) {
    class WorkImpl (line 159) | class WorkImpl implements Work {
      method WorkImpl (line 167) | public WorkImpl(Callable<Object> callable) {
      method WorkImpl (line 172) | public WorkImpl(Runnable runnable) {
      method waitForResultIfNecessary (line 177) | public Object waitForResultIfNecessary() throws Exception {
      method waitForResult (line 185) | public Object waitForResult() throws Exception {
      method run (line 204) | public void run() {
      method executeCallable (line 212) | private void executeCallable() {
      method executeRunnable (line 228) | private void executeRunnable() {
      method release (line 236) | public void release() {
      method getResult (line 239) | public Object getResult() {
      method setResult (line 243) | public void setResult(Object result) {
      method getError (line 247) | public Boolean getError() {
      method setError (line 251) | public void setError(Boolean error) {
    method getCuratorFramework (line 257) | public CuratorFramework getCuratorFramework() {
    method setCuratorFramework (line 261) | public void setCuratorFramework(CuratorFramework curatorFramework) {
    method getApplication (line 265) | private String getApplication() {
    method getEndpoint (line 269) | public String getEndpoint() {
    method setEndpoint (line 273) | public void setEndpoint(String identifier) {

FILE: bytejta-supports/src/main/java/org/bytesoft/bytejta/supports/jdbc/LocalXADataSource.java
  class LocalXADataSource (line 35) | public class LocalXADataSource /* extends TransactionListenerAdapter */
    method getConnection (line 45) | public Connection getConnection() throws SQLException {
    method getConnection (line 88) | public Connection getConnection(String username, String password) thro...
    method isWrapperFor (line 131) | public boolean isWrapperFor(Class<?> iface) {
    method unwrap (line 140) | @SuppressWarnings("unchecked")
    method getXAConnection (line 150) | public LocalXAConnection getXAConnection() throws SQLException {
    method getXAConnection (line 157) | public LocalXAConnection getXAConnection(String user, String passwd) t...
    method getParentLogger (line 164) | public Logger getParentLogger() throws SQLFeatureNotSupportedException {
    method setBeanName (line 168) | public void setBeanName(String name) {
    method getLogWriter (line 172) | public PrintWriter getLogWriter() {
    method setLogWriter (line 176) | public void setLogWriter(PrintWriter logWriter) {
    method getLoginTimeout (line 180) | public int getLoginTimeout() {
    method setLoginTimeout (line 184) | public void setLoginTimeout(int loginTimeout) {
    method getDataSource (line 188) | public DataSource getDataSource() {
    method setDataSource (line 192) | public void setDataSource(DataSource dataSource) {
    method getTransactionManager (line 201) | public TransactionManager getTransactionManager() {
    method setTransactionManager (line 205) | public void setTransactionManager(TransactionManager transactionManage...

FILE: bytejta-supports/src/main/java/org/bytesoft/bytejta/supports/jpa/hibernate/HibernateJtaPlatform.java
  class HibernateJtaPlatform (line 22) | public class HibernateJtaPlatform extends AbstractJtaPlatform {
    method locateTransactionManager (line 25) | protected javax.transaction.TransactionManager locateTransactionManage...
    method locateUserTransaction (line 30) | protected javax.transaction.UserTransaction locateUserTransaction() {

FILE: bytejta-supports/src/main/java/org/bytesoft/bytejta/supports/resource/ManagedConnectionFactoryHandler.java
  class ManagedConnectionFactoryHandler (line 28) | public class ManagedConnectionFactoryHandler implements InvocationHandler {
    method ManagedConnectionFactoryHandler (line 33) | public ManagedConnectionFactoryHandler(Object xads) {
    method invoke (line 37) | public Object invoke(Object proxy, Method method, Object[] args) throw...
    method getDelegate (line 111) | public Object getDelegate() {
    method getIdentifier (line 115) | public String getIdentifier() {
    method setIdentifier (line 119) | public void setIdentifier(String identifier) {

FILE: bytejta-supports/src/main/java/org/bytesoft/bytejta/supports/resource/ManagedConnectionHandler.java
  class ManagedConnectionHandler (line 29) | public class ManagedConnectionHandler implements InvocationHandler {
    method ManagedConnectionHandler (line 34) | public ManagedConnectionHandler(Object managed) {
    method invoke (line 38) | public Object invoke(Object proxy, Method method, Object[] args) throw...
    method getIdentifier (line 93) | public String getIdentifier() {
    method setIdentifier (line 97) | public void setIdentifier(String identifier) {

FILE: bytejta-supports/src/main/java/org/bytesoft/bytejta/supports/resource/ManagedXASessionHandler.java
  class ManagedXASessionHandler (line 26) | public class ManagedXASessionHandler implements InvocationHandler {
    method ManagedXASessionHandler (line 31) | public ManagedXASessionHandler(Object managed) {
    method invoke (line 35) | public Object invoke(Object proxy, Method method, Object[] args) throw...
    method getIdentifier (line 62) | public String getIdentifier() {
    method setIdentifier (line 66) | public void setIdentifier(String identifier) {

FILE: bytejta-supports/src/main/java/org/bytesoft/bytejta/supports/resource/jdbc/CallableStatementImpl.java
  class CallableStatementImpl (line 43) | public class CallableStatementImpl implements CallableStatement {
    method unwrap (line 47) | public <T> T unwrap(Class<T> iface) throws SQLException {
    method executeQuery (line 51) | public ResultSet executeQuery(String sql) throws SQLException {
    method executeQuery (line 56) | public ResultSet executeQuery() throws SQLException {
    method registerOutParameter (line 61) | public void registerOutParameter(int parameterIndex, int sqlType) thro...
    method isWrapperFor (line 65) | public boolean isWrapperFor(Class<?> iface) throws SQLException {
    method executeUpdate (line 69) | public int executeUpdate(String sql) throws SQLException {
    method executeUpdate (line 74) | public int executeUpdate() throws SQLException {
    method setNull (line 79) | public void setNull(int parameterIndex, int sqlType) throws SQLExcepti...
    method close (line 83) | public void close() throws SQLException {
    method registerOutParameter (line 87) | public void registerOutParameter(int parameterIndex, int sqlType, int ...
    method getMaxFieldSize (line 91) | public int getMaxFieldSize() throws SQLException {
    method setBoolean (line 95) | public void setBoolean(int parameterIndex, boolean x) throws SQLExcept...
    method setByte (line 99) | public void setByte(int parameterIndex, byte x) throws SQLException {
    method setMaxFieldSize (line 103) | public void setMaxFieldSize(int max) throws SQLException {
    method wasNull (line 107) | public boolean wasNull() throws SQLException {
    method setShort (line 111) | public void setShort(int parameterIndex, short x) throws SQLException {
    method getString (line 115) | public String getString(int parameterIndex) throws SQLException {
    method getMaxRows (line 119) | public int getMaxRows() throws SQLException {
    method setInt (line 123) | public void setInt(int parameterIndex, int x) throws SQLException {
    method setMaxRows (line 127) | public void setMaxRows(int max) throws SQLException {
    method setLong (line 131) | public void setLong(int parameterIndex, long x) throws SQLException {
    method getBoolean (line 135) | public boolean getBoolean(int parameterIndex) throws SQLException {
    method setFloat (line 139) | public void setFloat(int parameterIndex, float x) throws SQLException {
    method setEscapeProcessing (line 143) | public void setEscapeProcessing(boolean enable) throws SQLException {
    method getByte (line 147) | public byte getByte(int parameterIndex) throws SQLException {
    method setDouble (line 151) | public void setDouble(int parameterIndex, double x) throws SQLException {
    method getShort (line 155) | public short getShort(int parameterIndex) throws SQLException {
    method getQueryTimeout (line 159) | public int getQueryTimeout() throws SQLException {
    method setBigDecimal (line 163) | public void setBigDecimal(int parameterIndex, BigDecimal x) throws SQL...
    method getInt (line 167) | public int getInt(int parameterIndex) throws SQLException {
    method setQueryTimeout (line 171) | public void setQueryTimeout(int seconds) throws SQLException {
    method setString (line 175) | public void setString(int parameterIndex, String x) throws SQLException {
    method getLong (line 179) | public long getLong(int parameterIndex) throws SQLException {
    method setBytes (line 183) | public void setBytes(int parameterIndex, byte[] x) throws SQLException {
    method getFloat (line 187) | public float getFloat(int parameterIndex) throws SQLException {
    method cancel (line 191) | public void cancel() throws SQLException {
    method getDouble (line 195) | public double getDouble(int parameterIndex) throws SQLException {
    method setDate (line 199) | public void setDate(int parameterIndex, Date x) throws SQLException {
    method getWarnings (line 203) | public SQLWarning getWarnings() throws SQLException {
    method getBigDecimal (line 207) | @SuppressWarnings("deprecation")
    method setTime (line 212) | public void setTime(int parameterIndex, Time x) throws SQLException {
    method setTimestamp (line 216) | public void setTimestamp(int parameterIndex, Timestamp x) throws SQLEx...
    method clearWarnings (line 220) | public void clearWarnings() throws SQLException {
    method getBytes (line 224) | public byte[] getBytes(int parameterIndex) throws SQLException {
    method setCursorName (line 228) | public void setCursorName(String name) throws SQLException {
    method setAsciiStream (line 232) | public void setAsciiStream(int parameterIndex, InputStream x, int leng...
    method getDate (line 236) | public Date getDate(int parameterIndex) throws SQLException {
    method getTime (line 240) | public Time getTime(int parameterIndex) throws SQLException {
    method setUnicodeStream (line 244) | @SuppressWarnings("deprecation")
    method execute (line 249) | public boolean execute(String sql) throws SQLException {
    method getTimestamp (line 254) | public Timestamp getTimestamp(int parameterIndex) throws SQLException {
    method getObject (line 258) | public Object getObject(int parameterIndex) throws SQLException {
    method setBinaryStream (line 262) | public void setBinaryStream(int parameterIndex, InputStream x, int len...
    method getResultSet (line 266) | public ResultSet getResultSet() throws SQLException {
    method getBigDecimal (line 270) | public BigDecimal getBigDecimal(int parameterIndex) throws SQLException {
    method getUpdateCount (line 274) | public int getUpdateCount() throws SQLException {
    method clearParameters (line 278) | public void clearParameters() throws SQLException {
    method getObject (line 282) | public Object getObject(int parameterIndex, Map<String, Class<?>> map)...
    method getMoreResults (line 286) | public boolean getMoreResults() throws SQLException {
    method setObject (line 290) | public void setObject(int parameterIndex, Object x, int targetSqlType)...
    method setFetchDirection (line 294) | public void setFetchDirection(int direction) throws SQLException {
    method getRef (line 298) | public Ref getRef(int parameterIndex) throws SQLException {
    method setObject (line 302) | public void setObject(int parameterIndex, Object x) throws SQLException {
    method getFetchDirection (line 306) | public int getFetchDirection() throws SQLException {
    method getBlob (line 310) | public Blob getBlob(int parameterIndex) throws SQLException {
    method setFetchSize (line 314) | public void setFetchSize(int rows) throws SQLException {
    method getClob (line 318) | public Clob getClob(int parameterIndex) throws SQLException {
    method getFetchSize (line 322) | public int getFetchSize() throws SQLException {
    method execute (line 326) | public boolean execute() throws SQLException {
    method getArray (line 331) | public Array getArray(int parameterIndex) throws SQLException {
    method getResultSetConcurrency (line 335) | public int getResultSetConcurrency() throws SQLException {
    method getDate (line 339) | public Date getDate(int parameterIndex, Calendar cal) throws SQLExcept...
    method getResultSetType (line 343) | public int getResultSetType() throws SQLException {
    method addBatch (line 347) | public void addBatch(String sql) throws SQLException {
    method addBatch (line 351) | public void addBatch() throws SQLException {
    method setCharacterStream (line 355) | public void setCharacterStream(int parameterIndex, Reader reader, int ...
    method getTime (line 359) | public Time getTime(int parameterIndex, Calendar cal) throws SQLExcept...
    method clearBatch (line 363) | public void clearBatch() throws SQLException {
    method executeBatch (line 367) | public int[] executeBatch() throws SQLException {
    method getTimestamp (line 372) | public Timestamp getTimestamp(int parameterIndex, Calendar cal) throws...
    method setRef (line 376) | public void setRef(int parameterIndex, Ref x) throws SQLException {
    method setBlob (line 380) | public void setBlob(int parameterIndex, Blob x) throws SQLException {
    method registerOutParameter (line 384) | public void registerOutParameter(int parameterIndex, int sqlType, Stri...
    method setClob (line 388) | public void setClob(int parameterIndex, Clob x) throws SQLException {
    method setArray (line 392) | public void setArray(int parameterIndex, Array x) throws SQLException {
    method getConnection (line 396) | public Connection getConnection() throws SQLException {
    method getMetaData (line 400) | public ResultSetMetaData getMetaData() throws SQLException {
    method registerOutParameter (line 404) | public void registerOutParameter(String parameterName, int sqlType) th...
    method setDate (line 408) | public void setDate(int parameterIndex, Date x, Calendar cal) throws S...
    method getMoreResults (line 412) | public boolean getMoreResults(int current) throws SQLException {
    method registerOutParameter (line 416) | public void registerOutParameter(String parameterName, int sqlType, in...
    method setTime (line 420) | public void setTime(int parameterIndex, Time x, Calendar cal) throws S...
    method getGeneratedKeys (line 424) | public ResultSet getGeneratedKeys() throws SQLException {
    method setTimestamp (line 428) | public void setTimestamp(int parameterIndex, Timestamp x, Calendar cal...
    method registerOutParameter (line 432) | public void registerOutParameter(String parameterName, int sqlType, St...
    method executeUpdate (line 436) | public int executeUpdate(String sql, int autoGeneratedKeys) throws SQL...
    method setNull (line 441) | public void setNull(int parameterIndex, int sqlType, String typeName) ...
    method getURL (line 445) | public URL getURL(int parameterIndex) throws SQLException {
    method executeUpdate (line 449) | public int executeUpdate(String sql, int[] columnIndexes) throws SQLEx...
    method setURL (line 454) | public void setURL(int parameterIndex, URL x) throws SQLException {
    method setURL (line 458) | public void setURL(String parameterName, URL val) throws SQLException {
    method getParameterMetaData (line 462) | public ParameterMetaData getParameterMetaData() throws SQLException {
    method setNull (line 466) | public void setNull(String parameterName, int sqlType) throws SQLExcep...
    method setRowId (line 470) | public void setRowId(int parameterIndex, RowId x) throws SQLException {
    method executeUpdate (line 474) | public int executeUpdate(String sql, String[] columnNames) throws SQLE...
    method setBoolean (line 479) | public void setBoolean(String parameterName, boolean x) throws SQLExce...
    method setNString (line 483) | public void setNString(int parameterIndex, String value) throws SQLExc...
    method setByte (line 487) | public void setByte(String parameterName, byte x) throws SQLException {
    method setShort (line 491) | public void setShort(String parameterName, short x) throws SQLException {
    method setNCharacterStream (line 495) | public void setNCharacterStream(int parameterIndex, Reader value, long...
    method execute (line 499) | public boolean execute(String sql, int autoGeneratedKeys) throws SQLEx...
    method setInt (line 504) | public void setInt(String parameterName, int x) throws SQLException {
    method setNClob (line 508) | public void setNClob(int parameterIndex, NClob value) throws SQLExcept...
    method setLong (line 512) | public void setLong(String parameterName, long x) throws SQLException {
    method setFloat (line 516) | public void setFloat(String parameterName, float x) throws SQLException {
    method setClob (line 520) | public void setClob(int parameterIndex, Reader reader, long length) th...
    method setDouble (line 524) | public void setDouble(String parameterName, double x) throws SQLExcept...
    method execute (line 528) | public boolean execute(String sql, int[] columnIndexes) throws SQLExce...
    method setBigDecimal (line 533) | public void setBigDecimal(String parameterName, BigDecimal x) throws S...
    method setBlob (line 537) | public void setBlob(int parameterIndex, InputStream inputStream, long ...
    method setString (line 541) | public void setString(String parameterName, String x) throws SQLExcept...
    method setNClob (line 545) | public void setNClob(int parameterIndex, Reader reader, long length) t...
    method setBytes (line 549) | public void setBytes(String parameterName, byte[] x) throws SQLExcepti...
    method setDate (line 553) | public void setDate(String parameterName, Date x) throws SQLException {
    method execute (line 557) | public boolean execute(String sql, String[] columnNames) throws SQLExc...
    method setSQLXML (line 562) | public void setSQLXML(int parameterIndex, SQLXML xmlObject) throws SQL...
    method setTime (line 566) | public void setTime(String parameterName, Time x) throws SQLException {
    method setTimestamp (line 570) | public void setTimestamp(String parameterName, Timestamp x) throws SQL...
    method setObject (line 574) | public void setObject(int parameterIndex, Object x, int targetSqlType,...
    method setAsciiStream (line 578) | public void setAsciiStream(String parameterName, InputStream x, int le...
    method getResultSetHoldability (line 582) | public int getResultSetHoldability() throws SQLException {
    method isClosed (line 586) | public boolean isClosed() throws SQLException {
    method setBinaryStream (line 590) | public void setBinaryStream(String parameterName, InputStream x, int l...
    method setPoolable (line 594) | public void setPoolable(boolean poolable) throws SQLException {
    method setAsciiStream (line 598) | public void setAsciiStream(int parameterIndex, InputStream x, long len...
    method setObject (line 602) | public void setObject(String parameterName, Object x, int targetSqlTyp...
    method isPoolable (line 606) | public boolean isPoolable() throws SQLException {
    method closeOnCompletion (line 610) | public void closeOnCompletion() throws SQLException {
    method setBinaryStream (line 614) | public void setBinaryStream(int parameterIndex, InputStream x, long le...
    method isCloseOnCompletion (line 618) | public boolean isCloseOnCompletion() throws SQLException {
    method setObject (line 622) | public void setObject(String parameterName, Object x, int targetSqlTyp...
    method setCharacterStream (line 626) | public void setCharacterStream(int parameterIndex, Reader reader, long...
    method getLargeUpdateCount (line 630) | public long getLargeUpdateCount() throws SQLException {
    method setObject (line 634) | public void setObject(String parameterName, Object x) throws SQLExcept...
    method setLargeMaxRows (line 638) | public void setLargeMaxRows(long max) throws SQLException {
    method setAsciiStream (line 642) | public void setAsciiStream(int parameterIndex, InputStream x) throws S...
    method getLargeMaxRows (line 646) | public long getLargeMaxRows() throws SQLException {
    method setBinaryStream (line 650) | public void setBinaryStream(int parameterIndex, InputStream x) throws ...
    method executeLargeBatch (line 654) | public long[] executeLargeBatch() throws SQLException {
    method setCharacterStream (line 659) | public void setCharacterStream(String parameterName, Reader reader, in...
    method setCharacterStream (line 663) | public void setCharacterStream(int parameterIndex, Reader reader) thro...
    method setDate (line 667) | public void setDate(String parameterName, Date x, Calendar cal) throws...
    method setNCharacterStream (line 671) | public void setNCharacterStream(int parameterIndex, Reader value) thro...
    method setTime (line 675) | public void setTime(String parameterName, Time x, Calendar cal) throws...
    method executeLargeUpdate (line 679) | public long executeLargeUpdate(String sql) throws SQLException {
    method setClob (line 684) | public void setClob(int parameterIndex, Reader reader) throws SQLExcep...
    method setTimestamp (line 688) | public void setTimestamp(String parameterName, Timestamp x, Calendar c...
    method executeLargeUpdate (line 692) | public long executeLargeUpdate(String sql, int autoGeneratedKeys) thro...
    method setNull (line 697) | public void setNull(String parameterName, int sqlType, String typeName...
    method setBlob (line 701) | public void setBlob(int parameterIndex, InputStream inputStream) throw...
    method setNClob (line 705) | public void setNClob(int parameterIndex, Reader reader) throws SQLExce...
    method getString (line 709) | public String getString(String parameterName) throws SQLException {
    method executeLargeUpdate (line 713) | public long executeLargeUpdate(String sql, int[] columnIndexes) throws...
    method getBoolean (line 718) | public boolean getBoolean(String parameterName) throws SQLException {
    method setObject (line 722) | public void setObject(int parameterIndex, Object x, SQLType targetSqlT...
    method getByte (line 726) | public byte getByte(String parameterName) throws SQLException {
    method getShort (line 730) | public short getShort(String parameterName) throws SQLException {
    method executeLargeUpdate (line 734) | public long executeLargeUpdate(String sql, String[] columnNames) throw...
    method getInt (line 739) | public int getInt(String parameterName) throws SQLException {
    method getLong (line 743) | public long getLong(String parameterName) throws SQLException {
    method setObject (line 747) | public void setObject(int parameterIndex, Object x, SQLType targetSqlT...
    method getFloat (line 751) | public float getFloat(String parameterName) throws SQLException {
    method executeLargeUpdate (line 755) | public long executeLargeUpdate() throws SQLException {
    method getDouble (line 760) | public double getDouble(String parameterName) throws SQLException {
    method getBytes (line 764) | public byte[] getBytes(String parameterName) throws SQLException {
    method getDate (line 768) | public Date getDate(String parameterName) throws SQLException {
    method getTime (line 772) | public Time getTime(String parameterName) throws SQLException {
    method getTimestamp (line 776) | public Timestamp getTimestamp(String parameterName) throws SQLException {
    method getObject (line 780) | public Object getObject(String parameterName) throws SQLException {
    method getBigDecimal (line 784) | public BigDecimal getBigDecimal(String parameterName) throws SQLExcept...
    method getObject (line 788) | public Object getObject(String parameterName, Map<String, Class<?>> ma...
    method getRef (line 792) | public Ref getRef(String parameterName) throws SQLException {
    method getBlob (line 796) | public Blob getBlob(String parameterName) throws SQLException {
    method getClob (line 800) | public Clob getClob(String parameterName) throws SQLException {
    method getArray (line 804) | public Array getArray(String parameterName) throws SQLException {
    method getDate (line 808) | public Date getDate(String parameterName, Calendar cal) throws SQLExce...
    method getTime (line 812) | public Time getTime(String parameterName, Calendar cal) throws SQLExce...
    method getTimestamp (line 816) | public Timestamp getTimestamp(String parameterName, Calendar cal) thro...
    method getURL (line 820) | public URL getURL(String parameterName) throws SQLException {
    method getRowId (line 824) | public RowId getRowId(int parameterIndex) throws SQLException {
    method getRowId (line 828) | public RowId getRowId(String parameterName) throws SQLException {
    method setRowId (line 832) | public void setRowId(String parameterName, RowId x) throws SQLException {
    method setNString (line 836) | public void setNString(String parameterName, String value) throws SQLE...
    method setNCharacterStream (line 840) | public void setNCharacterStream(String parameterName, Reader value, lo...
    method setNClob (line 844) | public void setNClob(String parameterName, NClob value) throws SQLExce...
    method setClob (line 848) | public void setClob(String parameterName, Reader reader, long length) ...
    method setBlob (line 852) | public void setBlob(String parameterName, InputStream inputStream, lon...
    method setNClob (line 856) | public void setNClob(String parameterName, Reader reader, long length)...
    method getNClob (line 860) | public NClob getNClob(int parameterIndex) throws SQLException {
    method getNClob (line 864) | public NClob getNClob(String parameterName) throws SQLException {
    method setSQLXML (line 868) | public void setSQLXML(String parameterName, SQLXML xmlObject) throws S...
    method getSQLXML (line 872) | public SQLXML getSQLXML(int parameterIndex) throws SQLException {
    method getSQLXML (line 876) | public SQLXML getSQLXML(String parameterName) throws SQLException {
    method getNString (line 880) | public String getNString(int parameterIndex) throws SQLException {
    method getNString (line 884) | public String getNString(String parameterName) throws SQLException {
    method getNCharacterStream (line 888) | public Reader getNCharacterStream(int parameterIndex) throws SQLExcept...
    method getNCharacterStream (line 892) | public Reader getNCharacterStream(String parameterName) throws SQLExce...
    method getCharacterStream (line 896) | public Reader getCharacterStream(int parameterIndex) throws SQLExcepti...
    method getCharacterStream (line 900) | public Reader getCharacterStream(String parameterName) throws SQLExcep...
    method setBlob (line 904) | public void setBlob(String parameterName, Blob x) throws SQLException {
    method setClob (line 908) | public void setClob(String parameterName, Clob x) throws SQLException {
    method setAsciiStream (line 912) | public void setAsciiStream(String parameterName, InputStream x, long l...
    method setBinaryStream (line 916) | public void setBinaryStream(String parameterName, InputStream x, long ...
    method setCharacterStream (line 920) | public void setCharacterStream(String parameterName, Reader reader, lo...
    method setAsciiStream (line 924) | public void setAsciiStream(String parameterName, InputStream x) throws...
    method setBinaryStream (line 928) | public void setBinaryStream(String parameterName, InputStream x) throw...
    method setCharacterStream (line 932) | public void setCharacterStream(String parameterName, Reader reader) th...
    method setNCharacterStream (line 936) | public void setNCharacterStream(String parameterName, Reader value) th...
    method setClob (line 940) | public void setClob(String parameterName, Reader reader) throws SQLExc...
    method setBlob (line 944) | public void setBlob(String parameterName, InputStream inputStream) thr...
    method setNClob (line 948) | public void setNClob(String parameterName, Reader reader) throws SQLEx...
    method getObject (line 952) | public <T> T getObject(int parameterIndex, Class<T> type) throws SQLEx...
    method getObject (line 956) | public <T> T getObject(String parameterName, Class<T> type) throws SQL...
    method setObject (line 960) | public void setObject(String parameterName, Object x, SQLType targetSq...
    method setObject (line 964) | public void setObject(String parameterName, Object x, SQLType targetSq...
    method registerOutParameter (line 968) | public void registerOutParameter(int parameterIndex, SQLType sqlType) ...
    method registerOutParameter (line 972) | public void registerOutParameter(int parameterIndex, SQLType sqlType, ...
    method registerOutParameter (line 976) | public void registerOutParameter(int parameterIndex, SQLType sqlType, ...
    method registerOutParameter (line 980) | public void registerOutParameter(String parameterName, SQLType sqlType...
    method registerOutParameter (line 984) | public void registerOutParameter(String parameterName, SQLType sqlType...
    method registerOutParameter (line 988) | public void registerOutParameter(String parameterName, SQLType sqlType...
    method setConnection (line 992) | public void setConnection(ConnectionImpl connection) {
    method getDelegate (line 996) | public CallableStatement getDelegate() {
    method setDelegate (line 1000) | public void setDelegate(CallableStatement delegate) {

FILE: bytejta-supports/src/main/java/org/bytesoft/bytejta/supports/resource/jdbc/ConnectionImpl.java
  class ConnectionImpl (line 44) | public class ConnectionImpl implements Connection {
    method unwrap (line 49) | public <T> T unwrap(Class<T> iface) throws SQLException {
    method isWrapperFor (line 53) | public boolean isWrapperFor(Class<?> iface) throws SQLException {
    method createStatement (line 57) | public Statement createStatement() throws SQLException {
    method prepareStatement (line 66) | public PreparedStatement prepareStatement(String sql) throws SQLExcept...
    method prepareCall (line 75) | public CallableStatement prepareCall(String sql) throws SQLException {
    method nativeSQL (line 84) | public String nativeSQL(String sql) throws SQLException {
    method setAutoCommit (line 88) | public void setAutoCommit(boolean autoCommit) throws SQLException {
    method getAutoCommit (line 92) | public boolean getAutoCommit() throws SQLException {
    method commit (line 96) | public void commit() throws SQLException {
    method rollback (line 100) | public void rollback() throws SQLException {
    method close (line 104) | public void close() throws SQLException {
    method isClosed (line 109) | public boolean isClosed() throws SQLException {
    method getMetaData (line 113) | public DatabaseMetaData getMetaData() throws SQLException {
    method setReadOnly (line 120) | public void setReadOnly(boolean readOnly) throws SQLException {
    method isReadOnly (line 124) | public boolean isReadOnly() throws SQLException {
    method setCatalog (line 128) | public void setCatalog(String catalog) throws SQLException {
    method getCatalog (line 132) | public String getCatalog() throws SQLException {
    method setTransactionIsolation (line 136) | public void setTransactionIsolation(int level) throws SQLException {
    method getTransactionIsolation (line 140) | public int getTransactionIsolation() throws SQLException {
    method getWarnings (line 144) | public SQLWarning getWarnings() throws SQLException {
    method clearWarnings (line 148) | public void clearWarnings() throws SQLException {
    method createStatement (line 152) | public Statement createStatement(int resultSetType, int resultSetConcu...
    method prepareStatement (line 161) | public PreparedStatement prepareStatement(String sql, int resultSetTyp...
    method prepareCall (line 170) | public CallableStatement prepareCall(String sql, int resultSetType, in...
    method getTypeMap (line 179) | public Map<String, Class<?>> getTypeMap() throws SQLException {
    method setTypeMap (line 183) | public void setTypeMap(Map<String, Class<?>> map) throws SQLException {
    method setHoldability (line 187) | public void setHoldability(int holdability) throws SQLException {
    method getHoldability (line 191) | public int getHoldability() throws SQLException {
    method setSavepoint (line 195) | public Savepoint setSavepoint() throws SQLException {
    method setSavepoint (line 199) | public Savepoint setSavepoint(String name) throws SQLException {
    method rollback (line 203) | public void rollback(Savepoint savepoint) throws SQLException {
    method releaseSavepoint (line 207) | public void releaseSavepoint(Savepoint savepoint) throws SQLException {
    method createStatement (line 211) | public Statement createStatement(int resultSetType, int resultSetConcu...
    method prepareStatement (line 221) | public PreparedStatement prepareStatement(String sql, int resultSetTyp...
    method prepareCall (line 231) | public CallableStatement prepareCall(String sql, int resultSetType, in...
    method prepareStatement (line 241) | public PreparedStatement prepareStatement(String sql, int autoGenerate...
    method prepareStatement (line 250) | public PreparedStatement prepareStatement(String sql, int[] columnInde...
    method prepareStatement (line 259) | public PreparedStatement prepareStatement(String sql, String[] columnN...
    method createClob (line 268) | public Clob createClob() throws SQLException {
    method createBlob (line 272) | public Blob createBlob() throws SQLException {
    method createNClob (line 276) | public NClob createNClob() throws SQLException {
    method createSQLXML (line 280) | public SQLXML createSQLXML() throws SQLException {
    method isValid (line 284) | public boolean isValid(int timeout) throws SQLException {
    method setClientInfo (line 288) | public void setClientInfo(String name, String value) throws SQLClientI...
    method setClientInfo (line 292) | public void setClientInfo(Properties properties) throws SQLClientInfoE...
    method getClientInfo (line 296) | public String getClientInfo(String name) throws SQLException {
    method getClientInfo (line 300) | public Properties getClientInfo() throws SQLException {
    method createArrayOf (line 304) | public Array createArrayOf(String typeName, Object[] elements) throws ...
    method createStruct (line 308) | public Struct createStruct(String typeName, Object[] attributes) throw...
    method setSchema (line 312) | public void setSchema(String schema) throws SQLException {
    method getSchema (line 316) | public String getSchema() throws SQLException {
    method abort (line 320) | public void abort(Executor executor) throws SQLException {
    method setNetworkTimeout (line 324) | public void setNetworkTimeout(Executor executor, int milliseconds) thr...
    method getNetworkTimeout (line 328) | public int getNetworkTimeout() throws SQLException {
    method checkTransactionStatusIfNecessary (line 332) | public void checkTransactionStatusIfNecessary() throws SQLException {
    method getManagedConnection (line 349) | public XAConnectionImpl getManagedConnection() {
    method setManagedConnection (line 353) | public void setManagedConnection(XAConnectionImpl managedConnection) {
    method getDelegate (line 357) | public Connection getDelegate() {
    method setDelegate (line 361) | public void setDelegate(Connection delegate) {

FILE: bytejta-supports/src/main/java/org/bytesoft/bytejta/supports/resource/jdbc/DatabaseMetaDataImpl.java
  class DatabaseMetaDataImpl (line 24) | public class DatabaseMetaDataImpl implements DatabaseMetaData {
    method unwrap (line 28) | public <T> T unwrap(Class<T> iface) throws SQLException {
    method isWrapperFor (line 32) | public boolean isWrapperFor(Class<?> iface) throws SQLException {
    method allProceduresAreCallable (line 36) | public boolean allProceduresAreCallable() throws SQLException {
    method allTablesAreSelectable (line 40) | public boolean allTablesAreSelectable() throws SQLException {
    method getURL (line 44) | public String getURL() throws SQLException {
    method getUserName (line 48) | public String getUserName() throws SQLException {
    method isReadOnly (line 52) | public boolean isReadOnly() throws SQLException {
    method nullsAreSortedHigh (line 56) | public boolean nullsAreSortedHigh() throws SQLException {
    method nullsAreSortedLow (line 60) | public boolean nullsAreSortedLow() throws SQLException {
    method nullsAreSortedAtStart (line 64) | public boolean nullsAreSortedAtStart() throws SQLException {
    method nullsAreSortedAtEnd (line 68) | public boolean nullsAreSortedAtEnd() throws SQLException {
    method getDatabaseProductName (line 72) | public String getDatabaseProductName() throws SQLException {
    method getDatabaseProductVersion (line 76) | public String getDatabaseProductVersion() throws SQLException {
    method getDriverName (line 80) | public String getDriverName() throws SQLException {
    method getDriverVersion (line 84) | public String getDriverVersion() throws SQLException {
    method getDriverMajorVersion (line 88) | public int getDriverMajorVersion() {
    method getDriverMinorVersion (line 92) | public int getDriverMinorVersion() {
    method usesLocalFiles (line 96) | public boolean usesLocalFiles() throws SQLException {
    method usesLocalFilePerTable (line 100) | public boolean usesLocalFilePerTable() throws SQLException {
    method supportsMixedCaseIdentifiers (line 104) | public boolean supportsMixedCaseIdentifiers() throws SQLException {
    method storesUpperCaseIdentifiers (line 108) | public boolean storesUpperCaseIdentifiers() throws SQLException {
    method storesLowerCaseIdentifiers (line 112) | public boolean storesLowerCaseIdentifiers() throws SQLException {
    method storesMixedCaseIdentifiers (line 116) | public boolean storesMixedCaseIdentifiers() throws SQLException {
    method supportsMixedCaseQuotedIdentifiers (line 120) | public boolean supportsMixedCaseQuotedIdentifiers() throws SQLException {
    method storesUpperCaseQuotedIdentifiers (line 124) | public boolean storesUpperCaseQuotedIdentifiers() throws SQLException {
    method storesLowerCaseQuotedIdentifiers (line 128) | public boolean storesLowerCaseQuotedIdentifiers() throws SQLException {
    method storesMixedCaseQuotedIdentifiers (line 132) | public boolean storesMixedCaseQuotedIdentifiers() throws SQLException {
    method getIdentifierQuoteString (line 136) | public String getIdentifierQuoteString() throws SQLException {
    method getSQLKeywords (line 140) | public String getSQLKeywords() throws SQLException {
    method getNumericFunctions (line 144) | public String getNumericFunctions() throws SQLException {
    method getStringFunctions (line 148) | public String getStringFunctions() throws SQLException {
    method getSystemFunctions (line 152) | public String getSystemFunctions() throws SQLException {
    method getTimeDateFunctions (line 156) | public String getTimeDateFunctions() throws SQLException {
    method getSearchStringEscape (line 160) | public String getSearchStringEscape() throws SQLException {
    method getExtraNameCharacters (line 164) | public String getExtraNameCharacters() throws SQLException {
    method supportsAlterTableWithAddColumn (line 168) | public boolean supportsAlterTableWithAddColumn() throws SQLException {
    method supportsAlterTableWithDropColumn (line 172) | public boolean supportsAlterTableWithDropColumn() throws SQLException {
    method supportsColumnAliasing (line 176) | public boolean supportsColumnAliasing() throws SQLException {
    method nullPlusNonNullIsNull (line 180) | public boolean nullPlusNonNullIsNull() throws SQLException {
    method supportsConvert (line 184) | public boolean supportsConvert() throws SQLException {
    method supportsConvert (line 188) | public boolean supportsConvert(int fromType, int toType) throws SQLExc...
    method supportsTableCorrelationNames (line 192) | public boolean supportsTableCorrelationNames() throws SQLException {
    method supportsDifferentTableCorrelationNames (line 196) | public boolean supportsDifferentTableCorrelationNames() throws SQLExce...
    method supportsExpressionsInOrderBy (line 200) | public boolean supportsExpressionsInOrderBy() throws SQLException {
    method supportsOrderByUnrelated (line 204) | public boolean supportsOrderByUnrelated() throws SQLException {
    method supportsGroupBy (line 208) | public boolean supportsGroupBy() throws SQLException {
    method supportsGroupByUnrelated (line 212) | public boolean supportsGroupByUnrelated() throws SQLException {
    method supportsGroupByBeyondSelect (line 216) | public boolean supportsGroupByBeyondSelect() throws SQLException {
    method supportsLikeEscapeClause (line 220) | public boolean supportsLikeEscapeClause() throws SQLException {
    method supportsMultipleResultSets (line 224) | public boolean supportsMultipleResultSets() throws SQLException {
    method supportsMultipleTransactions (line 228) | public boolean supportsMultipleTransactions() throws SQLException {
    method supportsNonNullableColumns (line 232) | public boolean supportsNonNullableColumns() throws SQLException {
    method supportsMinimumSQLGrammar (line 236) | public boolean supportsMinimumSQLGrammar() throws SQLException {
    method supportsCoreSQLGrammar (line 240) | public boolean supportsCoreSQLGrammar() throws SQLException {
    method supportsExtendedSQLGrammar (line 244) | public boolean supportsExtendedSQLGrammar() throws SQLException {
    method supportsANSI92EntryLevelSQL (line 248) | public boolean supportsANSI92EntryLevelSQL() throws SQLException {
    method supportsANSI92IntermediateSQL (line 252) | public boolean supportsANSI92IntermediateSQL() throws SQLException {
    method supportsANSI92FullSQL (line 256) | public boolean supportsANSI92FullSQL() throws SQLException {
    method supportsIntegrityEnhancementFacility (line 260) | public boolean supportsIntegrityEnhancementFacility() throws SQLExcept...
    method supportsOuterJoins (line 264) | public boolean supportsOuterJoins() throws SQLException {
    method supportsFullOuterJoins (line 268) | public boolean supportsFullOuterJoins() throws SQLException {
    method supportsLimitedOuterJoins (line 272) | public boolean supportsLimitedOuterJoins() throws SQLException {
    method getSchemaTerm (line 276) | public String getSchemaTerm() throws SQLException {
    method getProcedureTerm (line 280) | public String getProcedureTerm() throws SQLException {
    method getCatalogTerm (line 284) | public String getCatalogTerm() throws SQLException {
    method isCatalogAtStart (line 288) | public boolean isCatalogAtStart() throws SQLException {
    method getCatalogSeparator (line 292) | public String getCatalogSeparator() throws SQLException {
    method supportsSchemasInDataManipulation (line 296) | public boolean supportsSchemasInDataManipulation() throws SQLException {
    method supportsSchemasInProcedureCalls (line 300) | public boolean supportsSchemasInProcedureCalls() throws SQLException {
    method supportsSchemasInTableDefinitions (line 304) | public boolean supportsSchemasInTableDefinitions() throws SQLException {
    method supportsSchemasInIndexDefinitions (line 308) | public boolean supportsSchemasInIndexDefinitions() throws SQLException {
    method supportsSchemasInPrivilegeDefinitions (line 312) | public boolean supportsSchemasInPrivilegeDefinitions() throws SQLExcep...
    method supportsCatalogsInDataManipulation (line 316) | public boolean supportsCatalogsInDataManipulation() throws SQLException {
    method supportsCatalogsInProcedureCalls (line 320) | public boolean supportsCatalogsInProcedureCalls() throws SQLException {
    method supportsCatalogsInTableDefinitions (line 324) | public boolean supportsCatalogsInTableDefinitions() throws SQLException {
    method supportsCatalogsInIndexDefinitions (line 328) | public boolean supportsCatalogsInIndexDefinitions() throws SQLException {
    method supportsCatalogsInPrivilegeDefinitions (line 332) | public boolean supportsCatalogsInPrivilegeDefinitions() throws SQLExce...
    method supportsPositionedDelete (line 336) | public boolean supportsPositionedDelete() throws SQLException {
    method supportsPositionedUpdate (line 340) | public boolean supportsPositionedUpdate() throws SQLException {
    method supportsSelectForUpdate (line 344) | public boolean supportsSelectForUpdate() throws SQLException {
    method supportsStoredProcedures (line 348) | public boolean supportsStoredProcedures() throws SQLException {
    method supportsSubqueriesInComparisons (line 352) | public boolean supportsSubqueriesInComparisons() throws SQLException {
    method supportsSubqueriesInExists (line 356) | public boolean supportsSubqueriesInExists() throws SQLException {
    method supportsSubqueriesInIns (line 360) | public boolean supportsSubqueriesInIns() throws SQLException {
    method supportsSubqueriesInQuantifieds (line 364) | public boolean supportsSubqueriesInQuantifieds() throws SQLException {
    method supportsCorrelatedSubqueries (line 368) | public boolean supportsCorrelatedSubqueries() throws SQLException {
    method supportsUnion (line 372) | public boolean supportsUnion() throws SQLException {
    method supportsUnionAll (line 376) | public boolean supportsUnionAll() throws SQLException {
    method supportsOpenCursorsAcrossCommit (line 380) | public boolean supportsOpenCursorsAcrossCommit() throws SQLException {
    method supportsOpenCursorsAcrossRollback (line 384) | public boolean supportsOpenCursorsAcrossRollback() throws SQLException {
    method supportsOpenStatementsAcrossCommit (line 388) | public boolean supportsOpenStatementsAcrossCommit() throws SQLException {
    method supportsOpenStatementsAcrossRollback (line 392) | public boolean supportsOpenStatementsAcrossRollback() throws SQLExcept...
    method getMaxBinaryLiteralLength (line 396) | public int getMaxBinaryLiteralLength() throws SQLException {
    method getMaxCharLiteralLength (line 400) | public int getMaxCharLiteralLength() throws SQLException {
    method getMaxColumnNameLength (line 404) | public int getMaxColumnNameLength() throws SQLException {
    method getMaxColumnsInGroupBy (line 408) | public int getMaxColumnsInGroupBy() throws SQLException {
    method getMaxColumnsInIndex (line 412) | public int getMaxColumnsInIndex() throws SQLException {
    method getMaxColumnsInOrderBy (line 416) | public int getMaxColumnsInOrderBy() throws SQLException {
    method getMaxColumnsInSelect (line 420) | public int getMaxColumnsInSelect() throws SQLException {
    method getMaxColumnsInTable (line 424) | public int getMaxColumnsInTable() throws SQLException {
    method getMaxConnections (line 428) | public int getMaxConnections() throws SQLException {
    method getMaxCursorNameLength (line 432) | public int getMaxCursorNameLength() throws SQLException {
    method getMaxIndexLength (line 436) | public int getMaxIndexLength() throws SQLException {
    method getMaxSchemaNameLength (line 440) | public int getMaxSchemaNameLength() throws SQLException {
    method getMaxProcedureNameLength (line 444) | public int getMaxProcedureNameLength() throws SQLException {
    method getMaxCatalogNameLength (line 448) | public int getMaxCatalogNameLength() throws SQLException {
    method getMaxRowSize (line 452) | public int getMaxRowSize() throws SQLException {
    method doesMaxRowSizeIncludeBlobs (line 456) | public boolean doesMaxRowSizeIncludeBlobs() throws SQLException {
    method getMaxStatementLength (line 460) | public int getMaxStatementLength() throws SQLException {
    method getMaxStatements (line 464) | public int getMaxStatements() throws SQLException {
    method getMaxTableNameLength (line 468) | public int getMaxTableNameLength() throws SQLException {
    method getMaxTablesInSelect (line 472) | public int getMaxTablesInSelect() throws SQLException {
    method getMaxUserNameLength (line 476) | public int getMaxUserNameLength() throws SQLException {
    method getDefaultTransactionIsolation (line 480) | public int getDefaultTransactionIsolation() throws SQLException {
    method supportsTransactions (line 484) | public boolean supportsTransactions() throws SQLException {
    method supportsTransactionIsolationLevel (line 488) | public boolean supportsTransactionIsolationLevel(int level) throws SQL...
    method supportsDataDefinitionAndDataManipulationTransactions (line 492) | public boolean supportsDataDefinitionAndDataManipulationTransactions()...
    method supportsDataManipulationTransactionsOnly (line 496) | public boolean supportsDataManipulationTransactionsOnly() throws SQLEx...
    method dataDefinitionCausesTransactionCommit (line 500) | public boolean dataDefinitionCausesTransactionCommit() throws SQLExcep...
    method dataDefinitionIgnoredInTransactions (line 504) | public boolean dataDefinitionIgnoredInTransactions() throws SQLExcepti...
    method getProcedures (line 508) | public ResultSet getProcedures(String catalog, String schemaPattern, S...
    method getProcedureColumns (line 512) | public ResultSet getProcedureColumns(String catalog, String schemaPatt...
    method getTables (line 517) | public ResultSet getTables(String catalog, String schemaPattern, Strin...
    method getSchemas (line 522) | public ResultSet getSchemas() throws SQLException {
    method getCatalogs (line 526) | public ResultSet getCatalogs() throws SQLException {
    method getTableTypes (line 530) | public ResultSet getTableTypes() throws SQLException {
    method getColumns (line 534) | public ResultSet getColumns(String catalog, String schemaPattern, Stri...
    method getColumnPrivileges (line 539) | public ResultSet getColumnPrivileges(String catalog, String schema, St...
    method getTablePrivileges (line 544) | public ResultSet getTablePrivileges(String catalog, String schemaPatte...
    method getBestRowIdentifier (line 548) | public ResultSet getBestRowIdentifier(String catalog, String schema, S...
    method getVersionColumns (line 553) | public ResultSet getVersionColumns(String catalog, String schema, Stri...
    method getPrimaryKeys (line 557) | public ResultSet getPrimaryKeys(String catalog, String schema, String ...
    method getImportedKeys (line 561) | public ResultSet getImportedKeys(String catalog, String schema, String...
    method getExportedKeys (line 565) | public ResultSet getExportedKeys(String catalog, String schema, String...
    method getCrossReference (line 569) | public ResultSet getCrossReference(String parentCatalog, String parent...
    method getTypeInfo (line 575) | public ResultSet getTypeInfo() throws SQLException {
    method getIndexInfo (line 579) | public ResultSet getIndexInfo(String catalog, String schema, String ta...
    method supportsResultSetType (line 584) | public boolean supportsResultSetType(int type) throws SQLException {
    method supportsResultSetConcurrency (line 588) | public boolean supportsResultSetConcurrency(int type, int concurrency)...
    method ownUpdatesAreVisible (line 592) | public boolean ownUpdatesAreVisible(int type) throws SQLException {
    method ownDeletesAreVisible (line 596) | public boolean ownDeletesAreVisible(int type) throws SQLException {
    method ownInsertsAreVisible (line 600) | public boolean ownInsertsAreVisible(int type) throws SQLException {
    method othersUpdatesAreVisible (line 604) | public boolean othersUpdatesAreVisible(int type) throws SQLException {
    method othersDeletesAreVisible (line 608) | public boolean othersDeletesAreVisible(int type) throws SQLException {
    method othersInsertsAreVisible (line 612) | public boolean othersInsertsAreVisible(int type) throws SQLException {
    method updatesAreDetected (line 616) | public boolean updatesAreDetected(int type) throws SQLException {
    method deletesAreDetected (line 620) | public boolean deletesAreDetected(int type) throws SQLException {
    method insertsAreDetected (line 624) | public boolean insertsAreDetected(int type) throws SQLException {
    method supportsBatchUpdates (line 628) | public boolean supportsBatchUpdates() throws SQLException {
    method getUDTs (line 632) | public ResultSet getUDTs(String catalog, String schemaPattern, String ...
    method getConnection (line 636) | public Connection getConnection() throws SQLException {
    method supportsSavepoints (line 640) | public boolean supportsSavepoints() throws SQLException {
    method supportsNamedParameters (line 644) | public boolean supportsNamedParameters() throws SQLException {
    method supportsMultipleOpenResults (line 648) | public boolean supportsMultipleOpenResults() throws SQLException {
    method supportsGetGeneratedKeys (line 652) | public boolean supportsGetGeneratedKeys() throws SQLException {
    method getSuperTypes (line 656) | public ResultSet getSuperTypes(String catalog, String schemaPattern, S...
    method getSuperTables (line 660) | public ResultSet getSuperTables(String catalog, String schemaPattern, ...
    method getAttributes (line 664) | public ResultSet getAttributes(String catalog, String schemaPattern, S...
    method supportsResultSetHoldability (line 669) | public boolean supportsResultSetHoldability(int holdability) throws SQ...
    method getResultSetHoldability (line 673) | public int getResultSetHoldability() throws SQLException {
    method getDatabaseMajorVersion (line 677) | public int getDatabaseMajorVersion() throws SQLException {
    method getDatabaseMinorVersion (line 681) | public int getDatabaseMinorVersion() throws SQLException {
    method getJDBCMajorVersion (line 685) | public int getJDBCMajorVersion() throws SQLException {
    method getJDBCMinorVersion (line 689) | public int getJDBCMinorVersion() throws SQLException {
    method getSQLStateType (line 693) | public int getSQLStateType() 
Condensed preview — 175 files, each showing path, character count, and a content snippet. Download the .json file or copy for the full structured content (958K chars).
[
  {
    "path": ".github/FUNDING.yml",
    "chars": 924,
    "preview": "# These are supported funding model platforms\n\ngithub: # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [u"
  },
  {
    "path": ".gitignore",
    "chars": 640,
    "preview": "*.class\n\n# Mobile Tools for Java (J2ME)\n.mtj.tmp/\n\n# Package Files #\n*.jar\n*.war\n*.ear\n\n# virtual machine crash logs, se"
  },
  {
    "path": "LICENSE",
    "chars": 7652,
    "preview": "                   GNU LESSER GENERAL PUBLIC LICENSE\n                       Version 3, 29 June 2007\n\n Copyright (C) 2007"
  },
  {
    "path": "README-zh.md",
    "chars": 443,
    "preview": "ByteJTA是一个基于XA/2PC机制的分布式事务管理器。实现了JTA接口,可以很好的与EJB、Spring等容器(本文档下文说明中将以Spring容器为例)进行集成。\n\n## 一、文档 & 样例\n* 使用文档: https://git"
  },
  {
    "path": "README.md",
    "chars": 1295,
    "preview": "\n**ByteJTA** is an implementation of Distributed Transaction Manager, based on the XA/2PC mechanism. \n\n**ByteJTA** is c"
  },
  {
    "path": "bytejta-core/pom.xml",
    "chars": 1829,
    "preview": "<project xmlns=\"http://maven.apache.org/POM/4.0.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\n\txsi:schemaLoca"
  },
  {
    "path": "bytejta-core/src/main/java/org/bytesoft/bytejta/TransactionBeanFactoryImpl.java",
    "chars": 4674,
    "preview": "/**\n * Copyright 2014-2016 yangming.liu<bytefox@126.com>.\n *\n * This copyrighted material is made available to anyone wi"
  },
  {
    "path": "bytejta-core/src/main/java/org/bytesoft/bytejta/TransactionCoordinator.java",
    "chars": 19479,
    "preview": "/**\r\n * Copyright 2014-2016 yangming.liu<bytefox@126.com>.\r\n *\r\n * This copyrighted material is made available to anyone"
  },
  {
    "path": "bytejta-core/src/main/java/org/bytesoft/bytejta/TransactionImpl.java",
    "chars": 66565,
    "preview": "/**\n * Copyright 2014-2016 yangming.liu<bytefox@126.com>.\n *\n * This copyrighted material is made available to anyone wi"
  },
  {
    "path": "bytejta-core/src/main/java/org/bytesoft/bytejta/TransactionManagerImpl.java",
    "chars": 14844,
    "preview": "/**\n * Copyright 2014-2016 yangming.liu<bytefox@126.com>.\n *\n * This copyrighted material is made available to anyone wi"
  },
  {
    "path": "bytejta-core/src/main/java/org/bytesoft/bytejta/TransactionRecoveryImpl.java",
    "chars": 11392,
    "preview": "/**\n * Copyright 2014-2016 yangming.liu<bytefox@126.com>.\n *\n * This copyrighted material is made available to anyone wi"
  },
  {
    "path": "bytejta-core/src/main/java/org/bytesoft/bytejta/TransactionRepositoryImpl.java",
    "chars": 2305,
    "preview": "/**\n * Copyright 2014-2016 yangming.liu<bytefox@126.com>.\n *\n * This copyrighted material is made available to anyone wi"
  },
  {
    "path": "bytejta-core/src/main/java/org/bytesoft/bytejta/TransactionStrategy.java",
    "chars": 1732,
    "preview": "/**\n * Copyright 2014-2017 yangming.liu<bytefox@126.com>.\n *\n * This copyrighted material is made available to anyone wi"
  },
  {
    "path": "bytejta-core/src/main/java/org/bytesoft/bytejta/UserTransactionImpl.java",
    "chars": 2561,
    "preview": "/**\n * Copyright 2014-2016 yangming.liu<bytefox@126.com>.\n *\n * This copyrighted material is made available to anyone wi"
  },
  {
    "path": "bytejta-core/src/main/java/org/bytesoft/bytejta/VacantTransactionLock.java",
    "chars": 1102,
    "preview": "/**\n * Copyright 2014-2017 yangming.liu<bytefox@126.com>.\n *\n * This copyrighted material is made available to anyone wi"
  },
  {
    "path": "bytejta-core/src/main/java/org/bytesoft/bytejta/logging/ArchiveDeserializerImpl.java",
    "chars": 3251,
    "preview": "/**\n * Copyright 2014-2016 yangming.liu<bytefox@126.com>.\n *\n * This copyrighted material is made available to anyone wi"
  },
  {
    "path": "bytejta-core/src/main/java/org/bytesoft/bytejta/logging/SampleTransactionLogger.java",
    "chars": 13354,
    "preview": "/**\n * Copyright 2014-2016 yangming.liu<bytefox@126.com>.\n *\n * This copyrighted material is made available to anyone wi"
  },
  {
    "path": "bytejta-core/src/main/java/org/bytesoft/bytejta/logging/deserializer/TransactionArchiveDeserializer.java",
    "chars": 10135,
    "preview": "/**\n * Copyright 2014-2016 yangming.liu<bytefox@126.com>.\n *\n * This copyrighted material is made available to anyone wi"
  },
  {
    "path": "bytejta-core/src/main/java/org/bytesoft/bytejta/logging/deserializer/XAResourceArchiveDeserializer.java",
    "chars": 6143,
    "preview": "/**\n * Copyright 2014-2016 yangming.liu<bytefox@126.com>.\n *\n * This copyrighted material is made available to anyone wi"
  },
  {
    "path": "bytejta-core/src/main/java/org/bytesoft/bytejta/logging/store/VirtualLoggingFile.java",
    "chars": 9206,
    "preview": "/**\n * Copyright 2014-2016 yangming.liu<bytefox@126.com>.\n *\n * This copyrighted material is made available to anyone wi"
  },
  {
    "path": "bytejta-core/src/main/java/org/bytesoft/bytejta/logging/store/VirtualLoggingSystemImpl.java",
    "chars": 13804,
    "preview": "/**\n * Copyright 2014-2016 yangming.liu<bytefox@126.com>.\n *\n * This copyrighted material is made available to anyone wi"
  },
  {
    "path": "bytejta-core/src/main/java/org/bytesoft/bytejta/resource/XATerminatorImpl.java",
    "chars": 22593,
    "preview": "/**\n * Copyright 2014-2016 yangming.liu<bytefox@126.com>.\n *\n * This copyrighted material is made available to anyone wi"
  },
  {
    "path": "bytejta-core/src/main/java/org/bytesoft/bytejta/resource/XATerminatorOptd.java",
    "chars": 21722,
    "preview": "/**\n * Copyright 2014-2016 yangming.liu<bytefox@126.com>.\n *\n * This copyrighted material is made available to anyone wi"
  },
  {
    "path": "bytejta-core/src/main/java/org/bytesoft/bytejta/strategy/CommonTransactionStrategy.java",
    "chars": 6751,
    "preview": "/**\n * Copyright 2014-2017 yangming.liu<bytefox@126.com>.\n *\n * This copyrighted material is made available to anyone wi"
  },
  {
    "path": "bytejta-core/src/main/java/org/bytesoft/bytejta/strategy/LastResourceOptimizeStrategy.java",
    "chars": 5846,
    "preview": "/**\n * Copyright 2014-2017 yangming.liu<bytefox@126.com>.\n *\n * This copyrighted material is made available to anyone wi"
  },
  {
    "path": "bytejta-core/src/main/java/org/bytesoft/bytejta/strategy/SimpleTransactionStrategy.java",
    "chars": 3450,
    "preview": "/**\n * Copyright 2014-2017 yangming.liu<bytefox@126.com>.\n *\n * This copyrighted material is made available to anyone wi"
  },
  {
    "path": "bytejta-core/src/main/java/org/bytesoft/bytejta/strategy/VacantTransactionStrategy.java",
    "chars": 1686,
    "preview": "/**\n * Copyright 2014-2017 yangming.liu<bytefox@126.com>.\n *\n * This copyrighted material is made available to anyone wi"
  },
  {
    "path": "bytejta-core/src/main/java/org/bytesoft/bytejta/supports/jdbc/DataSourceHolder.java",
    "chars": 864,
    "preview": "/**\n * Copyright 2014-2016 yangming.liu<bytefox@126.com>.\n *\n * This copyrighted material is made available to anyone wi"
  },
  {
    "path": "bytejta-core/src/main/java/org/bytesoft/bytejta/supports/jdbc/LocalXACompatible.java",
    "chars": 839,
    "preview": "/**\n * Copyright 2014-2017 yangming.liu<bytefox@126.com>.\n *\n * This copyrighted material is made available to anyone wi"
  },
  {
    "path": "bytejta-core/src/main/java/org/bytesoft/bytejta/supports/jdbc/LocalXAConnection.java",
    "chars": 5546,
    "preview": "/**\n * Copyright 2014-2016 yangming.liu<bytefox@126.com>.\n *\n * This copyrighted material is made available to anyone wi"
  },
  {
    "path": "bytejta-core/src/main/java/org/bytesoft/bytejta/supports/jdbc/LocalXAResource.java",
    "chars": 13616,
    "preview": "/**\n * Copyright 2014-2016 yangming.liu<bytefox@126.com>.\n *\n * This copyrighted material is made available to anyone wi"
  },
  {
    "path": "bytejta-core/src/main/java/org/bytesoft/bytejta/supports/jdbc/LogicalConnection.java",
    "chars": 10916,
    "preview": "/**\n * Copyright 2014-2016 yangming.liu<bytefox@126.com>.\n *\n * This copyrighted material is made available to anyone wi"
  },
  {
    "path": "bytejta-core/src/main/java/org/bytesoft/bytejta/supports/jdbc/RecoveredResource.java",
    "chars": 7863,
    "preview": "/**\n * Copyright 2014-2016 yangming.liu<bytefox@126.com>.\n *\n * This copyrighted material is made available to anyone wi"
  },
  {
    "path": "bytejta-core/src/main/java/org/bytesoft/bytejta/supports/resource/CommonResourceDescriptor.java",
    "chars": 5081,
    "preview": "/**\n * Copyright 2014-2016 yangming.liu<bytefox@126.com>.\n *\n * This copyrighted material is made available to anyone wi"
  },
  {
    "path": "bytejta-core/src/main/java/org/bytesoft/bytejta/supports/resource/LocalXAResourceDescriptor.java",
    "chars": 4353,
    "preview": "/**\n * Copyright 2014-2016 yangming.liu<bytefox@126.com>.\n *\n * This copyrighted material is made available to anyone wi"
  },
  {
    "path": "bytejta-core/src/main/java/org/bytesoft/bytejta/supports/resource/RemoteResourceDescriptor.java",
    "chars": 3915,
    "preview": "/**\n * Copyright 2014-2016 yangming.liu<bytefox@126.com>.\n *\n * This copyrighted material is made available to anyone wi"
  },
  {
    "path": "bytejta-core/src/main/java/org/bytesoft/bytejta/supports/resource/UnidentifiedResourceDescriptor.java",
    "chars": 3202,
    "preview": "/**\n * Copyright 2014-2016 yangming.liu<bytefox@126.com>.\n *\n * This copyrighted material is made available to anyone wi"
  },
  {
    "path": "bytejta-core/src/main/java/org/bytesoft/bytejta/work/TransactionWork.java",
    "chars": 4221,
    "preview": "/**\n * Copyright 2014-2016 yangming.liu<bytefox@126.com>.\n *\n * This copyrighted material is made available to anyone wi"
  },
  {
    "path": "bytejta-core/src/main/java/org/bytesoft/bytejta/xa/XidFactoryImpl.java",
    "chars": 7081,
    "preview": "/**\n * Copyright 2014-2016 yangming.liu<bytefox@126.com>.\n *\n * This copyrighted material is made available to anyone wi"
  },
  {
    "path": "bytejta-core/src/main/java/org/bytesoft/common/utils/ByteUtils.java",
    "chars": 4887,
    "preview": "/**\n * Copyright 2014-2016 yangming.liu<bytefox@126.com>.\n *\n * This copyrighted material is made available to anyone wi"
  },
  {
    "path": "bytejta-core/src/main/java/org/bytesoft/common/utils/CommonUtils.java",
    "chars": 7250,
    "preview": "/**\n * Copyright 2014-2016 yangming.liu<bytefox@126.com>.\n *\n * This copyrighted material is made available to anyone wi"
  },
  {
    "path": "bytejta-core/src/main/java/org/bytesoft/common/utils/SerializeUtils.java",
    "chars": 10404,
    "preview": "/**\n * Copyright 2014-2018 yangming.liu<bytefox@126.com>.\n *\n * This copyrighted material is made available to anyone wi"
  },
  {
    "path": "bytejta-core/src/main/java/org/bytesoft/transaction/CommitRequiredException.java",
    "chars": 1087,
    "preview": "/**\n * Copyright 2014-2016 yangming.liu<bytefox@126.com>.\n *\n * This copyrighted material is made available to anyone wi"
  },
  {
    "path": "bytejta-core/src/main/java/org/bytesoft/transaction/RemoteSystemException.java",
    "chars": 1435,
    "preview": "/**\n * Copyright 2014-2016 yangming.liu<bytefox@126.com>.\n *\n * This copyrighted material is made available to anyone wi"
  },
  {
    "path": "bytejta-core/src/main/java/org/bytesoft/transaction/RollbackRequiredException.java",
    "chars": 1095,
    "preview": "/**\n * Copyright 2014-2016 yangming.liu<bytefox@126.com>.\n *\n * This copyrighted material is made available to anyone wi"
  },
  {
    "path": "bytejta-core/src/main/java/org/bytesoft/transaction/Transaction.java",
    "chars": 3430,
    "preview": "/**\r\n * Copyright 2014-2016 yangming.liu<liuyangming@gmail.com>.\r\n *\r\n * This copyrighted material is made available to "
  },
  {
    "path": "bytejta-core/src/main/java/org/bytesoft/transaction/TransactionBeanFactory.java",
    "chars": 1795,
    "preview": "/**\r\n * Copyright 2014-2016 yangming.liu<bytefox@126.com>.\r\n *\r\n * This copyrighted material is made available to anyone"
  },
  {
    "path": "bytejta-core/src/main/java/org/bytesoft/transaction/TransactionContext.java",
    "chars": 3073,
    "preview": "/**\n * Copyright 2014-2016 yangming.liu<bytefox@126.com>.\n *\n * This copyrighted material is made available to anyone wi"
  },
  {
    "path": "bytejta-core/src/main/java/org/bytesoft/transaction/TransactionException.java",
    "chars": 997,
    "preview": "/**\n * Copyright 2014-2018 yangming.liu<bytefox@126.com>.\n *\n * This copyrighted material is made available to anyone wi"
  },
  {
    "path": "bytejta-core/src/main/java/org/bytesoft/transaction/TransactionLock.java",
    "chars": 1005,
    "preview": "/**\n * Copyright 2014-2017 yangming.liu<bytefox@126.com>.\n *\n * This copyrighted material is made available to anyone wi"
  },
  {
    "path": "bytejta-core/src/main/java/org/bytesoft/transaction/TransactionManager.java",
    "chars": 1361,
    "preview": "/**\r\n * Copyright 2014-2016 yangming.liu<liuyangming@gmail.com>.\r\n *\r\n * This copyrighted material is made available to "
  },
  {
    "path": "bytejta-core/src/main/java/org/bytesoft/transaction/TransactionParticipant.java",
    "chars": 1157,
    "preview": "/**\n * Copyright 2014-2018 yangming.liu<bytefox@126.com>.\n *\n * This copyrighted material is made available to anyone wi"
  },
  {
    "path": "bytejta-core/src/main/java/org/bytesoft/transaction/TransactionRecovery.java",
    "chars": 1040,
    "preview": "/**\n * Copyright 2014-2016 yangming.liu<bytefox@126.com>.\n *\n * This copyrighted material is made available to anyone wi"
  },
  {
    "path": "bytejta-core/src/main/java/org/bytesoft/transaction/TransactionRepository.java",
    "chars": 1483,
    "preview": "/**\r\n * Copyright 2014-2016 yangming.liu<bytefox@126.com>.\r\n *\r\n * This copyrighted material is made available to anyone"
  },
  {
    "path": "bytejta-core/src/main/java/org/bytesoft/transaction/adapter/ResourceAdapterImpl.java",
    "chars": 2800,
    "preview": "/**\n * Copyright 2014-2016 yangming.liu<bytefox@126.com>.\n *\n * This copyrighted material is made available to anyone wi"
  },
  {
    "path": "bytejta-core/src/main/java/org/bytesoft/transaction/archive/TransactionArchive.java",
    "chars": 2994,
    "preview": "/**\n * Copyright 2014-2016 yangming.liu<bytefox@126.com>.\n *\n * This copyrighted material is made available to anyone wi"
  },
  {
    "path": "bytejta-core/src/main/java/org/bytesoft/transaction/archive/XAResourceArchive.java",
    "chars": 5294,
    "preview": "/**\n * Copyright 2014-2016 yangming.liu<bytefox@126.com>.\n *\n * This copyrighted material is made available to anyone wi"
  },
  {
    "path": "bytejta-core/src/main/java/org/bytesoft/transaction/aware/TransactionBeanFactoryAware.java",
    "chars": 1065,
    "preview": "/**\r\n * Copyright 2014-2016 yangming.liu<bytefox@126.com>.\r\n *\r\n * This copyrighted material is made available to anyone"
  },
  {
    "path": "bytejta-core/src/main/java/org/bytesoft/transaction/aware/TransactionDebuggable.java",
    "chars": 898,
    "preview": "/**\n * Copyright 2014-2016 yangming.liu<bytefox@126.com>.\n *\n * This copyrighted material is made available to anyone wi"
  },
  {
    "path": "bytejta-core/src/main/java/org/bytesoft/transaction/aware/TransactionEndpointAware.java",
    "chars": 939,
    "preview": "/**\n * Copyright 2014-2016 yangming.liu<bytefox@126.com>.\n *\n * This copyrighted material is made available to anyone wi"
  },
  {
    "path": "bytejta-core/src/main/java/org/bytesoft/transaction/cmd/CommandDispatcher.java",
    "chars": 961,
    "preview": "/**\n * Copyright 2014-2018 yangming.liu<bytefox@126.com>.\n *\n * This copyrighted material is made available to anyone wi"
  },
  {
    "path": "bytejta-core/src/main/java/org/bytesoft/transaction/internal/SynchronizationImpl.java",
    "chars": 1909,
    "preview": "/**\n * Copyright 2014-2016 yangming.liu<bytefox@126.com>.\n *\n * This copyrighted material is made available to anyone wi"
  },
  {
    "path": "bytejta-core/src/main/java/org/bytesoft/transaction/internal/SynchronizationList.java",
    "chars": 2449,
    "preview": "/**\n * Copyright 2014-2016 yangming.liu<bytefox@126.com>.\n *\n * This copyrighted material is made available to anyone wi"
  },
  {
    "path": "bytejta-core/src/main/java/org/bytesoft/transaction/internal/TransactionListenerList.java",
    "chars": 4702,
    "preview": "/**\n * Copyright 2014-2016 yangming.liu<bytefox@126.com>.\n *\n * This copyrighted material is made available to anyone wi"
  },
  {
    "path": "bytejta-core/src/main/java/org/bytesoft/transaction/internal/TransactionResourceListenerList.java",
    "chars": 2065,
    "preview": "/**\n * Copyright 2014-2016 yangming.liu<bytefox@126.com>.\n *\n * This copyrighted material is made available to anyone wi"
  },
  {
    "path": "bytejta-core/src/main/java/org/bytesoft/transaction/logging/ArchiveDeserializer.java",
    "chars": 976,
    "preview": "/**\n * Copyright 2014-2016 yangming.liu<bytefox@126.com>.\n *\n * This copyrighted material is made available to anyone wi"
  },
  {
    "path": "bytejta-core/src/main/java/org/bytesoft/transaction/logging/LoggingFlushable.java",
    "chars": 829,
    "preview": "/**\n * Copyright 2014-2016 yangming.liu<bytefox@126.com>.\n *\n * This copyrighted material is made available to anyone wi"
  },
  {
    "path": "bytejta-core/src/main/java/org/bytesoft/transaction/logging/TransactionLogger.java",
    "chars": 1651,
    "preview": "/**\n * Copyright 2014-2016 yangming.liu<bytefox@126.com>.\n *\n * This copyrighted material is made available to anyone wi"
  },
  {
    "path": "bytejta-core/src/main/java/org/bytesoft/transaction/logging/store/VirtualLoggingKey.java",
    "chars": 1421,
    "preview": "package org.bytesoft.transaction.logging.store;\n\nimport java.util.Arrays;\n\nimport javax.transaction.xa.Xid;\n\npublic clas"
  },
  {
    "path": "bytejta-core/src/main/java/org/bytesoft/transaction/logging/store/VirtualLoggingListener.java",
    "chars": 865,
    "preview": "/**\n * Copyright 2014-2016 yangming.liu<bytefox@126.com>.\n *\n * This copyrighted material is made available to anyone wi"
  },
  {
    "path": "bytejta-core/src/main/java/org/bytesoft/transaction/logging/store/VirtualLoggingRecord.java",
    "chars": 1428,
    "preview": "/**\n * Copyright 2014-2016 yangming.liu<bytefox@126.com>.\n *\n * This copyrighted material is made available to anyone wi"
  },
  {
    "path": "bytejta-core/src/main/java/org/bytesoft/transaction/logging/store/VirtualLoggingSystem.java",
    "chars": 1164,
    "preview": "/**\n * Copyright 2014-2016 yangming.liu<bytefox@126.com>.\n *\n * This copyrighted material is made available to anyone wi"
  },
  {
    "path": "bytejta-core/src/main/java/org/bytesoft/transaction/logging/store/VirtualLoggingTrigger.java",
    "chars": 843,
    "preview": "/**\n * Copyright 2014-2016 yangming.liu<bytefox@126.com>.\n *\n * This copyrighted material is made available to anyone wi"
  },
  {
    "path": "bytejta-core/src/main/java/org/bytesoft/transaction/recovery/TransactionRecoveryCallback.java",
    "chars": 919,
    "preview": "/**\n * Copyright 2014-2016 yangming.liu<bytefox@126.com>.\n *\n * This copyrighted material is made available to anyone wi"
  },
  {
    "path": "bytejta-core/src/main/java/org/bytesoft/transaction/recovery/TransactionRecoveryListener.java",
    "chars": 904,
    "preview": "/**\n * Copyright 2014-2016 yangming.liu<bytefox@126.com>.\n *\n * This copyrighted material is made available to anyone wi"
  },
  {
    "path": "bytejta-core/src/main/java/org/bytesoft/transaction/remote/RemoteAddr.java",
    "chars": 1917,
    "preview": "/**\n * Copyright 2014-2018 yangming.liu<bytefox@126.com>.\n *\n * This copyrighted material is made available to anyone wi"
  },
  {
    "path": "bytejta-core/src/main/java/org/bytesoft/transaction/remote/RemoteCoordinator.java",
    "chars": 1054,
    "preview": "/**\r\n * Copyright 2014-2016 yangming.liu<bytefox@126.com>.\r\n *\r\n * This copyrighted material is made available to anyone"
  },
  {
    "path": "bytejta-core/src/main/java/org/bytesoft/transaction/remote/RemoteNode.java",
    "chars": 1905,
    "preview": "/**\n * Copyright 2014-2018 yangming.liu<bytefox@126.com>.\n *\n * This copyrighted material is made available to anyone wi"
  },
  {
    "path": "bytejta-core/src/main/java/org/bytesoft/transaction/remote/RemoteSvc.java",
    "chars": 1567,
    "preview": "/**\n * Copyright 2014-2018 yangming.liu<bytefox@126.com>.\n *\n * This copyrighted material is made available to anyone wi"
  },
  {
    "path": "bytejta-core/src/main/java/org/bytesoft/transaction/resource/XATerminator.java",
    "chars": 972,
    "preview": "/**\n * Copyright 2014-2016 yangming.liu<bytefox@126.com>.\n *\n * This copyrighted material is made available to anyone wi"
  },
  {
    "path": "bytejta-core/src/main/java/org/bytesoft/transaction/supports/TransactionExtra.java",
    "chars": 893,
    "preview": "/**\n * Copyright 2014-2018 yangming.liu<bytefox@126.com>.\n *\n * This copyrighted material is made available to anyone wi"
  },
  {
    "path": "bytejta-core/src/main/java/org/bytesoft/transaction/supports/TransactionListener.java",
    "chars": 1434,
    "preview": "/**\n * Copyright 2014-2016 yangming.liu<bytefox@126.com>.\n *\n * This copyrighted material is made available to anyone wi"
  },
  {
    "path": "bytejta-core/src/main/java/org/bytesoft/transaction/supports/TransactionListenerAdapter.java",
    "chars": 1512,
    "preview": "/**\n * Copyright 2014-2016 yangming.liu<bytefox@126.com>.\n *\n * This copyrighted material is made available to anyone wi"
  },
  {
    "path": "bytejta-core/src/main/java/org/bytesoft/transaction/supports/TransactionResourceListener.java",
    "chars": 999,
    "preview": "/**\n * Copyright 2014-2016 yangming.liu<bytefox@126.com>.\n *\n * This copyrighted material is made available to anyone wi"
  },
  {
    "path": "bytejta-core/src/main/java/org/bytesoft/transaction/supports/TransactionResourceListenerAdapter.java",
    "chars": 1049,
    "preview": "/**\n * Copyright 2014-2016 yangming.liu<bytefox@126.com>.\n *\n * This copyrighted material is made available to anyone wi"
  },
  {
    "path": "bytejta-core/src/main/java/org/bytesoft/transaction/supports/TransactionStatistic.java",
    "chars": 1970,
    "preview": "/**\n * Copyright 2014-2016 yangming.liu<bytefox@126.com>.\n *\n * This copyrighted material is made available to anyone wi"
  },
  {
    "path": "bytejta-core/src/main/java/org/bytesoft/transaction/supports/TransactionTimer.java",
    "chars": 917,
    "preview": "/**\n * Copyright 2014-2016 yangming.liu<bytefox@126.com>.\n *\n * This copyrighted material is made available to anyone wi"
  },
  {
    "path": "bytejta-core/src/main/java/org/bytesoft/transaction/supports/resource/XAResourceDescriptor.java",
    "chars": 1154,
    "preview": "/**\n * Copyright 2014-2016 yangming.liu<bytefox@126.com>.\n *\n * This copyrighted material is made available to anyone wi"
  },
  {
    "path": "bytejta-core/src/main/java/org/bytesoft/transaction/supports/rpc/TransactionInterceptor.java",
    "chars": 1176,
    "preview": "/**\n * Copyright 2014-2016 yangming.liu<bytefox@126.com>.\n *\n * This copyrighted material is made available to anyone wi"
  },
  {
    "path": "bytejta-core/src/main/java/org/bytesoft/transaction/supports/rpc/TransactionRequest.java",
    "chars": 1196,
    "preview": "/**\n * Copyright 2014-2016 yangming.liu<bytefox@126.com>.\n *\n * This copyrighted material is made available to anyone wi"
  },
  {
    "path": "bytejta-core/src/main/java/org/bytesoft/transaction/supports/rpc/TransactionResponse.java",
    "chars": 1291,
    "preview": "/**\n * Copyright 2014-2016 yangming.liu<bytefox@126.com>.\n *\n * This copyrighted material is made available to anyone wi"
  },
  {
    "path": "bytejta-core/src/main/java/org/bytesoft/transaction/supports/serialize/XAResourceDeserializer.java",
    "chars": 947,
    "preview": "/**\n * Copyright 2014-2016 yangming.liu<bytefox@126.com>.\n *\n * This copyrighted material is made available to anyone wi"
  },
  {
    "path": "bytejta-core/src/main/java/org/bytesoft/transaction/work/SimpleWork.java",
    "chars": 1484,
    "preview": "/**\n * Copyright 2014-2016 yangming.liu<bytefox@126.com>.\n *\n * This copyrighted material is made available to anyone wi"
  },
  {
    "path": "bytejta-core/src/main/java/org/bytesoft/transaction/work/SimpleWorkListener.java",
    "chars": 2548,
    "preview": "/**\n * Copyright 2014-2016 yangming.liu<bytefox@126.com>.\n *\n * This copyrighted material is made available to anyone wi"
  },
  {
    "path": "bytejta-core/src/main/java/org/bytesoft/transaction/work/SimpleWorkManager.java",
    "chars": 4115,
    "preview": "/**\n * Copyright 2014-2016 yangming.liu<bytefox@126.com>.\n *\n * This copyrighted material is made available to anyone wi"
  },
  {
    "path": "bytejta-core/src/main/java/org/bytesoft/transaction/xa/TransactionXid.java",
    "chars": 4181,
    "preview": "/**\n * Copyright 2014-2016 yangming.liu<bytefox@126.com>.\n *\n * This copyrighted material is made available to anyone wi"
  },
  {
    "path": "bytejta-core/src/main/java/org/bytesoft/transaction/xa/XidFactory.java",
    "chars": 1260,
    "preview": "/**\n * Copyright 2014-2016 yangming.liu<bytefox@126.com>.\n *\n * This copyrighted material is made available to anyone wi"
  },
  {
    "path": "bytejta-supports/pom.xml",
    "chars": 2584,
    "preview": "<project xmlns=\"http://maven.apache.org/POM/4.0.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\n\txsi:schemaLoca"
  },
  {
    "path": "bytejta-supports/src/main/java/org/bytesoft/bytejta/supports/boot/jdbc/DataSourceCciBuilder.java",
    "chars": 3780,
    "preview": "/**\n * Copyright 2014-2018 yangming.liu<bytefox@126.com>.\n *\n * This copyrighted material is made available to anyone wi"
  },
  {
    "path": "bytejta-supports/src/main/java/org/bytesoft/bytejta/supports/boot/jdbc/DataSourceSpiBuilder.java",
    "chars": 4203,
    "preview": "/**\n * Copyright 2014-2018 yangming.liu<bytefox@126.com>.\n *\n * This copyrighted material is made available to anyone wi"
  },
  {
    "path": "bytejta-supports/src/main/java/org/bytesoft/bytejta/supports/internal/RemoteCoordinatorRegistry.java",
    "chars": 5467,
    "preview": "/**\r\n * Copyright 2014-2016 yangming.liu<bytefox@126.com>.\r\n *\r\n * This copyrighted material is made available to anyone"
  },
  {
    "path": "bytejta-supports/src/main/java/org/bytesoft/bytejta/supports/internal/TransactionCommandDispatcher.java",
    "chars": 7707,
    "preview": "/**\n * Copyright 2014-2018 yangming.liu<bytefox@126.com>.\n *\n * This copyrighted material is made available to anyone wi"
  },
  {
    "path": "bytejta-supports/src/main/java/org/bytesoft/bytejta/supports/jdbc/LocalXADataSource.java",
    "chars": 7130,
    "preview": "/**\n * Copyright 2014-2016 yangming.liu<bytefox@126.com>.\n *\n * This copyrighted material is made available to anyone wi"
  },
  {
    "path": "bytejta-supports/src/main/java/org/bytesoft/bytejta/supports/jpa/hibernate/HibernateJtaPlatform.java",
    "chars": 1406,
    "preview": "/**\n * Copyright 2014-2018 yangming.liu<bytefox@126.com>.\n *\n * This copyrighted material is made available to anyone wi"
  },
  {
    "path": "bytejta-supports/src/main/java/org/bytesoft/bytejta/supports/resource/ManagedConnectionFactoryHandler.java",
    "chars": 4625,
    "preview": "/**\n * Copyright 2014-2016 yangming.liu<bytefox@126.com>.\n *\n * This copyrighted material is made available to anyone wi"
  },
  {
    "path": "bytejta-supports/src/main/java/org/bytesoft/bytejta/supports/resource/ManagedConnectionHandler.java",
    "chars": 3777,
    "preview": "/**\n * Copyright 2014-2016 yangming.liu<bytefox@126.com>.\n *\n * This copyrighted material is made available to anyone wi"
  },
  {
    "path": "bytejta-supports/src/main/java/org/bytesoft/bytejta/supports/resource/ManagedXASessionHandler.java",
    "chars": 2271,
    "preview": "/**\n * Copyright 2014-2016 yangming.liu<bytefox@126.com>.\n *\n * This copyrighted material is made available to anyone wi"
  },
  {
    "path": "bytejta-supports/src/main/java/org/bytesoft/bytejta/supports/resource/jdbc/CallableStatementImpl.java",
    "chars": 31723,
    "preview": "/**\n * Copyright 2014-2018 yangming.liu<bytefox@126.com>.\n *\n * This copyrighted material is made available to anyone wi"
  },
  {
    "path": "bytejta-supports/src/main/java/org/bytesoft/bytejta/supports/resource/jdbc/ConnectionImpl.java",
    "chars": 11472,
    "preview": "/**\n * Copyright 2014-2018 yangming.liu<bytefox@126.com>.\n *\n * This copyrighted material is made available to anyone wi"
  },
  {
    "path": "bytejta-supports/src/main/java/org/bytesoft/bytejta/supports/resource/jdbc/DatabaseMetaDataImpl.java",
    "chars": 23698,
    "preview": "/**\n * Copyright 2014-2017 yangming.liu<bytefox@126.com>.\n *\n * This copyrighted material is made available to anyone wi"
  },
  {
    "path": "bytejta-supports/src/main/java/org/bytesoft/bytejta/supports/resource/jdbc/PreparedStatementImpl.java",
    "chars": 15767,
    "preview": "/**\n * Copyright 2014-2018 yangming.liu<bytefox@126.com>.\n *\n * This copyrighted material is made available to anyone wi"
  },
  {
    "path": "bytejta-supports/src/main/java/org/bytesoft/bytejta/supports/resource/jdbc/StatementImpl.java",
    "chars": 7441,
    "preview": "/**\n * Copyright 2014-2018 yangming.liu<bytefox@126.com>.\n *\n * This copyrighted material is made available to anyone wi"
  },
  {
    "path": "bytejta-supports/src/main/java/org/bytesoft/bytejta/supports/resource/jdbc/XAConnectionImpl.java",
    "chars": 6130,
    "preview": "/**\n * Copyright 2014-2017 yangming.liu<bytefox@126.com>.\n *\n * This copyrighted material is made available to anyone wi"
  },
  {
    "path": "bytejta-supports/src/main/java/org/bytesoft/bytejta/supports/resource/jdbc/XADataSourceImpl.java",
    "chars": 2884,
    "preview": "/**\n * Copyright 2014-2017 yangming.liu<bytefox@126.com>.\n *\n * This copyrighted material is made available to anyone wi"
  },
  {
    "path": "bytejta-supports/src/main/java/org/bytesoft/bytejta/supports/resource/properties/ConnectorResourcePropertySource.java",
    "chars": 2601,
    "preview": "/**\n * Copyright 2014-2018 yangming.liu<bytefox@126.com>.\n *\n * This copyrighted material is made available to anyone wi"
  },
  {
    "path": "bytejta-supports/src/main/java/org/bytesoft/bytejta/supports/resource/properties/ConnectorResourcePropertySourceFactory.java",
    "chars": 1689,
    "preview": "/**\n * Copyright 2014-2018 yangming.liu<bytefox@126.com>.\n *\n * This copyrighted material is made available to anyone wi"
  },
  {
    "path": "bytejta-supports/src/main/java/org/bytesoft/bytejta/supports/rpc/TransactionInterceptorImpl.java",
    "chars": 6883,
    "preview": "/**\n * Copyright 2014-2016 yangming.liu<bytefox@126.com>.\n *\n * This copyrighted material is made available to anyone wi"
  },
  {
    "path": "bytejta-supports/src/main/java/org/bytesoft/bytejta/supports/rpc/TransactionRequestImpl.java",
    "chars": 2118,
    "preview": "/**\n * Copyright 2014-2016 yangming.liu<bytefox@126.com>.\n *\n * This copyrighted material is made available to anyone wi"
  },
  {
    "path": "bytejta-supports/src/main/java/org/bytesoft/bytejta/supports/rpc/TransactionResponseImpl.java",
    "chars": 2928,
    "preview": "/**\n * Copyright 2014-2016 yangming.liu<bytefox@126.com>.\n *\n * This copyrighted material is made available to anyone wi"
  },
  {
    "path": "bytejta-supports/src/main/java/org/bytesoft/bytejta/supports/serialize/XAResourceDeserializerImpl.java",
    "chars": 7704,
    "preview": "/**\n * Copyright 2014-2018 yangming.liu<bytefox@126.com>.\n *\n * This copyrighted material is made available to anyone wi"
  },
  {
    "path": "bytejta-supports/src/main/java/org/bytesoft/bytejta/supports/spring/ManagedConnectionFactoryPostProcessor.java",
    "chars": 5563,
    "preview": "/**\n * Copyright 2014-2016 yangming.liu<bytefox@126.com>.\n *\n * This copyrighted material is made available to anyone wi"
  },
  {
    "path": "bytejta-supports/src/main/java/org/bytesoft/bytejta/supports/spring/TransactionBeanFactoryAutoInjector.java",
    "chars": 3376,
    "preview": "/**\r\n * Copyright 2014-2016 yangming.liu<liuyangming@gmail.com>.\r\n *\r\n * This copyrighted material is made available to "
  },
  {
    "path": "bytejta-supports/src/main/java/org/bytesoft/bytejta/supports/spring/TransactionDebuggablePostProcessor.java",
    "chars": 2050,
    "preview": "/**\n * Copyright 2014-2018 yangming.liu<bytefox@126.com>.\n *\n * This copyrighted material is made available to anyone wi"
  },
  {
    "path": "bytejta-supports/src/main/resources/bytejta-supports-core.xml",
    "chars": 1987,
    "preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<beans xmlns=\"http://www.springframework.org/schema/beans\" xmlns:xsi=\"http://www."
  },
  {
    "path": "bytejta-supports/src/main/resources/bytejta-supports-standalone.xml",
    "chars": 3268,
    "preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<beans xmlns=\"http://www.springframework.org/schema/beans\" xmlns:xsi=\"http://www."
  },
  {
    "path": "bytejta-supports/src/main/resources/bytejta-supports-task.xml",
    "chars": 1508,
    "preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<beans xmlns=\"http://www.springframework.org/schema/beans\" xmlns:xsi=\"http://www."
  },
  {
    "path": "bytejta-supports-dubbo/pom.xml",
    "chars": 1276,
    "preview": "<project xmlns=\"http://maven.apache.org/POM/4.0.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\n\txsi:schemaLoca"
  },
  {
    "path": "bytejta-supports-dubbo/src/main/java/org/bytesoft/bytejta/supports/dubbo/DubboRemoteCoordinator.java",
    "chars": 9730,
    "preview": "/**\n * Copyright 2014-2016 yangming.liu<bytefox@126.com>.\n *\n * This copyrighted material is made available to anyone wi"
  },
  {
    "path": "bytejta-supports-dubbo/src/main/java/org/bytesoft/bytejta/supports/dubbo/InvocationContextRegistry.java",
    "chars": 1639,
    "preview": "/**\n * Copyright 2014-2016 yangming.liu<bytefox@126.com>.\n *\n * This copyrighted material is made available to anyone wi"
  },
  {
    "path": "bytejta-supports-dubbo/src/main/java/org/bytesoft/bytejta/supports/dubbo/TransactionBeanRegistry.java",
    "chars": 4048,
    "preview": "/**\n * Copyright 2014-2016 yangming.liu<bytefox@126.com>.\n *\n * This copyrighted material is made available to anyone wi"
  },
  {
    "path": "bytejta-supports-dubbo/src/main/java/org/bytesoft/bytejta/supports/dubbo/config/DubboSupportConfiguration.java",
    "chars": 3259,
    "preview": "/**\n * Copyright 2014-2018 yangming.liu<bytefox@126.com>.\n *\n * This copyrighted material is made available to anyone wi"
  },
  {
    "path": "bytejta-supports-dubbo/src/main/java/org/bytesoft/bytejta/supports/dubbo/ext/ILoadBalancer.java",
    "chars": 1146,
    "preview": "/**\n * Copyright 2014-2018 yangming.liu<bytefox@126.com>.\n *\n * This copyrighted material is made available to anyone wi"
  },
  {
    "path": "bytejta-supports-dubbo/src/main/java/org/bytesoft/bytejta/supports/dubbo/internal/TransactionBeanConfigValidator.java",
    "chars": 9724,
    "preview": "/**\n * Copyright 2014-2017 yangming.liu<bytefox@126.com>.\n *\n * This copyrighted material is made available to anyone wi"
  },
  {
    "path": "bytejta-supports-dubbo/src/main/java/org/bytesoft/bytejta/supports/dubbo/internal/TransactionEndpointAutoInjector.java",
    "chars": 6535,
    "preview": "/**\n * Copyright 2014-2016 yangming.liu<bytefox@126.com>.\n *\n * This copyrighted material is made available to anyone wi"
  },
  {
    "path": "bytejta-supports-dubbo/src/main/java/org/bytesoft/bytejta/supports/dubbo/internal/TransactionParticipantRegistrant.java",
    "chars": 7904,
    "preview": "/**\n * Copyright 2014-2018 yangming.liu<bytefox@126.com>.\n *\n * This copyrighted material is made available to anyone wi"
  },
  {
    "path": "bytejta-supports-dubbo/src/main/java/org/bytesoft/bytejta/supports/dubbo/serialize/XAResourceDeserializerImpl.java",
    "chars": 8938,
    "preview": "/**\n * Copyright 2014-2016 yangming.liu<bytefox@126.com>.\n *\n * This copyrighted material is made available to anyone wi"
  },
  {
    "path": "bytejta-supports-dubbo/src/main/java/org/bytesoft/bytejta/supports/dubbo/spi/TransactionLoadBalance.java",
    "chars": 5909,
    "preview": "/**\n * Copyright 2014-2016 yangming.liu<bytefox@126.com>.\n *\n * This copyrighted material is made available to anyone wi"
  },
  {
    "path": "bytejta-supports-dubbo/src/main/java/org/bytesoft/bytejta/supports/dubbo/spi/TransactionLoadBalancer.java",
    "chars": 1493,
    "preview": "/**\n * Copyright 2014-2018 yangming.liu<bytefox@126.com>.\n *\n * This copyrighted material is made available to anyone wi"
  },
  {
    "path": "bytejta-supports-dubbo/src/main/java/org/bytesoft/bytejta/supports/dubbo/spi/TransactionServiceFilter.java",
    "chars": 32017,
    "preview": "/**\n * Copyright 2014-2016 yangming.liu<bytefox@126.com>.\n *\n * This copyrighted material is made available to anyone wi"
  },
  {
    "path": "bytejta-supports-dubbo/src/main/resources/META-INF/dubbo/com.alibaba.dubbo.rpc.Filter",
    "chars": 72,
    "preview": "bytejta=org.bytesoft.bytejta.supports.dubbo.spi.TransactionServiceFilter"
  },
  {
    "path": "bytejta-supports-dubbo/src/main/resources/META-INF/dubbo/com.alibaba.dubbo.rpc.cluster.LoadBalance",
    "chars": 70,
    "preview": "bytejta=org.bytesoft.bytejta.supports.dubbo.spi.TransactionLoadBalance"
  },
  {
    "path": "bytejta-supports-dubbo/src/main/resources/META-INF/dubbo/org.bytesoft.bytejta.supports.dubbo.ext.ILoadBalancer",
    "chars": 71,
    "preview": "default=org.bytesoft.bytejta.supports.dubbo.spi.TransactionLoadBalancer"
  },
  {
    "path": "bytejta-supports-dubbo/src/main/resources/bytejta-supports-dubbo.xml",
    "chars": 3366,
    "preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<beans xmlns=\"http://www.springframework.org/schema/beans\" xmlns:xsi=\"http://www."
  },
  {
    "path": "bytejta-supports-springcloud/pom.xml",
    "chars": 5057,
    "preview": "<project xmlns=\"http://maven.apache.org/POM/4.0.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\n\txsi:schemaLoca"
  },
  {
    "path": "bytejta-supports-springcloud/src/main/java/org/bytesoft/bytejta/supports/springcloud/SpringCloudBeanRegistry.java",
    "chars": 4516,
    "preview": "/**\n * Copyright 2014-2017 yangming.liu<bytefox@126.com>.\n *\n * This copyrighted material is made available to anyone wi"
  },
  {
    "path": "bytejta-supports-springcloud/src/main/java/org/bytesoft/bytejta/supports/springcloud/SpringCloudCoordinator.java",
    "chars": 10287,
    "preview": "/**\n * Copyright 2014-2017 yangming.liu<bytefox@126.com>.\n *\n * This copyrighted material is made available to anyone wi"
  },
  {
    "path": "bytejta-supports-springcloud/src/main/java/org/bytesoft/bytejta/supports/springcloud/SpringCloudEndpointPostProcessor.java",
    "chars": 3484,
    "preview": "/**\n * Copyright 2014-2017 yangming.liu<bytefox@126.com>.\n *\n * This copyrighted material is made available to anyone wi"
  },
  {
    "path": "bytejta-supports-springcloud/src/main/java/org/bytesoft/bytejta/supports/springcloud/config/SpringCloudConfiguration.java",
    "chars": 14394,
    "preview": "/**\n * Copyright 2014-2017 yangming.liu<bytefox@126.com>.\n *\n * This copyrighted material is made available to anyone wi"
  },
  {
    "path": "bytejta-supports-springcloud/src/main/java/org/bytesoft/bytejta/supports/springcloud/controller/TransactionCoordinatorController.java",
    "chars": 6565,
    "preview": "/**\n * Copyright 2014-2017 yangming.liu<bytefox@126.com>.\n *\n * This copyrighted material is made available to anyone wi"
  },
  {
    "path": "bytejta-supports-springcloud/src/main/java/org/bytesoft/bytejta/supports/springcloud/dbcp/CommonDBCPXADataSourceWrapper.java",
    "chars": 1600,
    "preview": "/**\n * Copyright 2014-2018 yangming.liu<bytefox@126.com>.\n *\n * This copyrighted material is made available to anyone wi"
  },
  {
    "path": "bytejta-supports-springcloud/src/main/java/org/bytesoft/bytejta/supports/springcloud/feign/TransactionClientRegistry.java",
    "chars": 1447,
    "preview": "/**\n * Copyright 2014-2017 yangming.liu<bytefox@126.com>.\n *\n * This copyrighted material is made available to anyone wi"
  },
  {
    "path": "bytejta-supports-springcloud/src/main/java/org/bytesoft/bytejta/supports/springcloud/feign/TransactionFeignBeanPostProcessor.java",
    "chars": 4031,
    "preview": "/**\n * Copyright 2014-2018 yangming.liu<bytefox@126.com>.\n *\n * This copyrighted material is made available to anyone wi"
  },
  {
    "path": "bytejta-supports-springcloud/src/main/java/org/bytesoft/bytejta/supports/springcloud/feign/TransactionFeignContract.java",
    "chars": 3045,
    "preview": "/**\n * Copyright 2014-2017 yangming.liu<bytefox@126.com>.\n *\n * This copyrighted material is made available to anyone wi"
  },
  {
    "path": "bytejta-supports-springcloud/src/main/java/org/bytesoft/bytejta/supports/springcloud/feign/TransactionFeignDecoder.java",
    "chars": 6521,
    "preview": "/**\n * Copyright 2014-2017 yangming.liu<bytefox@126.com>.\n *\n * This copyrighted material is made available to anyone wi"
  },
  {
    "path": "bytejta-supports-springcloud/src/main/java/org/bytesoft/bytejta/supports/springcloud/feign/TransactionFeignErrorDecoder.java",
    "chars": 5979,
    "preview": "/**\n * Copyright 2014-2017 yangming.liu<bytefox@126.com>.\n *\n * This copyrighted material is made available to anyone wi"
  },
  {
    "path": "bytejta-supports-springcloud/src/main/java/org/bytesoft/bytejta/supports/springcloud/feign/TransactionFeignHandler.java",
    "chars": 7353,
    "preview": "/**\n * Copyright 2014-2017 yangming.liu<bytefox@126.com>.\n *\n * This copyrighted material is made available to anyone wi"
  },
  {
    "path": "bytejta-supports-springcloud/src/main/java/org/bytesoft/bytejta/supports/springcloud/feign/TransactionFeignInterceptor.java",
    "chars": 3334,
    "preview": "/**\n * Copyright 2014-2017 yangming.liu<bytefox@126.com>.\n *\n * This copyrighted material is made available to anyone wi"
  },
  {
    "path": "bytejta-supports-springcloud/src/main/java/org/bytesoft/bytejta/supports/springcloud/hystrix/TransactionHystrixBeanPostProcessor.java",
    "chars": 8436,
    "preview": "/**\n * Copyright 2014-2018 yangming.liu<bytefox@126.com>.\n *\n * This copyrighted material is made available to anyone wi"
  },
  {
    "path": "bytejta-supports-springcloud/src/main/java/org/bytesoft/bytejta/supports/springcloud/hystrix/TransactionHystrixFallbackFactoryHandler.java",
    "chars": 1874,
    "preview": "/**\n * Copyright 2014-2018 yangming.liu<bytefox@126.com>.\n *\n * This copyrighted material is made available to anyone wi"
  },
  {
    "path": "bytejta-supports-springcloud/src/main/java/org/bytesoft/bytejta/supports/springcloud/hystrix/TransactionHystrixFallbackHandler.java",
    "chars": 1479,
    "preview": "/**\n * Copyright 2014-2018 yangming.liu<bytefox@126.com>.\n *\n * This copyrighted material is made available to anyone wi"
  },
  {
    "path": "bytejta-supports-springcloud/src/main/java/org/bytesoft/bytejta/supports/springcloud/hystrix/TransactionHystrixFeignHandler.java",
    "chars": 2684,
    "preview": "/**\n * Copyright 2014-2018 yangming.liu<bytefox@126.com>.\n *\n * This copyrighted material is made available to anyone wi"
  },
  {
    "path": "bytejta-supports-springcloud/src/main/java/org/bytesoft/bytejta/supports/springcloud/hystrix/TransactionHystrixInvocation.java",
    "chars": 1273,
    "preview": "/**\n * Copyright 2014-2018 yangming.liu<bytefox@126.com>.\n *\n * This copyrighted material is made available to anyone wi"
  },
  {
    "path": "bytejta-supports-springcloud/src/main/java/org/bytesoft/bytejta/supports/springcloud/hystrix/TransactionHystrixInvocationHandler.java",
    "chars": 896,
    "preview": "/**\n * Copyright 2014-2018 yangming.liu<bytefox@126.com>.\n *\n * This copyrighted material is made available to anyone wi"
  },
  {
    "path": "bytejta-supports-springcloud/src/main/java/org/bytesoft/bytejta/supports/springcloud/hystrix/TransactionHystrixMethodHandler.java",
    "chars": 7529,
    "preview": "/**\n * Copyright 2014-2018 yangming.liu<bytefox@126.com>.\n *\n * This copyrighted material is made available to anyone wi"
  },
  {
    "path": "bytejta-supports-springcloud/src/main/java/org/bytesoft/bytejta/supports/springcloud/loadbalancer/TransactionLoadBalancerInterceptor.java",
    "chars": 1008,
    "preview": "/**\n * Copyright 2014-2017 yangming.liu<bytefox@126.com>.\n *\n * This copyrighted material is made available to anyone wi"
  },
  {
    "path": "bytejta-supports-springcloud/src/main/java/org/bytesoft/bytejta/supports/springcloud/loadbalancer/TransactionLoadBalancerRuleImpl.java",
    "chars": 3748,
    "preview": "/**\n * Copyright 2014-2017 yangming.liu<bytefox@126.com>.\n *\n * This copyrighted material is made available to anyone wi"
  },
  {
    "path": "bytejta-supports-springcloud/src/main/java/org/bytesoft/bytejta/supports/springcloud/property/TransactionPropertySource.java",
    "chars": 2457,
    "preview": "/**\n * Copyright 2014-2017 yangming.liu<bytefox@126.com>.\n *\n * This copyrighted material is made available to anyone wi"
  },
  {
    "path": "bytejta-supports-springcloud/src/main/java/org/bytesoft/bytejta/supports/springcloud/property/TransactionPropertySourceFactory.java",
    "chars": 1387,
    "preview": "/**\n * Copyright 2014-2017 yangming.liu<bytefox@126.com>.\n *\n * This copyrighted material is made available to anyone wi"
  },
  {
    "path": "bytejta-supports-springcloud/src/main/java/org/bytesoft/bytejta/supports/springcloud/rule/TransactionRule.java",
    "chars": 1203,
    "preview": "/**\n * Copyright 2014-2017 yangming.liu<bytefox@126.com>.\n *\n * This copyrighted material is made available to anyone wi"
  },
  {
    "path": "bytejta-supports-springcloud/src/main/java/org/bytesoft/bytejta/supports/springcloud/rule/TransactionRuleImpl.java",
    "chars": 2256,
    "preview": "/**\n * Copyright 2014-2017 yangming.liu<bytefox@126.com>.\n *\n * This copyrighted material is made available to anyone wi"
  },
  {
    "path": "bytejta-supports-springcloud/src/main/java/org/bytesoft/bytejta/supports/springcloud/serialize/XAResourceDeserializerImpl.java",
    "chars": 4562,
    "preview": "/**\n * Copyright 2014-2017 yangming.liu<bytefox@126.com>.\n *\n * This copyrighted material is made available to anyone wi"
  },
  {
    "path": "bytejta-supports-springcloud/src/main/java/org/bytesoft/bytejta/supports/springcloud/web/TransactionHandlerInterceptor.java",
    "chars": 7028,
    "preview": "/**\n * Copyright 2014-2017 yangming.liu<bytefox@126.com>.\n *\n * This copyrighted material is made available to anyone wi"
  },
  {
    "path": "bytejta-supports-springcloud/src/main/java/org/bytesoft/bytejta/supports/springcloud/web/TransactionRequestInterceptor.java",
    "chars": 10707,
    "preview": "/**\n * Copyright 2014-2017 yangming.liu<bytefox@126.com>.\n *\n * This copyrighted material is made available to anyone wi"
  },
  {
    "path": "bytejta-supports-springcloud/src/main/resources/bytejta-supports-springcloud.xml",
    "chars": 3289,
    "preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<beans xmlns=\"http://www.springframework.org/schema/beans\" xmlns:xsi=\"http://www."
  },
  {
    "path": "pom.xml",
    "chars": 15175,
    "preview": "<project xmlns=\"http://maven.apache.org/POM/4.0.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\n\txsi:schemaLoca"
  }
]

About this extraction

This page contains the full source code of the liuyangming/ByteJTA GitHub repository, extracted and formatted as plain text for AI agents and large language models (LLMs). The extraction includes 175 files (852.1 KB), approximately 202.8k tokens, and a symbol index with 2194 extracted functions, classes, methods, constants, and types. Use this with OpenClaw, Claude, ChatGPT, Cursor, Windsurf, or any other AI tool that accepts text input. You can copy the full output to your clipboard or download it as a .txt file.

Extracted by GitExtract — free GitHub repo to text converter for AI. Built by Nikandr Surkov.

Copied to clipboard!