Source Code Cross Referenced for NetXACallInfo.java in  » Database-DBMS » db-derby-10.2 » org » apache » derby » client » net » 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 » Database DBMS » db derby 10.2 » org.apache.derby.client.net 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /*
002:
003:           Derby - Class org.apache.derby.client.net.NetXACallInfo
004:
005:           Licensed to the Apache Software Foundation (ASF) under one or more
006:           contributor license agreements.  See the NOTICE file distributed with
007:           this work for additional information regarding copyright ownership.
008:           The ASF licenses this file to You under the Apache License, Version 2.0
009:           (the "License"); you may not use this file except in compliance with
010:           the License.  You may obtain a copy of the License at
011:
012:              http://www.apache.org/licenses/LICENSE-2.0
013:
014:           Unless required by applicable law or agreed to in writing, software
015:           distributed under the License is distributed on an "AS IS" BASIS,
016:           WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
017:           See the License for the specific language governing permissions and
018:           limitations under the License.
019:
020:         */
021:        /**********************************************************************
022:         *
023:         *
024:         *  Component Name =
025:         *
026:         *  Package Name = org.apache.derby.client.net
027:         *
028:         *  Descriptive Name = XACallInfo class
029:         *
030:         *  Function = Handle XA information
031:         *
032:         *  List of Classes
033:         *              - NetXACallInfo
034:         *
035:         *  Restrictions : None
036:         *
037:         **********************************************************************/package org.apache.derby.client.net;
038:
039:        import javax.transaction.xa.XAResource;
040:        import javax.transaction.xa.Xid;
041:
042:        import org.apache.derby.client.am.Connection;
043:
044:        public class NetXACallInfo {
045:            Xid xid_; // current xid
046:            int xaFlags_; // current xaFlags
047:            // may not be needed!!!~~~
048:            int xaFunction_; // queued XA function being performed
049:            int xaRetVal_; // xaretval from server
050:            boolean xaInProgress_; // set at start(), reset at commit(),
051:            //  rollback(), or prepare() on RDONLY
052:            boolean xaWasSuspended; // used to indicate an XA tyrans was suspended
053:            //  one or more times, overrides empty transaction
054:            boolean currConnection_; // set when actualConn_ is the current connection
055:            boolean freeEntry_; // set when no actualConn_, entry is free / available
056:            boolean convReleased_; // release coversation, reuse successfull = true
057:            NetXAResource xaResource_; // NetXAResource containing this NetXACallInfo
058:            NetXAConnection actualConn_; // the actual connection object, not necessarily
059:            // the user's connection object
060:            /* only the first connection object is actually used. The other connection
061:             * objects are used only for their TCP/IP variables to simulate
062:             * suspend / resume
063:             */
064:
065:            private byte[] crrtkn_;
066:            private java.io.InputStream in_;
067:            private java.io.OutputStream out_;
068:
069:            private byte[] uowid_; // Unit of Work ID
070:
071:            private boolean readOnlyTransaction_; // readOnlyTransaction Flag
072:
073:            public NetXACallInfo() {
074:                xid_ = null;
075:                xaFlags_ = XAResource.TMNOFLAGS;
076:                xaInProgress_ = false;
077:                currConnection_ = false;
078:                freeEntry_ = true;
079:                convReleased_ = false;
080:                actualConn_ = null;
081:                readOnlyTransaction_ = true;
082:                xaResource_ = null;
083:                xaRetVal_ = 0;
084:                xaWasSuspended = false;
085:            }
086:
087:            public NetXACallInfo(Xid xid, int flags, NetXAResource xares,
088:                    NetXAConnection actualConn) {
089:                xid_ = xid;
090:                xaFlags_ = flags;
091:                xaInProgress_ = false;
092:                currConnection_ = false;
093:                freeEntry_ = true;
094:                actualConn_ = actualConn;
095:                readOnlyTransaction_ = true;
096:                xaResource_ = xares;
097:                xaRetVal_ = 0;
098:                xaWasSuspended = false;
099:            }
100:
101:            public void saveConnectionVariables() {
102:                in_ = actualConn_.getNetConnection().getInputStream();
103:                out_ = actualConn_.getNetConnection().getOutputStream();
104:                crrtkn_ = actualConn_.getCorrelatorToken();
105:            }
106:
107:            public java.io.InputStream getInputStream() {
108:                return in_;
109:            }
110:
111:            public java.io.OutputStream getOutputStream() {
112:                return out_;
113:            }
114:
115:            public byte[] getCorrelatorToken() {
116:                return crrtkn_;
117:            }
118:
119:            protected void setUOWID(byte[] uowid) {
120:                uowid_ = uowid;
121:            }
122:
123:            protected byte[] getUOWID() {
124:                return uowid_;
125:            }
126:
127:            protected void setReadOnlyTransactionFlag(boolean flag) {
128:                readOnlyTransaction_ = flag;
129:            }
130:
131:            protected boolean getReadOnlyTransactionFlag() {
132:                return readOnlyTransaction_;
133:            }
134:
135:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.