* Fixed for bug [1628405]
* Initial work for bug [1619933]
This commit is contained in:
parent
fef8573358
commit
b2cce7d61f
|
@ -1047,11 +1047,11 @@ public final class DB
|
||||||
Connection conn = null;
|
Connection conn = null;
|
||||||
Trx trx = trxName == null ? null : Trx.get(trxName, true);
|
Trx trx = trxName == null ? null : Trx.get(trxName, true);
|
||||||
if (trx != null)
|
if (trx != null)
|
||||||
conn = trx.getConnection();
|
return trx.commit(true);
|
||||||
else
|
else
|
||||||
conn = DB.getConnectionRW ();
|
conn = DB.getConnectionRW ();
|
||||||
// if (!conn.getAutoCommit())
|
if (conn != null && !conn.getAutoCommit())
|
||||||
conn.commit();
|
conn.commit();
|
||||||
}
|
}
|
||||||
catch (SQLException e)
|
catch (SQLException e)
|
||||||
{
|
{
|
||||||
|
@ -1078,11 +1078,11 @@ public final class DB
|
||||||
Connection conn = null;
|
Connection conn = null;
|
||||||
Trx trx = trxName == null ? null : Trx.get(trxName, true);
|
Trx trx = trxName == null ? null : Trx.get(trxName, true);
|
||||||
if (trx != null)
|
if (trx != null)
|
||||||
conn = trx.getConnection();
|
return trx.rollback(true);
|
||||||
else
|
else
|
||||||
conn = DB.getConnectionRW ();
|
conn = DB.getConnectionRW ();
|
||||||
// if (!conn.getAutoCommit())
|
if (conn != null && !conn.getAutoCommit())
|
||||||
conn.rollback();
|
conn.rollback();
|
||||||
}
|
}
|
||||||
catch (SQLException e)
|
catch (SQLException e)
|
||||||
{
|
{
|
||||||
|
@ -1578,14 +1578,14 @@ public final class DB
|
||||||
*/
|
*/
|
||||||
public static int getNextID (int AD_Client_ID, String TableName, String trxName)
|
public static int getNextID (int AD_Client_ID, String TableName, String trxName)
|
||||||
{
|
{
|
||||||
if ((trxName == null || trxName.length() == 0) && isRemoteObjects())
|
if (isRemoteObjects())
|
||||||
{
|
{
|
||||||
Server server = CConnection.get().getServer();
|
Server server = CConnection.get().getServer();
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
if (server != null)
|
if (server != null)
|
||||||
{ // See ServerBean
|
{ // See ServerBean
|
||||||
int id = server.getNextID(AD_Client_ID, TableName, null);
|
int id = server.getNextID(AD_Client_ID, TableName, trxName);
|
||||||
log.finest("server => " + id);
|
log.finest("server => " + id);
|
||||||
if (id < 0)
|
if (id < 0)
|
||||||
throw new DBException("No NextID");
|
throw new DBException("No NextID");
|
||||||
|
@ -1613,7 +1613,7 @@ public final class DB
|
||||||
*/
|
*/
|
||||||
public static String getDocumentNo(int C_DocType_ID, String trxName)
|
public static String getDocumentNo(int C_DocType_ID, String trxName)
|
||||||
{
|
{
|
||||||
if ((trxName == null || trxName.length() == 0) && isRemoteObjects())
|
if (isRemoteObjects())
|
||||||
{
|
{
|
||||||
Server server = CConnection.get().getServer();
|
Server server = CConnection.get().getServer();
|
||||||
try
|
try
|
||||||
|
@ -1651,7 +1651,7 @@ public final class DB
|
||||||
*/
|
*/
|
||||||
public static String getDocumentNo (int AD_Client_ID, String TableName, String trxName)
|
public static String getDocumentNo (int AD_Client_ID, String TableName, String trxName)
|
||||||
{
|
{
|
||||||
if ((trxName == null || trxName.length() == 0) && isRemoteObjects())
|
if (isRemoteObjects())
|
||||||
{
|
{
|
||||||
Server server = CConnection.get().getServer();
|
Server server = CConnection.get().getServer();
|
||||||
try
|
try
|
||||||
|
|
Loading…
Reference in New Issue