Source Code Cross Referenced for JournalImpl.java in  » UML » MetaBoss » com » metaboss » enterprise » spi » tyreximpl » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » UML » MetaBoss » com.metaboss.enterprise.spi.tyreximpl 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        // THIS SOFTWARE IS PROVIDED BY SOFTARIS PTY.LTD. AND OTHER METABOSS
002:        // CONTRIBUTORS ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING,
003:        // BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
004:        // FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SOFTARIS PTY.LTD.
005:        // OR OTHER METABOSS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
006:        // INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
007:        // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
008:        // OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
009:        // LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
010:        // NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
011:        // EVEN IF SOFTARIS PTY.LTD. OR OTHER METABOSS CONTRIBUTORS ARE ADVISED OF THE
012:        // POSSIBILITY OF SUCH DAMAGE.
013:        //
014:        // Copyright 2000-2005 © Softaris Pty.Ltd. All Rights Reserved.
015:        package com.metaboss.enterprise.spi.tyreximpl;
016:
017:        import javax.transaction.SystemException;
018:        import javax.transaction.xa.Xid;
019:
020:        import org.apache.commons.logging.Log;
021:        import org.apache.commons.logging.LogFactory;
022:
023:        import tyrex.tm.Journal;
024:
025:        /** Implement tyrex's Transaction Journal based on local file in the current working directory */
026:        public class JournalImpl extends Journal {
027:            private static final Log sLogger = LogFactory
028:                    .getLog(JournalImpl.class);
029:
030:            /** Creates journal with specified name */
031:            public static Journal createJournal(String pJournalName)
032:                    throws SystemException {
033:                return new JournalImpl();
034:            }
035:
036:            /**
037:             * Records the outcome of transaction preparation. The decision code
038:             * indicates whether the transaction is read-only, requires commit or
039:             * has rolled back.
040:             * <p>
041:             * This method is called to record the outcome after preparing a
042:             * transaction. It must record a decision to commit or rollback the
043:             * transaction. This method may be skipped if the transaction is
044:             * identified as read-only or for local transactions.
045:             * <p>
046:             * If this method is called, {@link #commit commit} or {@link #rollback
047:             * rollback} must follow.
048:             * <p>
049:             * Valid values for the decision are <tt>XAResource.XA_OK</tt>,
050:             * <tt>XAResource.XA_RDONLY</tt>, or any of the heuristic codes
051:             * defined by <tt>XAException.XA_HEUR*</tt>.
052:             *
053:             * @param xid The transaction identifier
054:             * @param decision The outcome of the prepare stage
055:             * @throw SystemException An error occured while performing this operation
056:             */
057:            public void prepare(Xid xid, int decision) throws SystemException {
058:                sLogger.debug("Received request to journal prepare");
059:            }
060:
061:            /**
062:             * Records a transaction commit.
063:             * <p>
064:             * This method is called when completing two-phase commit of a transaction
065:             * branch. This method may be skipped if the transaction is identified as
066:             * read-only or is a local transaction. 
067:             * <p>
068:             * If this method is called, {@link #forget forget} must follow.
069:             * <p>
070:             * If the transaction has properly committed, the heuristic decision will
071:             * be <tt>XAResource.XA_HEURCOM</tt>. Otherwise, use any of the heuristic
072:             * codes defined by <tt>XAException.XA_HEUR*</tt>.
073:             *
074:             * @param xid The transaction identifier
075:             * @param decision The heuristic decision
076:             * @throw SystemException An error occured while performing this opetion
077:             */
078:            public void commit(Xid xid, int decision) throws SystemException {
079:                sLogger.debug("Received request to journal commit");
080:            }
081:
082:            /**
083:             * Records a transaction rollback.
084:             * <p>
085:             * This method is called when completing two-phase commit of a transaction
086:             * branch. This method may be skipped for local transactions.
087:             * <p>
088:             * If this method is called, {@link #forget forget} must follow.
089:             *
090:             * @param xid The transaction identifier
091:             * @throw SystemException An error occured while performing this operation
092:             */
093:            public void rollback(Xid xid) throws SystemException {
094:                sLogger.debug("Received request to journal rollback");
095:            }
096:
097:            /**
098:             * Forgets a heuristically complete transaction.
099:             * <p>
100:             * This method is called when completing two-phase commit to discard the
101:             * transaction and close the transaction chain.
102:             *
103:             * @param xid The transaction identifier
104:             * @throw SystemException An error occured while performing this operation
105:             */
106:            public void forget(Xid xid) throws SystemException {
107:                sLogger.debug("Received request to journal forget");
108:            }
109:
110:            /**
111:             * Determines whether the transaction is open.
112:             * <p>
113:             * The transaction is open if any record was written on behalf
114:             * of that transaction. The transaction must be closed explicitly
115:             * by calling {@link #forget forget}. If the transaction is not
116:             * open, there is no need to call {@link #forget forget}.
117:             *
118:             * @param xid The transaction identifier
119:             * @return True if the transaction is open and must be closed
120:             * @throw SystemException An error occured while performing this
121:             * operation
122:             */
123:            /*
124:            public abstract boolean isOpen( Xid xid )
125:            	throws SystemException;
126:             */
127:
128:            /**
129:             * Called to initiate recovery. This method will return information
130:             * about all transactions that are subject to recovery.
131:             * <p>
132:             * A recoverable transaction is a transaction that has been processed
133:             * through two-phase commit but has not been completed. This method
134:             * will return the heuristic decision for the transaction as reached
135:             * by the transaction manager.
136:             * <p>
137:             * Transactions that have been completed are generally not returned
138:             * by this method. In addition it is possible that resource managers
139:             * will return additional transaction branchs for which the transaction
140:             * manager has not reached any heuristic decision.
141:             *
142:             * @return An array of zero of more recoverable transactions
143:             * @throw SystemException An error occured while performing this operation
144:             */
145:            public Journal.RecoveredTransaction[] recover()
146:                    throws SystemException {
147:                sLogger.debug("Received request to recover");
148:                return new Journal.RecoveredTransaction[0];
149:            }
150:
151:            /**
152:             * Called to close the journal and release any resources held by the
153:             * journal.
154:             *
155:             * @throw SystemException An error occured while performing this operation
156:             */
157:            public void close() throws SystemException {
158:                sLogger.debug("Received request to close journal");
159:            }
160:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.