* Fixed for bug [1619933] and [1619933], now it is possible to run adempiere client with only a single connection to the application server.
This commit is contained in:
parent
ea36c00e23
commit
72152751a1
|
@ -526,6 +526,62 @@ public class ServerBean implements SessionBean
|
|||
} // getStatus
|
||||
|
||||
|
||||
/**
|
||||
* Commit the named transaction on server
|
||||
* @ejb.interface-method view-type="both"
|
||||
* @param trxName
|
||||
* @return true if success, false otherwise
|
||||
*/
|
||||
public boolean commit(String trxName)
|
||||
{
|
||||
boolean success = false;
|
||||
Trx trx = Trx.get(trxName, false);
|
||||
if (trx != null)
|
||||
{
|
||||
try
|
||||
{
|
||||
success = trx.commit(true);
|
||||
}
|
||||
catch (SQLException e)
|
||||
{
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
finally
|
||||
{
|
||||
trx.close();
|
||||
}
|
||||
}
|
||||
return success;
|
||||
}
|
||||
|
||||
/**
|
||||
* Rollback the named transaction on server
|
||||
* @ejb.interface-method view-type="both"
|
||||
* @param trxName
|
||||
* @return true if success, false otherwise
|
||||
*/
|
||||
public boolean rollback(String trxName)
|
||||
{
|
||||
boolean success = false;
|
||||
Trx trx = Trx.get(trxName, false);
|
||||
if (trx != null)
|
||||
{
|
||||
try
|
||||
{
|
||||
success = trx.rollback(true);
|
||||
}
|
||||
catch (SQLException e)
|
||||
{
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
finally
|
||||
{
|
||||
trx.close();
|
||||
}
|
||||
}
|
||||
return success;
|
||||
}
|
||||
|
||||
/**
|
||||
* String Representation
|
||||
* @return info
|
||||
|
|
Loading…
Reference in New Issue