* 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:
Heng Sin Low 2007-01-07 07:35:30 +00:00
parent ea36c00e23
commit 72152751a1
1 changed files with 56 additions and 0 deletions

View File

@ -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