* 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,
|
p_vo = new CStatementVO (resultSetType, resultSetConcurrency,
|
||||||
DB.getDatabase().convertStatement(sql0));
|
DB.getDatabase().convertStatement(sql0));
|
||||||
|
|
||||||
|
p_vo.setTrxName(trxName);
|
||||||
|
|
||||||
// Local access
|
// Local access
|
||||||
if (!DB.isRemoteObjects())
|
if (!DB.isRemoteObjects())
|
||||||
{
|
{
|
||||||
|
@ -972,7 +974,7 @@ public class CPreparedStatement extends CStatement implements PreparedStatement
|
||||||
// return null;
|
// return null;
|
||||||
**/
|
**/
|
||||||
// shared connection
|
// shared connection
|
||||||
Connection conn = local_getConnection (null);
|
Connection conn = local_getConnection (p_vo.getTrxName());
|
||||||
PreparedStatement pstmt = null;
|
PreparedStatement pstmt = null;
|
||||||
RowSet rowSet = null;
|
RowSet rowSet = null;
|
||||||
try
|
try
|
||||||
|
@ -1054,7 +1056,7 @@ public class CPreparedStatement extends CStatement implements PreparedStatement
|
||||||
if (db == null)
|
if (db == null)
|
||||||
throw new NullPointerException("Remote - No Database");
|
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();
|
int result = pstmt.executeUpdate();
|
||||||
pstmt.close();
|
pstmt.close();
|
||||||
//
|
//
|
||||||
|
|
|
@ -723,7 +723,7 @@ public class CStatement implements Statement
|
||||||
if (db == null)
|
if (db == null)
|
||||||
throw new NullPointerException("Remote - No Database");
|
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());
|
int result = pstmt.executeUpdate(p_vo.getSql());
|
||||||
pstmt.close();
|
pstmt.close();
|
||||||
//
|
//
|
||||||
|
@ -838,7 +838,7 @@ public class CStatement implements Statement
|
||||||
// return null;
|
// return null;
|
||||||
**/
|
**/
|
||||||
// Shared Connection
|
// Shared Connection
|
||||||
Connection conn = local_getConnection (null);
|
Connection conn = local_getConnection (p_vo.getTrxName());
|
||||||
PreparedStatement pstmt = null;
|
PreparedStatement pstmt = null;
|
||||||
RowSet rowSet = null;
|
RowSet rowSet = null;
|
||||||
try
|
try
|
||||||
|
|
|
@ -61,6 +61,8 @@ public class CStatementVO implements Serializable
|
||||||
private String m_sql;
|
private String m_sql;
|
||||||
/** Parameters */
|
/** Parameters */
|
||||||
private ArrayList<Object> m_parameters = new ArrayList<Object>();
|
private ArrayList<Object> m_parameters = new ArrayList<Object>();
|
||||||
|
/** Transaction Name **/
|
||||||
|
private String m_trxName = null;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* String representation
|
* String representation
|
||||||
|
@ -191,5 +193,22 @@ public class CStatementVO implements Serializable
|
||||||
{
|
{
|
||||||
m_resultSetConcurrency = resultSetConcurrency;
|
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
|
} // CStatementVO
|
||||||
|
|
Loading…
Reference in New Issue