KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > springframework > transaction > support > ResourceTransactionManager


1 /*
2  * Copyright 2002-2007 the original author or authors.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */

16
17 package org.springframework.transaction.support;
18
19 import org.springframework.transaction.PlatformTransactionManager;
20
21 /**
22  * Extension of the {@link org.springframework.transaction.PlatformTransactionManager}
23  * interface, indicating a native resource transaction manager, operating on a single
24  * target resource. Such transaction managers differ from JTA transaction managers in
25  * that they do not use XA transaction enlistment for an open number of resources but
26  * rather focus on leveraging the native power and simplicity of a single target resource.
27  *
28  * <p>This interface is mainly used for abstract introspection of a transaction manager,
29  * giving clients a hint on what kind of transaction manager they have been given
30  * and on what concrete resource the transaction manager is operating on.
31  *
32  * @author Juergen Hoeller
33  * @since 2.0.4
34  * @see TransactionSynchronizationManager
35  */

36 public interface ResourceTransactionManager extends PlatformTransactionManager {
37
38     /**
39      * Return the resource factory that this transaction manager operates on,
40      * e.g. a JDBC DataSource or a JMS ConnectionFactory.
41      * <p>This target resource factory is usually used as resource key for
42      * {@link TransactionSynchronizationManager}'s resource bindings per thread.
43      * @return the target resource factory (never <code>null</code>)
44      * @see TransactionSynchronizationManager#bindResource
45      * @see TransactionSynchronizationManager#getResource
46      */

47     Object JavaDoc getResourceFactory();
48
49 }
50
Popular Tags