001: /*
002: * @(#) TransactionRecovery.java
003: *
004: * JOTM: Java Open Transaction Manager
005: *
006: *
007: * This module was originally developed by
008: *
009: * - Bull S.A. as part of the JOnAS application server code released in
010: * July 1999 (www.bull.com)
011: *
012: * --------------------------------------------------------------------------
013: * The original code and portions created by Bull SA are
014: * Copyright (c) 1999 BULL SA
015: * All rights reserved.
016: *
017: * Redistribution and use in source and binary forms, with or without
018: * modification, are permitted provided that the following conditions are met:
019: *
020: * -Redistributions of source code must retain the above copyright notice, this
021: * list of conditions and the following disclaimer.
022: *
023: * -Redistributions in binary form must reproduce the above copyright notice,
024: * this list of conditions and the following disclaimer in the documentation
025: * and/or other materials provided with the distribution.
026: *
027: * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
028: * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
029: * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
030: * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
031: * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
032: * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
033: * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
034: * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
035: * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
036: * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
037: * POSSIBILITY OF SUCH DAMAGE.
038: *
039: * --------------------------------------------------------------------------
040: * $Id: TransactionRecovery.java,v 1.3 2005/04/18 16:12:46 rogerperey Exp $
041: * --------------------------------------------------------------------------
042: */
043: package org.objectweb.jotm;
044:
045: import javax.transaction.xa.XAResource;
046: import javax.transaction.xa.XAException;
047: import java.util.Vector;
048: import org.objectweb.howl.log.LogException;
049: import java.util.Properties;
050:
051: public interface TransactionRecovery {
052:
053: public JotmRecovery getJotmRecovery();
054:
055: public Vector getRmRegistration();
056:
057: /**
058: * Log all the Resource Managers with the JOTM Transaction Manager.
059: *
060: * @exception XAException if an error occurs
061: */
062:
063: public void startResourceManagerRecovery() throws XAException;
064:
065: /**
066: * Register a Resource Manager with the JOTM Transaction Manager.
067: *
068: * @param rmName The Resource Manager to be registered.
069: * @param rmXares XAResource associated with the Resource Manager
070: * @param info String of information for display with admin interface
071: * @param trm TransactionResourceManager to return the registered XAResource
072: * @exception XAException if an error occurs
073: */
074:
075: public void registerResourceManager(String rmName,
076: XAResource rmXares, String info,
077: TransactionResourceManager trm) throws XAException;
078:
079: /**
080: * Added 3/30/05
081: * Register a Resource Manager with the JOTM Transaction Manager with Recovery properties.
082: *
083: * @param rmName The Resource Manager to be registered.
084: * @param rmXares XAResource associated with the Resource Manager
085: * @param info String of information for display with admin interface
086: * @param rmProperties - Strings specifying recovery properties for resource
087: * @param trm TransactionResourceManager to return the registered XAResource
088: * @exception XAException if an error occurs
089: */
090:
091: public void registerResourceManager(String rmName,
092: XAResource rmXares, String info, Properties rmProperties,
093: TransactionResourceManager trm) throws XAException;
094:
095: /**
096: * Provide information regarding the status and state of the XAResource.
097: *
098: * @return The XAResource to be reported upon.
099: *
100: * @exception XAException if an error occurs
101: */
102:
103: XAResource reportResourceManager(String rmName) throws XAException;
104:
105: /**
106: * Unregister a Resource Manager from the JOTM Transaction Manager.
107: *
108: * @param rmName The Resource Manager to be unregistered.
109: * @param rmXares XAResource associated with the Resource Manager
110: * @exception XAException if an error occurs
111: */
112:
113: public void unregisterResourceManager(String rmName,
114: XAResource rmXares) throws XAException;
115:
116: public void forget() throws LogException, Exception;
117: }
|