public class org.postgresql.xa.PGXAConnection extends org.postgresql.ds.PGPooledConnection implements javax.sql.XAConnection, javax.transaction.xa.XAResource
minor version: 0
major version: 59
flags: flags: (0x0021) ACC_PUBLIC, ACC_SUPER
this_class: org.postgresql.xa.PGXAConnection
super_class: org.postgresql.ds.PGPooledConnection
{
private static final java.util.logging.Logger LOGGER;
descriptor: Ljava/util/logging/Logger;
flags: (0x001a) ACC_PRIVATE, ACC_STATIC, ACC_FINAL
private final org.postgresql.core.BaseConnection conn;
descriptor: Lorg/postgresql/core/BaseConnection;
flags: (0x0012) ACC_PRIVATE, ACC_FINAL
private javax.transaction.xa.Xid currentXid;
descriptor: Ljavax/transaction/xa/Xid;
flags: (0x0002) ACC_PRIVATE
private org.postgresql.xa.PGXAConnection$State state;
descriptor: Lorg/postgresql/xa/PGXAConnection$State;
flags: (0x0002) ACC_PRIVATE
private javax.transaction.xa.Xid preparedXid;
descriptor: Ljavax/transaction/xa/Xid;
flags: (0x0002) ACC_PRIVATE
private boolean committedOrRolledBack;
descriptor: Z
flags: (0x0002) ACC_PRIVATE
private boolean localAutoCommitMode;
descriptor: Z
flags: (0x0002) ACC_PRIVATE
static void <clinit>();
descriptor: ()V
flags: (0x0008) ACC_STATIC
Code:
stack=1, locals=0, args_size=0
0: ldc Lorg/postgresql/xa/PGXAConnection;
invokevirtual java.lang.Class.getName:()Ljava/lang/String;
invokestatic java.util.logging.Logger.getLogger:(Ljava/lang/String;)Ljava/util/logging/Logger;
putstatic org.postgresql.xa.PGXAConnection.LOGGER:Ljava/util/logging/Logger;
return
LocalVariableTable:
Start End Slot Name Signature
private void debug(java.lang.String);
descriptor: (Ljava/lang/String;)V
flags: (0x0002) ACC_PRIVATE
Code:
stack=7, locals=2, args_size=2
start local 0 start local 1 0: getstatic org.postgresql.xa.PGXAConnection.LOGGER:Ljava/util/logging/Logger;
getstatic java.util.logging.Level.FINEST:Ljava/util/logging/Level;
invokevirtual java.util.logging.Logger.isLoggable:(Ljava/util/logging/Level;)Z
ifeq 2
1: getstatic org.postgresql.xa.PGXAConnection.LOGGER:Ljava/util/logging/Logger;
getstatic java.util.logging.Level.FINEST:Ljava/util/logging/Level;
ldc "XAResource {0}: {1}"
iconst_2
anewarray java.lang.Object
dup
iconst_0
aload 0
invokevirtual java.lang.Object.hashCode:()I
invokestatic java.lang.Integer.toHexString:(I)Ljava/lang/String;
aastore
dup
iconst_1
aload 1
aastore
invokevirtual java.util.logging.Logger.log:(Ljava/util/logging/Level;Ljava/lang/String;[Ljava/lang/Object;)V
2: StackMap locals:
StackMap stack:
return
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 3 0 this Lorg/postgresql/xa/PGXAConnection;
0 3 1 s Ljava/lang/String;
MethodParameters:
Name Flags
s
public void <init>(org.postgresql.core.BaseConnection);
descriptor: (Lorg/postgresql/core/BaseConnection;)V
flags: (0x0001) ACC_PUBLIC
Code:
stack=4, locals=2, args_size=2
start local 0 start local 1 0: aload 0
aload 1
iconst_1
iconst_1
invokespecial org.postgresql.ds.PGPooledConnection.<init>:(Ljava/sql/Connection;ZZ)V
1: aload 0
iconst_1
putfield org.postgresql.xa.PGXAConnection.localAutoCommitMode:Z
2: aload 0
aload 1
putfield org.postgresql.xa.PGXAConnection.conn:Lorg/postgresql/core/BaseConnection;
3: aload 0
getstatic org.postgresql.xa.PGXAConnection$State.IDLE:Lorg/postgresql/xa/PGXAConnection$State;
putfield org.postgresql.xa.PGXAConnection.state:Lorg/postgresql/xa/PGXAConnection$State;
4: return
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 5 0 this Lorg/postgresql/xa/PGXAConnection;
0 5 1 conn Lorg/postgresql/core/BaseConnection;
Exceptions:
throws java.sql.SQLException
MethodParameters:
Name Flags
conn
public java.sql.Connection getConnection();
descriptor: ()Ljava/sql/Connection;
flags: (0x0001) ACC_PUBLIC
Code:
stack=5, locals=3, args_size=1
start local 0 0: aload 0
invokespecial org.postgresql.ds.PGPooledConnection.getConnection:()Ljava/sql/Connection;
astore 1
start local 1 1: aload 0
getfield org.postgresql.xa.PGXAConnection.state:Lorg/postgresql/xa/PGXAConnection$State;
getstatic org.postgresql.xa.PGXAConnection$State.IDLE:Lorg/postgresql/xa/PGXAConnection$State;
if_acmpne 3
2: aload 1
iconst_1
invokeinterface java.sql.Connection.setAutoCommit:(Z)V
3: StackMap locals: java.sql.Connection
StackMap stack:
new org.postgresql.xa.PGXAConnection$ConnectionHandler
dup
aload 0
aload 1
invokespecial org.postgresql.xa.PGXAConnection$ConnectionHandler.<init>:(Lorg/postgresql/xa/PGXAConnection;Ljava/sql/Connection;)V
astore 2
start local 2 4: aload 0
invokevirtual java.lang.Object.getClass:()Ljava/lang/Class;
invokevirtual java.lang.Class.getClassLoader:()Ljava/lang/ClassLoader;
5: iconst_2
anewarray java.lang.Class
dup
iconst_0
ldc Ljava/sql/Connection;
aastore
dup
iconst_1
ldc Lorg/postgresql/PGConnection;
aastore
aload 2
6: invokestatic java.lang.reflect.Proxy.newProxyInstance:(Ljava/lang/ClassLoader;[Ljava/lang/Class;Ljava/lang/reflect/InvocationHandler;)Ljava/lang/Object;
checkcast java.sql.Connection
areturn
end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 7 0 this Lorg/postgresql/xa/PGXAConnection;
1 7 1 conn Ljava/sql/Connection;
4 7 2 handler Lorg/postgresql/xa/PGXAConnection$ConnectionHandler;
Exceptions:
throws java.sql.SQLException
public javax.transaction.xa.XAResource getXAResource();
descriptor: ()Ljavax/transaction/xa/XAResource;
flags: (0x0001) ACC_PUBLIC
Code:
stack=1, locals=1, args_size=1
start local 0 0: aload 0
areturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Lorg/postgresql/xa/PGXAConnection;
public void start(javax.transaction.xa.Xid, int);
descriptor: (Ljavax/transaction/xa/Xid;I)V
flags: (0x0001) ACC_PUBLIC
Code:
stack=7, locals=4, args_size=3
start local 0 start local 1 start local 2 0: getstatic org.postgresql.xa.PGXAConnection.LOGGER:Ljava/util/logging/Logger;
getstatic java.util.logging.Level.FINEST:Ljava/util/logging/Level;
invokevirtual java.util.logging.Logger.isLoggable:(Ljava/util/logging/Level;)Z
ifeq 2
1: aload 0
new java.lang.StringBuilder
dup
ldc "starting transaction xid = "
invokespecial java.lang.StringBuilder.<init>:(Ljava/lang/String;)V
aload 1
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/Object;)Ljava/lang/StringBuilder;
invokevirtual java.lang.StringBuilder.toString:()Ljava/lang/String;
invokevirtual org.postgresql.xa.PGXAConnection.debug:(Ljava/lang/String;)V
2: StackMap locals:
StackMap stack:
iload 2
ifeq 5
iload 2
ldc 134217728
if_icmpeq 5
3: iload 2
ldc 2097152
if_icmpeq 5
4: new org.postgresql.xa.PGXAException
dup
ldc "Invalid flags {0}"
iconst_1
anewarray java.lang.Object
dup
iconst_0
iload 2
invokestatic java.lang.Integer.valueOf:(I)Ljava/lang/Integer;
aastore
invokestatic org.postgresql.util.GT.tr:(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;
bipush -5
invokespecial org.postgresql.xa.PGXAException.<init>:(Ljava/lang/String;I)V
athrow
5: StackMap locals:
StackMap stack:
aload 1
ifnonnull 7
6: new org.postgresql.xa.PGXAException
dup
ldc "xid must not be null"
iconst_0
anewarray java.lang.Object
invokestatic org.postgresql.util.GT.tr:(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;
bipush -5
invokespecial org.postgresql.xa.PGXAException.<init>:(Ljava/lang/String;I)V
athrow
7: StackMap locals:
StackMap stack:
aload 0
getfield org.postgresql.xa.PGXAConnection.state:Lorg/postgresql/xa/PGXAConnection$State;
getstatic org.postgresql.xa.PGXAConnection$State.ACTIVE:Lorg/postgresql/xa/PGXAConnection$State;
if_acmpne 11
8: new org.postgresql.xa.PGXAException
dup
ldc "Connection is busy with another transaction"
iconst_0
anewarray java.lang.Object
invokestatic org.postgresql.util.GT.tr:(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;
9: bipush -6
10: invokespecial org.postgresql.xa.PGXAException.<init>:(Ljava/lang/String;I)V
athrow
11: StackMap locals:
StackMap stack:
iload 2
ldc 134217728
if_icmpne 13
12: new org.postgresql.xa.PGXAException
dup
ldc "suspend/resume not implemented"
iconst_0
anewarray java.lang.Object
invokestatic org.postgresql.util.GT.tr:(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;
bipush -3
invokespecial org.postgresql.xa.PGXAException.<init>:(Ljava/lang/String;I)V
athrow
13: StackMap locals:
StackMap stack:
iload 2
ldc 2097152
if_icmpne 28
14: aload 0
getfield org.postgresql.xa.PGXAConnection.state:Lorg/postgresql/xa/PGXAConnection$State;
getstatic org.postgresql.xa.PGXAConnection$State.ENDED:Lorg/postgresql/xa/PGXAConnection$State;
if_acmpeq 21
15: new org.postgresql.xa.PGXAException
dup
16: ldc "Invalid protocol state requested. Attempted transaction interleaving is not supported. xid={0}, currentXid={1}, state={2}, flags={3}"
iconst_4
anewarray java.lang.Object
dup
iconst_0
17: aload 1
aastore
dup
iconst_1
aload 0
getfield org.postgresql.xa.PGXAConnection.currentXid:Ljavax/transaction/xa/Xid;
aastore
dup
iconst_2
aload 0
getfield org.postgresql.xa.PGXAConnection.state:Lorg/postgresql/xa/PGXAConnection$State;
aastore
dup
iconst_3
iload 2
invokestatic java.lang.Integer.valueOf:(I)Ljava/lang/Integer;
aastore
18: invokestatic org.postgresql.util.GT.tr:(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;
19: bipush -3
20: invokespecial org.postgresql.xa.PGXAException.<init>:(Ljava/lang/String;I)V
athrow
21: StackMap locals:
StackMap stack:
aload 1
aload 0
getfield org.postgresql.xa.PGXAConnection.currentXid:Ljavax/transaction/xa/Xid;
invokevirtual java.lang.Object.equals:(Ljava/lang/Object;)Z
ifne 32
22: new org.postgresql.xa.PGXAException
dup
23: ldc "Invalid protocol state requested. Attempted transaction interleaving is not supported. xid={0}, currentXid={1}, state={2}, flags={3}"
iconst_4
anewarray java.lang.Object
dup
iconst_0
24: aload 1
aastore
dup
iconst_1
aload 0
getfield org.postgresql.xa.PGXAConnection.currentXid:Ljavax/transaction/xa/Xid;
aastore
dup
iconst_2
aload 0
getfield org.postgresql.xa.PGXAConnection.state:Lorg/postgresql/xa/PGXAConnection$State;
aastore
dup
iconst_3
iload 2
invokestatic java.lang.Integer.valueOf:(I)Ljava/lang/Integer;
aastore
25: invokestatic org.postgresql.util.GT.tr:(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;
26: bipush -3
27: invokespecial org.postgresql.xa.PGXAException.<init>:(Ljava/lang/String;I)V
athrow
28: StackMap locals:
StackMap stack:
aload 0
getfield org.postgresql.xa.PGXAConnection.state:Lorg/postgresql/xa/PGXAConnection$State;
getstatic org.postgresql.xa.PGXAConnection$State.ENDED:Lorg/postgresql/xa/PGXAConnection$State;
if_acmpne 32
29: new org.postgresql.xa.PGXAException
dup
ldc "Invalid protocol state requested. Attempted transaction interleaving is not supported. xid={0}, currentXid={1}, state={2}, flags={3}"
iconst_4
anewarray java.lang.Object
dup
iconst_0
aload 1
aastore
dup
iconst_1
aload 0
getfield org.postgresql.xa.PGXAConnection.currentXid:Ljavax/transaction/xa/Xid;
aastore
dup
iconst_2
aload 0
getfield org.postgresql.xa.PGXAConnection.state:Lorg/postgresql/xa/PGXAConnection$State;
aastore
dup
iconst_3
iload 2
invokestatic java.lang.Integer.valueOf:(I)Ljava/lang/Integer;
aastore
invokestatic org.postgresql.util.GT.tr:(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;
30: bipush -3
31: invokespecial org.postgresql.xa.PGXAException.<init>:(Ljava/lang/String;I)V
athrow
32: StackMap locals:
StackMap stack:
iload 2
ifne 38
33: aload 0
aload 0
getfield org.postgresql.xa.PGXAConnection.conn:Lorg/postgresql/core/BaseConnection;
invokeinterface org.postgresql.core.BaseConnection.getAutoCommit:()Z
putfield org.postgresql.xa.PGXAConnection.localAutoCommitMode:Z
34: aload 0
getfield org.postgresql.xa.PGXAConnection.conn:Lorg/postgresql/core/BaseConnection;
iconst_0
invokeinterface org.postgresql.core.BaseConnection.setAutoCommit:(Z)V
35: goto 38
StackMap locals:
StackMap stack: java.sql.SQLException
36: astore 3
start local 3 37: new org.postgresql.xa.PGXAException
dup
ldc "Error disabling autocommit"
iconst_0
anewarray java.lang.Object
invokestatic org.postgresql.util.GT.tr:(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;
aload 3
bipush -3
invokespecial org.postgresql.xa.PGXAException.<init>:(Ljava/lang/String;Ljava/lang/Throwable;I)V
athrow
end local 3 38: StackMap locals:
StackMap stack:
aload 0
getstatic org.postgresql.xa.PGXAConnection$State.ACTIVE:Lorg/postgresql/xa/PGXAConnection$State;
putfield org.postgresql.xa.PGXAConnection.state:Lorg/postgresql/xa/PGXAConnection$State;
39: aload 0
aload 1
putfield org.postgresql.xa.PGXAConnection.currentXid:Ljavax/transaction/xa/Xid;
40: aload 0
aconst_null
putfield org.postgresql.xa.PGXAConnection.preparedXid:Ljavax/transaction/xa/Xid;
41: aload 0
iconst_0
putfield org.postgresql.xa.PGXAConnection.committedOrRolledBack:Z
42: return
end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 43 0 this Lorg/postgresql/xa/PGXAConnection;
0 43 1 xid Ljavax/transaction/xa/Xid;
0 43 2 flags I
37 38 3 ex Ljava/sql/SQLException;
Exception table:
from to target type
33 35 36 Class java.sql.SQLException
Exceptions:
throws javax.transaction.xa.XAException
MethodParameters:
Name Flags
xid
flags
public void end(javax.transaction.xa.Xid, int);
descriptor: (Ljavax/transaction/xa/Xid;I)V
flags: (0x0001) ACC_PUBLIC
Code:
stack=7, locals=3, args_size=3
start local 0 start local 1 start local 2 0: getstatic org.postgresql.xa.PGXAConnection.LOGGER:Ljava/util/logging/Logger;
getstatic java.util.logging.Level.FINEST:Ljava/util/logging/Level;
invokevirtual java.util.logging.Logger.isLoggable:(Ljava/util/logging/Level;)Z
ifeq 2
1: aload 0
new java.lang.StringBuilder
dup
ldc "ending transaction xid = "
invokespecial java.lang.StringBuilder.<init>:(Ljava/lang/String;)V
aload 1
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/Object;)Ljava/lang/StringBuilder;
invokevirtual java.lang.StringBuilder.toString:()Ljava/lang/String;
invokevirtual org.postgresql.xa.PGXAConnection.debug:(Ljava/lang/String;)V
2: StackMap locals:
StackMap stack:
iload 2
ldc 33554432
if_icmpeq 5
iload 2
ldc 536870912
if_icmpeq 5
3: iload 2
ldc 67108864
if_icmpeq 5
4: new org.postgresql.xa.PGXAException
dup
ldc "Invalid flags {0}"
iconst_1
anewarray java.lang.Object
dup
iconst_0
iload 2
invokestatic java.lang.Integer.valueOf:(I)Ljava/lang/Integer;
aastore
invokestatic org.postgresql.util.GT.tr:(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;
bipush -5
invokespecial org.postgresql.xa.PGXAException.<init>:(Ljava/lang/String;I)V
athrow
5: StackMap locals:
StackMap stack:
aload 1
ifnonnull 7
6: new org.postgresql.xa.PGXAException
dup
ldc "xid must not be null"
iconst_0
anewarray java.lang.Object
invokestatic org.postgresql.util.GT.tr:(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;
bipush -5
invokespecial org.postgresql.xa.PGXAException.<init>:(Ljava/lang/String;I)V
athrow
7: StackMap locals:
StackMap stack:
aload 0
getfield org.postgresql.xa.PGXAConnection.state:Lorg/postgresql/xa/PGXAConnection$State;
getstatic org.postgresql.xa.PGXAConnection$State.ACTIVE:Lorg/postgresql/xa/PGXAConnection$State;
if_acmpne 8
aload 0
getfield org.postgresql.xa.PGXAConnection.currentXid:Ljavax/transaction/xa/Xid;
aload 1
invokevirtual java.lang.Object.equals:(Ljava/lang/Object;)Z
ifne 11
8: StackMap locals:
StackMap stack:
new org.postgresql.xa.PGXAException
dup
ldc "tried to call end without corresponding start call. state={0}, start xid={1}, currentXid={2}, preparedXid={3}"
iconst_4
anewarray java.lang.Object
dup
iconst_0
aload 0
getfield org.postgresql.xa.PGXAConnection.state:Lorg/postgresql/xa/PGXAConnection$State;
aastore
dup
iconst_1
aload 1
aastore
dup
iconst_2
aload 0
getfield org.postgresql.xa.PGXAConnection.currentXid:Ljavax/transaction/xa/Xid;
aastore
dup
iconst_3
aload 0
getfield org.postgresql.xa.PGXAConnection.preparedXid:Ljavax/transaction/xa/Xid;
aastore
invokestatic org.postgresql.util.GT.tr:(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;
9: bipush -6
10: invokespecial org.postgresql.xa.PGXAException.<init>:(Ljava/lang/String;I)V
athrow
11: StackMap locals:
StackMap stack:
iload 2
ldc 33554432
if_icmpne 13
12: new org.postgresql.xa.PGXAException
dup
ldc "suspend/resume not implemented"
iconst_0
anewarray java.lang.Object
invokestatic org.postgresql.util.GT.tr:(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;
bipush -3
invokespecial org.postgresql.xa.PGXAException.<init>:(Ljava/lang/String;I)V
athrow
13: StackMap locals:
StackMap stack:
aload 0
getstatic org.postgresql.xa.PGXAConnection$State.ENDED:Lorg/postgresql/xa/PGXAConnection$State;
putfield org.postgresql.xa.PGXAConnection.state:Lorg/postgresql/xa/PGXAConnection$State;
14: return
end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 15 0 this Lorg/postgresql/xa/PGXAConnection;
0 15 1 xid Ljavax/transaction/xa/Xid;
0 15 2 flags I
Exceptions:
throws javax.transaction.xa.XAException
MethodParameters:
Name Flags
xid
flags
public int prepare(javax.transaction.xa.Xid);
descriptor: (Ljavax/transaction/xa/Xid;)I
flags: (0x0001) ACC_PUBLIC
Code:
stack=7, locals=5, args_size=2
start local 0 start local 1 0: getstatic org.postgresql.xa.PGXAConnection.LOGGER:Ljava/util/logging/Logger;
getstatic java.util.logging.Level.FINEST:Ljava/util/logging/Level;
invokevirtual java.util.logging.Logger.isLoggable:(Ljava/util/logging/Level;)Z
ifeq 2
1: aload 0
new java.lang.StringBuilder
dup
ldc "preparing transaction xid = "
invokespecial java.lang.StringBuilder.<init>:(Ljava/lang/String;)V
aload 1
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/Object;)Ljava/lang/StringBuilder;
invokevirtual java.lang.StringBuilder.toString:()Ljava/lang/String;
invokevirtual org.postgresql.xa.PGXAConnection.debug:(Ljava/lang/String;)V
2: StackMap locals:
StackMap stack:
aload 0
getfield org.postgresql.xa.PGXAConnection.currentXid:Ljavax/transaction/xa/Xid;
ifnonnull 12
aload 0
getfield org.postgresql.xa.PGXAConnection.preparedXid:Ljavax/transaction/xa/Xid;
ifnull 12
3: getstatic org.postgresql.xa.PGXAConnection.LOGGER:Ljava/util/logging/Logger;
getstatic java.util.logging.Level.FINEST:Ljava/util/logging/Level;
invokevirtual java.util.logging.Logger.isLoggable:(Ljava/util/logging/Level;)Z
ifeq 7
4: aload 0
new java.lang.StringBuilder
dup
ldc "Prepare xid "
invokespecial java.lang.StringBuilder.<init>:(Ljava/lang/String;)V
aload 1
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/Object;)Ljava/lang/StringBuilder;
ldc " but current connection is not attached to a transaction"
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
5: ldc " while it was prepared in past with prepared xid "
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
aload 0
getfield org.postgresql.xa.PGXAConnection.preparedXid:Ljavax/transaction/xa/Xid;
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/Object;)Ljava/lang/StringBuilder;
invokevirtual java.lang.StringBuilder.toString:()Ljava/lang/String;
6: invokevirtual org.postgresql.xa.PGXAConnection.debug:(Ljava/lang/String;)V
7: StackMap locals:
StackMap stack:
new org.postgresql.xa.PGXAException
dup
8: ldc "Preparing already prepared transaction, the prepared xid {0}, prepare xid={1}"
iconst_2
anewarray java.lang.Object
dup
iconst_0
aload 0
getfield org.postgresql.xa.PGXAConnection.preparedXid:Ljavax/transaction/xa/Xid;
aastore
dup
iconst_1
aload 1
aastore
9: invokestatic org.postgresql.util.GT.tr:(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;
10: bipush -6
11: invokespecial org.postgresql.xa.PGXAException.<init>:(Ljava/lang/String;I)V
athrow
12: StackMap locals:
StackMap stack:
aload 0
getfield org.postgresql.xa.PGXAConnection.currentXid:Ljavax/transaction/xa/Xid;
ifnonnull 18
13: new org.postgresql.xa.PGXAException
dup
14: ldc "Current connection does not have an associated xid. prepare xid={0}"
iconst_1
anewarray java.lang.Object
dup
iconst_0
aload 1
aastore
15: invokestatic org.postgresql.util.GT.tr:(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;
16: bipush -4
17: invokespecial org.postgresql.xa.PGXAException.<init>:(Ljava/lang/String;I)V
athrow
18: StackMap locals:
StackMap stack:
aload 0
getfield org.postgresql.xa.PGXAConnection.currentXid:Ljavax/transaction/xa/Xid;
aload 1
invokevirtual java.lang.Object.equals:(Ljava/lang/Object;)Z
ifne 26
19: getstatic org.postgresql.xa.PGXAConnection.LOGGER:Ljava/util/logging/Logger;
getstatic java.util.logging.Level.FINEST:Ljava/util/logging/Level;
invokevirtual java.util.logging.Logger.isLoggable:(Ljava/util/logging/Level;)Z
ifeq 21
20: aload 0
new java.lang.StringBuilder
dup
ldc "Error to prepare xid "
invokespecial java.lang.StringBuilder.<init>:(Ljava/lang/String;)V
aload 1
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/Object;)Ljava/lang/StringBuilder;
ldc ", the current connection already bound with xid "
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
aload 0
getfield org.postgresql.xa.PGXAConnection.currentXid:Ljavax/transaction/xa/Xid;
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/Object;)Ljava/lang/StringBuilder;
invokevirtual java.lang.StringBuilder.toString:()Ljava/lang/String;
invokevirtual org.postgresql.xa.PGXAConnection.debug:(Ljava/lang/String;)V
21: StackMap locals:
StackMap stack:
new org.postgresql.xa.PGXAException
dup
22: ldc "Not implemented: Prepare must be issued using the same connection that started the transaction. currentXid={0}, prepare xid={1}"
iconst_2
anewarray java.lang.Object
dup
iconst_0
aload 0
getfield org.postgresql.xa.PGXAConnection.currentXid:Ljavax/transaction/xa/Xid;
aastore
dup
iconst_1
aload 1
aastore
23: invokestatic org.postgresql.util.GT.tr:(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;
24: bipush -3
25: invokespecial org.postgresql.xa.PGXAException.<init>:(Ljava/lang/String;I)V
athrow
26: StackMap locals:
StackMap stack:
aload 0
getfield org.postgresql.xa.PGXAConnection.state:Lorg/postgresql/xa/PGXAConnection$State;
getstatic org.postgresql.xa.PGXAConnection$State.ENDED:Lorg/postgresql/xa/PGXAConnection$State;
if_acmpeq 28
27: new org.postgresql.xa.PGXAException
dup
ldc "Prepare called before end. prepare xid={0}, state={1}"
iconst_1
anewarray java.lang.Object
dup
iconst_0
aload 1
aastore
invokestatic org.postgresql.util.GT.tr:(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;
bipush -5
invokespecial org.postgresql.xa.PGXAException.<init>:(Ljava/lang/String;I)V
athrow
28: StackMap locals:
StackMap stack:
aload 0
getstatic org.postgresql.xa.PGXAConnection$State.IDLE:Lorg/postgresql/xa/PGXAConnection$State;
putfield org.postgresql.xa.PGXAConnection.state:Lorg/postgresql/xa/PGXAConnection$State;
29: aload 0
aload 0
getfield org.postgresql.xa.PGXAConnection.currentXid:Ljavax/transaction/xa/Xid;
putfield org.postgresql.xa.PGXAConnection.preparedXid:Ljavax/transaction/xa/Xid;
30: aload 0
aconst_null
putfield org.postgresql.xa.PGXAConnection.currentXid:Ljavax/transaction/xa/Xid;
31: aload 1
invokestatic org.postgresql.xa.RecoveredXid.xidToString:(Ljavax/transaction/xa/Xid;)Ljava/lang/String;
astore 2
start local 2 32: aload 0
getfield org.postgresql.xa.PGXAConnection.conn:Lorg/postgresql/core/BaseConnection;
invokeinterface org.postgresql.core.BaseConnection.createStatement:()Ljava/sql/Statement;
astore 3
start local 3 33: aload 3
new java.lang.StringBuilder
dup
ldc "PREPARE TRANSACTION '"
invokespecial java.lang.StringBuilder.<init>:(Ljava/lang/String;)V
aload 2
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
ldc "'"
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
invokevirtual java.lang.StringBuilder.toString:()Ljava/lang/String;
invokeinterface java.sql.Statement.executeUpdate:(Ljava/lang/String;)I
pop
34: goto 38
StackMap locals: org.postgresql.xa.PGXAConnection javax.transaction.xa.Xid java.lang.String java.sql.Statement
StackMap stack: java.lang.Throwable
35: astore 4
36: aload 3
invokeinterface java.sql.Statement.close:()V
37: aload 4
athrow
38: StackMap locals:
StackMap stack:
aload 3
invokeinterface java.sql.Statement.close:()V
39: aload 0
getfield org.postgresql.xa.PGXAConnection.conn:Lorg/postgresql/core/BaseConnection;
aload 0
getfield org.postgresql.xa.PGXAConnection.localAutoCommitMode:Z
invokeinterface org.postgresql.core.BaseConnection.setAutoCommit:(Z)V
40: iconst_0
ireturn
end local 3 end local 2 41: StackMap locals: org.postgresql.xa.PGXAConnection javax.transaction.xa.Xid
StackMap stack: java.sql.SQLException
astore 2
start local 2 42: new org.postgresql.xa.PGXAException
dup
ldc "Error preparing transaction. prepare xid={0}"
iconst_1
anewarray java.lang.Object
dup
iconst_0
aload 1
aastore
invokestatic org.postgresql.util.GT.tr:(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;
aload 2
aload 0
aload 2
invokevirtual org.postgresql.xa.PGXAConnection.mapSQLStateToXAErrorCode:(Ljava/sql/SQLException;)I
invokespecial org.postgresql.xa.PGXAException.<init>:(Ljava/lang/String;Ljava/lang/Throwable;I)V
athrow
end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 43 0 this Lorg/postgresql/xa/PGXAConnection;
0 43 1 xid Ljavax/transaction/xa/Xid;
32 41 2 s Ljava/lang/String;
33 41 3 stmt Ljava/sql/Statement;
42 43 2 ex Ljava/sql/SQLException;
Exception table:
from to target type
33 35 35 any
31 40 41 Class java.sql.SQLException
Exceptions:
throws javax.transaction.xa.XAException
MethodParameters:
Name Flags
xid
public javax.transaction.xa.Xid[] recover(int);
descriptor: (I)[Ljavax/transaction/xa/Xid;
flags: (0x0001) ACC_PUBLIC
Code:
stack=7, locals=8, args_size=2
start local 0 start local 1 0: iload 1
ldc 16777216
if_icmpeq 3
iload 1
ldc 8388608
if_icmpeq 3
iload 1
ifeq 3
1: iload 1
ldc 25165824
if_icmpeq 3
2: new org.postgresql.xa.PGXAException
dup
ldc "Invalid flags {0}"
iconst_1
anewarray java.lang.Object
dup
iconst_0
iload 1
invokestatic java.lang.Integer.valueOf:(I)Ljava/lang/Integer;
aastore
invokestatic org.postgresql.util.GT.tr:(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;
bipush -5
invokespecial org.postgresql.xa.PGXAException.<init>:(Ljava/lang/String;I)V
athrow
3: StackMap locals:
StackMap stack:
iload 1
ldc 16777216
iand
ifne 5
4: iconst_0
anewarray javax.transaction.xa.Xid
areturn
5: StackMap locals:
StackMap stack:
aload 0
getfield org.postgresql.xa.PGXAConnection.conn:Lorg/postgresql/core/BaseConnection;
invokeinterface org.postgresql.core.BaseConnection.createStatement:()Ljava/sql/Statement;
astore 2
start local 2 6: aload 2
7: ldc "SELECT gid FROM pg_prepared_xacts where database = current_database()"
8: invokeinterface java.sql.Statement.executeQuery:(Ljava/lang/String;)Ljava/sql/ResultSet;
astore 3
start local 3 9: new java.util.LinkedList
dup
invokespecial java.util.LinkedList.<init>:()V
astore 4
start local 4 10: goto 14
11: StackMap locals: java.sql.Statement java.sql.ResultSet java.util.LinkedList
StackMap stack:
aload 3
iconst_1
invokeinterface java.sql.ResultSet.getString:(I)Ljava/lang/String;
invokestatic org.postgresql.xa.RecoveredXid.stringToXid:(Ljava/lang/String;)Ljavax/transaction/xa/Xid;
astore 5
start local 5 12: aload 5
ifnull 14
13: aload 4
aload 5
invokevirtual java.util.LinkedList.add:(Ljava/lang/Object;)Z
pop
end local 5 14: StackMap locals:
StackMap stack:
aload 3
invokeinterface java.sql.ResultSet.next:()Z
ifne 11
15: aload 3
invokeinterface java.sql.ResultSet.close:()V
16: aload 4
iconst_0
anewarray javax.transaction.xa.Xid
invokevirtual java.util.LinkedList.toArray:([Ljava/lang/Object;)[Ljava/lang/Object;
checkcast javax.transaction.xa.Xid[]
astore 7
17: aload 2
invokeinterface java.sql.Statement.close:()V
18: aload 7
areturn
end local 4 end local 3 19: StackMap locals: org.postgresql.xa.PGXAConnection int java.sql.Statement
StackMap stack: java.lang.Throwable
astore 6
20: aload 2
invokeinterface java.sql.Statement.close:()V
21: aload 6
athrow
end local 2 22: StackMap locals: org.postgresql.xa.PGXAConnection int
StackMap stack: java.sql.SQLException
astore 2
start local 2 23: new org.postgresql.xa.PGXAException
dup
ldc "Error during recover"
iconst_0
anewarray java.lang.Object
invokestatic org.postgresql.util.GT.tr:(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;
aload 2
bipush -3
invokespecial org.postgresql.xa.PGXAException.<init>:(Ljava/lang/String;Ljava/lang/Throwable;I)V
athrow
end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 24 0 this Lorg/postgresql/xa/PGXAConnection;
0 24 1 flag I
6 22 2 stmt Ljava/sql/Statement;
9 19 3 rs Ljava/sql/ResultSet;
10 19 4 l Ljava/util/LinkedList<Ljavax/transaction/xa/Xid;>;
12 14 5 recoveredXid Ljavax/transaction/xa/Xid;
23 24 2 ex Ljava/sql/SQLException;
Exception table:
from to target type
6 17 19 any
5 18 22 Class java.sql.SQLException
19 22 22 Class java.sql.SQLException
Exceptions:
throws javax.transaction.xa.XAException
MethodParameters:
Name Flags
flag
public void rollback(javax.transaction.xa.Xid);
descriptor: (Ljavax/transaction/xa/Xid;)V
flags: (0x0001) ACC_PUBLIC
Code:
stack=7, locals=5, args_size=2
start local 0 start local 1 0: getstatic org.postgresql.xa.PGXAConnection.LOGGER:Ljava/util/logging/Logger;
getstatic java.util.logging.Level.FINEST:Ljava/util/logging/Level;
invokevirtual java.util.logging.Logger.isLoggable:(Ljava/util/logging/Level;)Z
ifeq 2
1: aload 0
new java.lang.StringBuilder
dup
ldc "rolling back xid = "
invokespecial java.lang.StringBuilder.<init>:(Ljava/lang/String;)V
aload 1
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/Object;)Ljava/lang/StringBuilder;
invokevirtual java.lang.StringBuilder.toString:()Ljava/lang/String;
invokevirtual org.postgresql.xa.PGXAConnection.debug:(Ljava/lang/String;)V
2: StackMap locals:
StackMap stack:
aload 0
getfield org.postgresql.xa.PGXAConnection.currentXid:Ljavax/transaction/xa/Xid;
ifnull 8
aload 0
getfield org.postgresql.xa.PGXAConnection.currentXid:Ljavax/transaction/xa/Xid;
aload 1
invokevirtual java.lang.Object.equals:(Ljava/lang/Object;)Z
ifeq 8
3: aload 0
getstatic org.postgresql.xa.PGXAConnection$State.IDLE:Lorg/postgresql/xa/PGXAConnection$State;
putfield org.postgresql.xa.PGXAConnection.state:Lorg/postgresql/xa/PGXAConnection$State;
4: aload 0
aconst_null
putfield org.postgresql.xa.PGXAConnection.currentXid:Ljavax/transaction/xa/Xid;
5: aload 0
getfield org.postgresql.xa.PGXAConnection.conn:Lorg/postgresql/core/BaseConnection;
invokeinterface org.postgresql.core.BaseConnection.rollback:()V
6: aload 0
getfield org.postgresql.xa.PGXAConnection.conn:Lorg/postgresql/core/BaseConnection;
aload 0
getfield org.postgresql.xa.PGXAConnection.localAutoCommitMode:Z
invokeinterface org.postgresql.core.BaseConnection.setAutoCommit:(Z)V
7: goto 17
8: StackMap locals:
StackMap stack:
aload 1
invokestatic org.postgresql.xa.RecoveredXid.xidToString:(Ljavax/transaction/xa/Xid;)Ljava/lang/String;
astore 2
start local 2 9: aload 0
getfield org.postgresql.xa.PGXAConnection.conn:Lorg/postgresql/core/BaseConnection;
iconst_1
invokeinterface org.postgresql.core.BaseConnection.setAutoCommit:(Z)V
10: aload 0
getfield org.postgresql.xa.PGXAConnection.conn:Lorg/postgresql/core/BaseConnection;
invokeinterface org.postgresql.core.BaseConnection.createStatement:()Ljava/sql/Statement;
astore 3
start local 3 11: aload 3
new java.lang.StringBuilder
dup
ldc "ROLLBACK PREPARED '"
invokespecial java.lang.StringBuilder.<init>:(Ljava/lang/String;)V
aload 2
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
ldc "'"
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
invokevirtual java.lang.StringBuilder.toString:()Ljava/lang/String;
invokeinterface java.sql.Statement.executeUpdate:(Ljava/lang/String;)I
pop
12: goto 16
StackMap locals: org.postgresql.xa.PGXAConnection javax.transaction.xa.Xid java.lang.String java.sql.Statement
StackMap stack: java.lang.Throwable
13: astore 4
14: aload 3
invokeinterface java.sql.Statement.close:()V
15: aload 4
athrow
16: StackMap locals:
StackMap stack:
aload 3
invokeinterface java.sql.Statement.close:()V
end local 3 end local 2 17: StackMap locals:
StackMap stack:
aload 0
iconst_1
putfield org.postgresql.xa.PGXAConnection.committedOrRolledBack:Z
18: goto 35
StackMap locals:
StackMap stack: java.sql.SQLException
19: astore 2
start local 2 20: bipush -3
istore 3
start local 3 21: getstatic org.postgresql.util.PSQLState.UNDEFINED_OBJECT:Lorg/postgresql/util/PSQLState;
invokevirtual org.postgresql.util.PSQLState.getState:()Ljava/lang/String;
aload 2
invokevirtual java.sql.SQLException.getSQLState:()Ljava/lang/String;
invokevirtual java.lang.String.equals:(Ljava/lang/Object;)Z
ifeq 30
22: aload 0
getfield org.postgresql.xa.PGXAConnection.committedOrRolledBack:Z
ifne 23
aload 1
aload 0
getfield org.postgresql.xa.PGXAConnection.preparedXid:Ljavax/transaction/xa/Xid;
invokevirtual java.lang.Object.equals:(Ljava/lang/Object;)Z
ifne 30
23: StackMap locals: java.sql.SQLException int
StackMap stack:
getstatic org.postgresql.xa.PGXAConnection.LOGGER:Ljava/util/logging/Logger;
getstatic java.util.logging.Level.FINEST:Ljava/util/logging/Level;
invokevirtual java.util.logging.Logger.isLoggable:(Ljava/util/logging/Level;)Z
ifeq 29
24: aload 0
new java.lang.StringBuilder
dup
ldc "rolling back xid "
invokespecial java.lang.StringBuilder.<init>:(Ljava/lang/String;)V
aload 1
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/Object;)Ljava/lang/StringBuilder;
ldc " while the connection prepared xid is "
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
aload 0
getfield org.postgresql.xa.PGXAConnection.preparedXid:Ljavax/transaction/xa/Xid;
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/Object;)Ljava/lang/StringBuilder;
25: aload 0
getfield org.postgresql.xa.PGXAConnection.committedOrRolledBack:Z
ifeq 26
ldc ", but the connection was already committed/rolled-back"
goto 27
StackMap locals: org.postgresql.xa.PGXAConnection javax.transaction.xa.Xid java.sql.SQLException int
StackMap stack: org.postgresql.xa.PGXAConnection java.lang.StringBuilder
26: ldc ""
StackMap locals: org.postgresql.xa.PGXAConnection javax.transaction.xa.Xid java.sql.SQLException int
StackMap stack: org.postgresql.xa.PGXAConnection java.lang.StringBuilder java.lang.String
27: invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
invokevirtual java.lang.StringBuilder.toString:()Ljava/lang/String;
28: invokevirtual org.postgresql.xa.PGXAConnection.debug:(Ljava/lang/String;)V
29: StackMap locals:
StackMap stack:
bipush -4
istore 3
30: StackMap locals:
StackMap stack:
aload 2
invokevirtual java.sql.SQLException.getSQLState:()Ljava/lang/String;
invokestatic org.postgresql.util.PSQLState.isConnectionError:(Ljava/lang/String;)Z
ifeq 34
31: getstatic org.postgresql.xa.PGXAConnection.LOGGER:Ljava/util/logging/Logger;
getstatic java.util.logging.Level.FINEST:Ljava/util/logging/Level;
invokevirtual java.util.logging.Logger.isLoggable:(Ljava/util/logging/Level;)Z
ifeq 33
32: aload 0
new java.lang.StringBuilder
dup
ldc "rollback connection failure (sql error code "
invokespecial java.lang.StringBuilder.<init>:(Ljava/lang/String;)V
aload 2
invokevirtual java.sql.SQLException.getSQLState:()Ljava/lang/String;
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
ldc "), reconnection could be expected"
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
invokevirtual java.lang.StringBuilder.toString:()Ljava/lang/String;
invokevirtual org.postgresql.xa.PGXAConnection.debug:(Ljava/lang/String;)V
33: StackMap locals:
StackMap stack:
bipush -7
istore 3
34: StackMap locals:
StackMap stack:
new org.postgresql.xa.PGXAException
dup
ldc "Error rolling back prepared transaction. rollback xid={0}, preparedXid={1}, currentXid={2}"
iconst_2
anewarray java.lang.Object
dup
iconst_0
aload 1
aastore
dup
iconst_1
aload 0
getfield org.postgresql.xa.PGXAConnection.preparedXid:Ljavax/transaction/xa/Xid;
aastore
invokestatic org.postgresql.util.GT.tr:(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;
aload 2
iload 3
invokespecial org.postgresql.xa.PGXAException.<init>:(Ljava/lang/String;Ljava/lang/Throwable;I)V
athrow
end local 3 end local 2 35: StackMap locals:
StackMap stack:
return
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 36 0 this Lorg/postgresql/xa/PGXAConnection;
0 36 1 xid Ljavax/transaction/xa/Xid;
9 17 2 s Ljava/lang/String;
11 17 3 stmt Ljava/sql/Statement;
20 35 2 ex Ljava/sql/SQLException;
21 35 3 errorCode I
Exception table:
from to target type
11 13 13 any
2 18 19 Class java.sql.SQLException
Exceptions:
throws javax.transaction.xa.XAException
MethodParameters:
Name Flags
xid
public void commit(javax.transaction.xa.Xid, boolean);
descriptor: (Ljavax/transaction/xa/Xid;Z)V
flags: (0x0001) ACC_PUBLIC
Code:
stack=4, locals=3, args_size=3
start local 0 start local 1 start local 2 0: getstatic org.postgresql.xa.PGXAConnection.LOGGER:Ljava/util/logging/Logger;
getstatic java.util.logging.Level.FINEST:Ljava/util/logging/Level;
invokevirtual java.util.logging.Logger.isLoggable:(Ljava/util/logging/Level;)Z
ifeq 4
1: aload 0
new java.lang.StringBuilder
dup
ldc "committing xid = "
invokespecial java.lang.StringBuilder.<init>:(Ljava/lang/String;)V
aload 1
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/Object;)Ljava/lang/StringBuilder;
iload 2
ifeq 2
ldc " (one phase) "
goto 3
StackMap locals: org.postgresql.xa.PGXAConnection javax.transaction.xa.Xid int
StackMap stack: org.postgresql.xa.PGXAConnection java.lang.StringBuilder
2: ldc " (two phase)"
StackMap locals: org.postgresql.xa.PGXAConnection javax.transaction.xa.Xid int
StackMap stack: org.postgresql.xa.PGXAConnection java.lang.StringBuilder java.lang.String
3: invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
invokevirtual java.lang.StringBuilder.toString:()Ljava/lang/String;
invokevirtual org.postgresql.xa.PGXAConnection.debug:(Ljava/lang/String;)V
4: StackMap locals:
StackMap stack:
aload 1
ifnonnull 6
5: new org.postgresql.xa.PGXAException
dup
ldc "xid must not be null"
iconst_0
anewarray java.lang.Object
invokestatic org.postgresql.util.GT.tr:(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;
bipush -5
invokespecial org.postgresql.xa.PGXAException.<init>:(Ljava/lang/String;I)V
athrow
6: StackMap locals:
StackMap stack:
iload 2
ifeq 9
7: aload 0
aload 1
invokevirtual org.postgresql.xa.PGXAConnection.commitOnePhase:(Ljavax/transaction/xa/Xid;)V
8: goto 10
9: StackMap locals:
StackMap stack:
aload 0
aload 1
invokevirtual org.postgresql.xa.PGXAConnection.commitPrepared:(Ljavax/transaction/xa/Xid;)V
10: StackMap locals:
StackMap stack:
return
end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 11 0 this Lorg/postgresql/xa/PGXAConnection;
0 11 1 xid Ljavax/transaction/xa/Xid;
0 11 2 onePhase Z
Exceptions:
throws javax.transaction.xa.XAException
MethodParameters:
Name Flags
xid
onePhase
private void commitOnePhase(javax.transaction.xa.Xid);
descriptor: (Ljavax/transaction/xa/Xid;)V
flags: (0x0002) ACC_PRIVATE
Code:
stack=7, locals=3, args_size=2
start local 0 start local 1 0: aload 1
aload 0
getfield org.postgresql.xa.PGXAConnection.preparedXid:Ljavax/transaction/xa/Xid;
invokevirtual java.lang.Object.equals:(Ljava/lang/Object;)Z
ifeq 6
1: new org.postgresql.xa.PGXAException
dup
ldc "One-phase commit called for xid {0} but connection was prepared with xid {1}"
iconst_2
anewarray java.lang.Object
dup
iconst_0
2: aload 1
aastore
dup
iconst_1
aload 0
getfield org.postgresql.xa.PGXAConnection.preparedXid:Ljavax/transaction/xa/Xid;
aastore
3: invokestatic org.postgresql.util.GT.tr:(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;
4: bipush -6
5: invokespecial org.postgresql.xa.PGXAException.<init>:(Ljava/lang/String;I)V
athrow
6: StackMap locals:
StackMap stack:
aload 0
getfield org.postgresql.xa.PGXAConnection.currentXid:Ljavax/transaction/xa/Xid;
ifnonnull 12
aload 0
getfield org.postgresql.xa.PGXAConnection.committedOrRolledBack:Z
ifne 12
7: new org.postgresql.xa.PGXAException
dup
8: ldc "Not implemented: one-phase commit must be issued using the same connection that was used to start it"
iconst_1
anewarray java.lang.Object
dup
iconst_0
aload 1
aastore
9: invokestatic org.postgresql.util.GT.tr:(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;
10: bipush -3
11: invokespecial org.postgresql.xa.PGXAException.<init>:(Ljava/lang/String;I)V
athrow
12: StackMap locals:
StackMap stack:
aload 1
aload 0
getfield org.postgresql.xa.PGXAConnection.currentXid:Ljavax/transaction/xa/Xid;
invokevirtual java.lang.Object.equals:(Ljava/lang/Object;)Z
ifeq 13
aload 0
getfield org.postgresql.xa.PGXAConnection.committedOrRolledBack:Z
ifeq 18
13: StackMap locals:
StackMap stack:
new org.postgresql.xa.PGXAException
dup
ldc "One-phase commit with unknown xid. commit xid={0}, currentXid={1}"
iconst_2
anewarray java.lang.Object
dup
iconst_0
14: aload 1
aastore
dup
iconst_1
aload 0
getfield org.postgresql.xa.PGXAConnection.currentXid:Ljavax/transaction/xa/Xid;
aastore
15: invokestatic org.postgresql.util.GT.tr:(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;
16: bipush -4
17: invokespecial org.postgresql.xa.PGXAException.<init>:(Ljava/lang/String;I)V
athrow
18: StackMap locals:
StackMap stack:
aload 0
getfield org.postgresql.xa.PGXAConnection.state:Lorg/postgresql/xa/PGXAConnection$State;
getstatic org.postgresql.xa.PGXAConnection$State.ENDED:Lorg/postgresql/xa/PGXAConnection$State;
if_acmpeq 20
19: new org.postgresql.xa.PGXAException
dup
ldc "commit called before end. commit xid={0}, state={1}"
iconst_2
anewarray java.lang.Object
dup
iconst_0
aload 1
aastore
dup
iconst_1
aload 0
getfield org.postgresql.xa.PGXAConnection.state:Lorg/postgresql/xa/PGXAConnection$State;
aastore
invokestatic org.postgresql.util.GT.tr:(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;
bipush -6
invokespecial org.postgresql.xa.PGXAException.<init>:(Ljava/lang/String;I)V
athrow
20: StackMap locals:
StackMap stack:
aload 0
getstatic org.postgresql.xa.PGXAConnection$State.IDLE:Lorg/postgresql/xa/PGXAConnection$State;
putfield org.postgresql.xa.PGXAConnection.state:Lorg/postgresql/xa/PGXAConnection$State;
21: aload 0
aconst_null
putfield org.postgresql.xa.PGXAConnection.currentXid:Ljavax/transaction/xa/Xid;
22: aload 0
iconst_1
putfield org.postgresql.xa.PGXAConnection.committedOrRolledBack:Z
23: aload 0
getfield org.postgresql.xa.PGXAConnection.conn:Lorg/postgresql/core/BaseConnection;
invokeinterface org.postgresql.core.BaseConnection.commit:()V
24: aload 0
getfield org.postgresql.xa.PGXAConnection.conn:Lorg/postgresql/core/BaseConnection;
aload 0
getfield org.postgresql.xa.PGXAConnection.localAutoCommitMode:Z
invokeinterface org.postgresql.core.BaseConnection.setAutoCommit:(Z)V
25: goto 28
StackMap locals:
StackMap stack: java.sql.SQLException
26: astore 2
start local 2 27: new org.postgresql.xa.PGXAException
dup
ldc "Error during one-phase commit. commit xid={0}"
iconst_1
anewarray java.lang.Object
dup
iconst_0
aload 1
aastore
invokestatic org.postgresql.util.GT.tr:(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;
aload 2
aload 0
aload 2
invokevirtual org.postgresql.xa.PGXAConnection.mapSQLStateToXAErrorCode:(Ljava/sql/SQLException;)I
invokespecial org.postgresql.xa.PGXAException.<init>:(Ljava/lang/String;Ljava/lang/Throwable;I)V
athrow
end local 2 28: StackMap locals:
StackMap stack:
return
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 29 0 this Lorg/postgresql/xa/PGXAConnection;
0 29 1 xid Ljavax/transaction/xa/Xid;
27 28 2 ex Ljava/sql/SQLException;
Exception table:
from to target type
0 25 26 Class java.sql.SQLException
Exceptions:
throws javax.transaction.xa.XAException
MethodParameters:
Name Flags
xid
private void commitPrepared(javax.transaction.xa.Xid);
descriptor: (Ljavax/transaction/xa/Xid;)V
flags: (0x0002) ACC_PRIVATE
Code:
stack=7, locals=5, args_size=2
start local 0 start local 1 0: aload 0
getfield org.postgresql.xa.PGXAConnection.state:Lorg/postgresql/xa/PGXAConnection$State;
getstatic org.postgresql.xa.PGXAConnection$State.IDLE:Lorg/postgresql/xa/PGXAConnection$State;
if_acmpne 2
1: aload 0
getfield org.postgresql.xa.PGXAConnection.conn:Lorg/postgresql/core/BaseConnection;
invokeinterface org.postgresql.core.BaseConnection.getTransactionState:()Lorg/postgresql/core/TransactionState;
getstatic org.postgresql.core.TransactionState.IDLE:Lorg/postgresql/core/TransactionState;
if_acmpeq 6
2: StackMap locals:
StackMap stack:
new org.postgresql.xa.PGXAException
dup
3: ldc "Not implemented: 2nd phase commit must be issued using an idle connection. commit xid={0}, currentXid={1}, state={2}, transactionState={3}"
iconst_4
anewarray java.lang.Object
dup
iconst_0
aload 1
aastore
dup
iconst_1
aload 0
getfield org.postgresql.xa.PGXAConnection.currentXid:Ljavax/transaction/xa/Xid;
aastore
dup
iconst_2
aload 0
getfield org.postgresql.xa.PGXAConnection.state:Lorg/postgresql/xa/PGXAConnection$State;
aastore
dup
iconst_3
aload 0
getfield org.postgresql.xa.PGXAConnection.conn:Lorg/postgresql/core/BaseConnection;
invokeinterface org.postgresql.core.BaseConnection.getTransactionState:()Lorg/postgresql/core/TransactionState;
aastore
invokestatic org.postgresql.util.GT.tr:(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;
4: bipush -3
5: invokespecial org.postgresql.xa.PGXAException.<init>:(Ljava/lang/String;I)V
athrow
6: StackMap locals:
StackMap stack:
aload 1
invokestatic org.postgresql.xa.RecoveredXid.xidToString:(Ljavax/transaction/xa/Xid;)Ljava/lang/String;
astore 2
start local 2 7: aload 0
aload 0
getfield org.postgresql.xa.PGXAConnection.conn:Lorg/postgresql/core/BaseConnection;
invokeinterface org.postgresql.core.BaseConnection.getAutoCommit:()Z
putfield org.postgresql.xa.PGXAConnection.localAutoCommitMode:Z
8: aload 0
getfield org.postgresql.xa.PGXAConnection.conn:Lorg/postgresql/core/BaseConnection;
iconst_1
invokeinterface org.postgresql.core.BaseConnection.setAutoCommit:(Z)V
9: aload 0
getfield org.postgresql.xa.PGXAConnection.conn:Lorg/postgresql/core/BaseConnection;
invokeinterface org.postgresql.core.BaseConnection.createStatement:()Ljava/sql/Statement;
astore 3
start local 3 10: aload 3
new java.lang.StringBuilder
dup
ldc "COMMIT PREPARED '"
invokespecial java.lang.StringBuilder.<init>:(Ljava/lang/String;)V
aload 2
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
ldc "'"
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
invokevirtual java.lang.StringBuilder.toString:()Ljava/lang/String;
invokeinterface java.sql.Statement.executeUpdate:(Ljava/lang/String;)I
pop
11: goto 16
StackMap locals: org.postgresql.xa.PGXAConnection javax.transaction.xa.Xid java.lang.String java.sql.Statement
StackMap stack: java.lang.Throwable
12: astore 4
13: aload 3
invokeinterface java.sql.Statement.close:()V
14: aload 0
getfield org.postgresql.xa.PGXAConnection.conn:Lorg/postgresql/core/BaseConnection;
aload 0
getfield org.postgresql.xa.PGXAConnection.localAutoCommitMode:Z
invokeinterface org.postgresql.core.BaseConnection.setAutoCommit:(Z)V
15: aload 4
athrow
16: StackMap locals:
StackMap stack:
aload 3
invokeinterface java.sql.Statement.close:()V
17: aload 0
getfield org.postgresql.xa.PGXAConnection.conn:Lorg/postgresql/core/BaseConnection;
aload 0
getfield org.postgresql.xa.PGXAConnection.localAutoCommitMode:Z
invokeinterface org.postgresql.core.BaseConnection.setAutoCommit:(Z)V
18: aload 0
iconst_1
putfield org.postgresql.xa.PGXAConnection.committedOrRolledBack:Z
end local 3 end local 2 19: goto 36
StackMap locals: org.postgresql.xa.PGXAConnection javax.transaction.xa.Xid
StackMap stack: java.sql.SQLException
20: astore 2
start local 2 21: bipush -3
istore 3
start local 3 22: getstatic org.postgresql.util.PSQLState.UNDEFINED_OBJECT:Lorg/postgresql/util/PSQLState;
invokevirtual org.postgresql.util.PSQLState.getState:()Ljava/lang/String;
aload 2
invokevirtual java.sql.SQLException.getSQLState:()Ljava/lang/String;
invokevirtual java.lang.String.equals:(Ljava/lang/Object;)Z
ifeq 31
23: aload 0
getfield org.postgresql.xa.PGXAConnection.committedOrRolledBack:Z
ifne 24
aload 1
aload 0
getfield org.postgresql.xa.PGXAConnection.preparedXid:Ljavax/transaction/xa/Xid;
invokevirtual java.lang.Object.equals:(Ljava/lang/Object;)Z
ifne 31
24: StackMap locals: java.sql.SQLException int
StackMap stack:
getstatic org.postgresql.xa.PGXAConnection.LOGGER:Ljava/util/logging/Logger;
getstatic java.util.logging.Level.FINEST:Ljava/util/logging/Level;
invokevirtual java.util.logging.Logger.isLoggable:(Ljava/util/logging/Level;)Z
ifeq 30
25: aload 0
new java.lang.StringBuilder
dup
ldc "committing xid "
invokespecial java.lang.StringBuilder.<init>:(Ljava/lang/String;)V
aload 1
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/Object;)Ljava/lang/StringBuilder;
ldc " while the connection prepared xid is "
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
aload 0
getfield org.postgresql.xa.PGXAConnection.preparedXid:Ljavax/transaction/xa/Xid;
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/Object;)Ljava/lang/StringBuilder;
26: aload 0
getfield org.postgresql.xa.PGXAConnection.committedOrRolledBack:Z
ifeq 27
ldc ", but the connection was already committed/rolled-back"
goto 28
StackMap locals: org.postgresql.xa.PGXAConnection javax.transaction.xa.Xid java.sql.SQLException int
StackMap stack: org.postgresql.xa.PGXAConnection java.lang.StringBuilder
27: ldc ""
StackMap locals: org.postgresql.xa.PGXAConnection javax.transaction.xa.Xid java.sql.SQLException int
StackMap stack: org.postgresql.xa.PGXAConnection java.lang.StringBuilder java.lang.String
28: invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
invokevirtual java.lang.StringBuilder.toString:()Ljava/lang/String;
29: invokevirtual org.postgresql.xa.PGXAConnection.debug:(Ljava/lang/String;)V
30: StackMap locals:
StackMap stack:
bipush -4
istore 3
31: StackMap locals:
StackMap stack:
aload 2
invokevirtual java.sql.SQLException.getSQLState:()Ljava/lang/String;
invokestatic org.postgresql.util.PSQLState.isConnectionError:(Ljava/lang/String;)Z
ifeq 35
32: getstatic org.postgresql.xa.PGXAConnection.LOGGER:Ljava/util/logging/Logger;
getstatic java.util.logging.Level.FINEST:Ljava/util/logging/Level;
invokevirtual java.util.logging.Logger.isLoggable:(Ljava/util/logging/Level;)Z
ifeq 34
33: aload 0
new java.lang.StringBuilder
dup
ldc "commit connection failure (sql error code "
invokespecial java.lang.StringBuilder.<init>:(Ljava/lang/String;)V
aload 2
invokevirtual java.sql.SQLException.getSQLState:()Ljava/lang/String;
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
ldc "), reconnection could be expected"
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
invokevirtual java.lang.StringBuilder.toString:()Ljava/lang/String;
invokevirtual org.postgresql.xa.PGXAConnection.debug:(Ljava/lang/String;)V
34: StackMap locals:
StackMap stack:
bipush -7
istore 3
35: StackMap locals:
StackMap stack:
new org.postgresql.xa.PGXAException
dup
ldc "Error committing prepared transaction. commit xid={0}, preparedXid={1}, currentXid={2}"
iconst_3
anewarray java.lang.Object
dup
iconst_0
aload 1
aastore
dup
iconst_1
aload 0
getfield org.postgresql.xa.PGXAConnection.preparedXid:Ljavax/transaction/xa/Xid;
aastore
dup
iconst_2
aload 0
getfield org.postgresql.xa.PGXAConnection.currentXid:Ljavax/transaction/xa/Xid;
aastore
invokestatic org.postgresql.util.GT.tr:(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;
aload 2
iload 3
invokespecial org.postgresql.xa.PGXAException.<init>:(Ljava/lang/String;Ljava/lang/Throwable;I)V
athrow
end local 3 end local 2 36: StackMap locals:
StackMap stack:
return
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 37 0 this Lorg/postgresql/xa/PGXAConnection;
0 37 1 xid Ljavax/transaction/xa/Xid;
7 19 2 s Ljava/lang/String;
10 19 3 stmt Ljava/sql/Statement;
21 36 2 ex Ljava/sql/SQLException;
22 36 3 errorCode I
Exception table:
from to target type
10 12 12 any
0 19 20 Class java.sql.SQLException
Exceptions:
throws javax.transaction.xa.XAException
MethodParameters:
Name Flags
xid
public boolean isSameRM(javax.transaction.xa.XAResource);
descriptor: (Ljavax/transaction/xa/XAResource;)Z
flags: (0x0001) ACC_PUBLIC
Code:
stack=2, locals=2, args_size=2
start local 0 start local 1 0: aload 1
aload 0
if_acmpne 1
iconst_1
ireturn
StackMap locals:
StackMap stack:
1: iconst_0
ireturn
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 2 0 this Lorg/postgresql/xa/PGXAConnection;
0 2 1 xares Ljavax/transaction/xa/XAResource;
Exceptions:
throws javax.transaction.xa.XAException
MethodParameters:
Name Flags
xares
public void forget(javax.transaction.xa.Xid);
descriptor: (Ljavax/transaction/xa/Xid;)V
flags: (0x0001) ACC_PUBLIC
Code:
stack=7, locals=2, args_size=2
start local 0 start local 1 0: new org.postgresql.xa.PGXAException
dup
ldc "Heuristic commit/rollback not supported. forget xid={0}"
iconst_1
anewarray java.lang.Object
dup
iconst_0
aload 1
aastore
invokestatic org.postgresql.util.GT.tr:(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;
1: bipush -4
2: invokespecial org.postgresql.xa.PGXAException.<init>:(Ljava/lang/String;I)V
athrow
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 3 0 this Lorg/postgresql/xa/PGXAConnection;
0 3 1 xid Ljavax/transaction/xa/Xid;
Exceptions:
throws javax.transaction.xa.XAException
MethodParameters:
Name Flags
xid
public int getTransactionTimeout();
descriptor: ()I
flags: (0x0001) ACC_PUBLIC
Code:
stack=1, locals=1, args_size=1
start local 0 0: iconst_0
ireturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Lorg/postgresql/xa/PGXAConnection;
public boolean setTransactionTimeout(int);
descriptor: (I)Z
flags: (0x0001) ACC_PUBLIC
Code:
stack=1, locals=2, args_size=2
start local 0 start local 1 0: iconst_0
ireturn
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Lorg/postgresql/xa/PGXAConnection;
0 1 1 seconds I
MethodParameters:
Name Flags
seconds
private int mapSQLStateToXAErrorCode(java.sql.SQLException);
descriptor: (Ljava/sql/SQLException;)I
flags: (0x0002) ACC_PRIVATE
Code:
stack=2, locals=2, args_size=2
start local 0 start local 1 0: aload 0
aload 1
invokevirtual org.postgresql.xa.PGXAConnection.isPostgreSQLIntegrityConstraintViolation:(Ljava/sql/SQLException;)Z
ifeq 2
1: bipush 103
ireturn
2: StackMap locals:
StackMap stack:
bipush -7
ireturn
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 3 0 this Lorg/postgresql/xa/PGXAConnection;
0 3 1 sqlException Ljava/sql/SQLException;
MethodParameters:
Name Flags
sqlException
private boolean isPostgreSQLIntegrityConstraintViolation(java.sql.SQLException);
descriptor: (Ljava/sql/SQLException;)Z
flags: (0x0002) ACC_PRIVATE
Code:
stack=2, locals=2, args_size=2
start local 0 start local 1 0: aload 1
instanceof org.postgresql.util.PSQLException
ifeq 4
1: aload 1
invokevirtual java.sql.SQLException.getSQLState:()Ljava/lang/String;
invokevirtual java.lang.String.length:()I
iconst_5
if_icmpne 4
2: aload 1
invokevirtual java.sql.SQLException.getSQLState:()Ljava/lang/String;
ldc "23"
invokevirtual java.lang.String.startsWith:(Ljava/lang/String;)Z
ifeq 4
3: iconst_1
ireturn
StackMap locals:
StackMap stack:
4: iconst_0
ireturn
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 5 0 this Lorg/postgresql/xa/PGXAConnection;
0 5 1 sqlException Ljava/sql/SQLException;
MethodParameters:
Name Flags
sqlException
}
SourceFile: "PGXAConnection.java"
NestMembers:
org.postgresql.xa.PGXAConnection$ConnectionHandler org.postgresql.xa.PGXAConnection$State
InnerClasses:
private ConnectionHandler = org.postgresql.xa.PGXAConnection$ConnectionHandler of org.postgresql.xa.PGXAConnection
private final State = org.postgresql.xa.PGXAConnection$State of org.postgresql.xa.PGXAConnection