* part of fix for bug [1619933]
This commit is contained in:
parent
6d9d26be64
commit
42d16ef526
|
@ -52,6 +52,8 @@ public class CPreparedStatement extends CStatement implements PreparedStatement
|
|||
p_vo = new CStatementVO (resultSetType, resultSetConcurrency,
|
||||
DB.getDatabase().convertStatement(sql0));
|
||||
|
||||
p_vo.setTrxName(trxName);
|
||||
|
||||
// Local access
|
||||
if (!DB.isRemoteObjects())
|
||||
{
|
||||
|
@ -972,7 +974,7 @@ public class CPreparedStatement extends CStatement implements PreparedStatement
|
|||
// return null;
|
||||
**/
|
||||
// shared connection
|
||||
Connection conn = local_getConnection (null);
|
||||
Connection conn = local_getConnection (p_vo.getTrxName());
|
||||
PreparedStatement pstmt = null;
|
||||
RowSet rowSet = null;
|
||||
try
|
||||
|
@ -1054,7 +1056,7 @@ public class CPreparedStatement extends CStatement implements PreparedStatement
|
|||
if (db == null)
|
||||
throw new NullPointerException("Remote - No Database");
|
||||
//
|
||||
PreparedStatement pstmt = local_getPreparedStatement (false, null); // shared connection
|
||||
PreparedStatement pstmt = local_getPreparedStatement (false, p_vo.getTrxName());
|
||||
int result = pstmt.executeUpdate();
|
||||
pstmt.close();
|
||||
//
|
||||
|
|
|
@ -723,7 +723,7 @@ public class CStatement implements Statement
|
|||
if (db == null)
|
||||
throw new NullPointerException("Remote - No Database");
|
||||
//
|
||||
Statement pstmt = local_getStatement (false, null); // shared connection
|
||||
Statement pstmt = local_getStatement (false, p_vo.getTrxName());
|
||||
int result = pstmt.executeUpdate(p_vo.getSql());
|
||||
pstmt.close();
|
||||
//
|
||||
|
@ -838,7 +838,7 @@ public class CStatement implements Statement
|
|||
// return null;
|
||||
**/
|
||||
// Shared Connection
|
||||
Connection conn = local_getConnection (null);
|
||||
Connection conn = local_getConnection (p_vo.getTrxName());
|
||||
PreparedStatement pstmt = null;
|
||||
RowSet rowSet = null;
|
||||
try
|
||||
|
|
|
@ -61,6 +61,8 @@ public class CStatementVO implements Serializable
|
|||
private String m_sql;
|
||||
/** Parameters */
|
||||
private ArrayList<Object> m_parameters = new ArrayList<Object>();
|
||||
/** Transaction Name **/
|
||||
private String m_trxName = null;
|
||||
|
||||
/**
|
||||
* String representation
|
||||
|
@ -192,4 +194,21 @@ public class CStatementVO implements Serializable
|
|||
m_resultSetConcurrency = resultSetConcurrency;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return transaction name
|
||||
*/
|
||||
public String getTrxName()
|
||||
{
|
||||
return m_trxName;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set transaction name
|
||||
* @param trxName
|
||||
*/
|
||||
public void setTrxName(String trxName)
|
||||
{
|
||||
m_trxName = trxName;
|
||||
}
|
||||
|
||||
} // CStatementVO
|
||||
|
|
Loading…
Reference in New Issue