KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > oracle > toplink > essentials > transaction > SynchronizationListenerFactory


1 /*
2  * The contents of this file are subject to the terms
3  * of the Common Development and Distribution License
4  * (the "License"). You may not use this file except
5  * in compliance with the License.
6  *
7  * You can obtain a copy of the license at
8  * glassfish/bootstrap/legal/CDDLv1.0.txt or
9  * https://glassfish.dev.java.net/public/CDDLv1.0.html.
10  * See the License for the specific language governing
11  * permissions and limitations under the License.
12  *
13  * When distributing Covered Code, include this CDDL
14  * HEADER in each file and include the License file at
15  * glassfish/bootstrap/legal/CDDLv1.0.txt. If applicable,
16  * add the following below this CDDL HEADER, with the
17  * fields enclosed by brackets "[]" replaced with your
18  * own identifying information: Portions Copyright [yyyy]
19  * [name of copyright owner]
20  */

21 // Copyright (c) 1998, 2005, Oracle. All rights reserved.
22
package oracle.toplink.essentials.transaction;
23
24 import oracle.toplink.essentials.internal.sessions.UnitOfWorkImpl;
25 import oracle.toplink.essentials.internal.sessions.AbstractSession;
26
27 /**
28  * <p>
29  * <b>Purpose</b>: Generate synchronization listener objects of the appropriate type.
30  * <p>
31  * <b>Description</b>: This interface will be used by the AbstractTransactionController
32  * to obtain a listener that it will register against the external transaction in order
33  * to synchronize the unit of work.
34  * All new listener classes should implement this interface.
35  *
36  * @see AbstractSynchronizationListener
37  */

38 public interface SynchronizationListenerFactory {
39
40     /**
41      * INTERNAL:
42      * Create and return the synchronization listener object that can be registered
43      * to receive transaction notification callbacks. The type of synchronization object
44      * that gets returned will be dependent upon the transaction system
45      */

46     public AbstractSynchronizationListener newSynchronizationListener(UnitOfWorkImpl unitOfWork, AbstractSession session, Object JavaDoc transaction, AbstractTransactionController controller);
47 }
48
Popular Tags