diff --git a/serverRoot/src/main/ejb/org/compiere/session/ServerBean.java b/serverRoot/src/main/ejb/org/compiere/session/ServerBean.java index 45f6350eaf..f42c3e49fb 100644 --- a/serverRoot/src/main/ejb/org/compiere/session/ServerBean.java +++ b/serverRoot/src/main/ejb/org/compiere/session/ServerBean.java @@ -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