details: https://code.openbravo.com/erp/devel/pi/rev/d9be4324f7a8 changeset: 29958:d9be4324f7a8 user: Gorka Ion Damián <gorkaion.damian <at> openbravo.com> date: Wed Aug 31 12:19:24 2016 +0200 summary: Backed out changeset 4ece62a0e09c
details: https://code.openbravo.com/erp/devel/pi/rev/2255a1048867 changeset: 29959:2255a1048867 user: Gorka Ion Damián <gorkaion.damian <at> openbravo.com> date: Wed Aug 31 12:22:30 2016 +0200 summary: Fixed issue 33750.Add new methods in SessionHandler to manage transactions. Two new public methods added: - isCurrentTransactionActive() - beginNewTransaction() These methods are needed to be able to modify the database in EventHandlers that are fired when the transaction is completed. diffstat: src-db/database/sourcedata/AD_MESSAGE.xml | 12 ------------ src/org/openbravo/dal/core/SessionHandler.java | 4 ++-- 2 files changed, 2 insertions(+), 14 deletions(-) diffs (43 lines): diff -r 4ece62a0e09c -r 2255a1048867 src-db/database/sourcedata/AD_MESSAGE.xml --- a/src-db/database/sourcedata/AD_MESSAGE.xml Wed Aug 31 11:42:06 2016 +0200 +++ b/src-db/database/sourcedata/AD_MESSAGE.xml Wed Aug 31 12:22:30 2016 +0200 @@ -18271,18 +18271,6 @@ <!--32E491425B01464C9EADC1F4FA0D9F78--> <ISINCLUDEINI18N><![CDATA[Y]]></ISINCLUDEINI18N> <!--32E491425B01464C9EADC1F4FA0D9F78--></AD_MESSAGE> -<!--3324141A8D04401B9ED57CCF3A2B7BE7--><AD_MESSAGE> -<!--3324141A8D04401B9ED57CCF3A2B7BE7--> <AD_MESSAGE_ID><![CDATA[3324141A8D04401B9ED57CCF3A2B7BE7]]></AD_MESSAGE_ID> -<!--3324141A8D04401B9ED57CCF3A2B7BE7--> <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID> -<!--3324141A8D04401B9ED57CCF3A2B7BE7--> <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID> -<!--3324141A8D04401B9ED57CCF3A2B7BE7--> <ISACTIVE><![CDATA[Y]]></ISACTIVE> -<!--3324141A8D04401B9ED57CCF3A2B7BE7--> <VALUE><![CDATA[NewTrxCreationCheck]]></VALUE> -<!--3324141A8D04401B9ED57CCF3A2B7BE7--> <MSGTEXT><![CDATA[It is not possible to start a new transaction while there is still one active. Please contact your system administrator to solve the issue.]]></MSGTEXT> -<!--3324141A8D04401B9ED57CCF3A2B7BE7--> <MSGTYPE><![CDATA[E]]></MSGTYPE> -<!--3324141A8D04401B9ED57CCF3A2B7BE7--> <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID> -<!--3324141A8D04401B9ED57CCF3A2B7BE7--> <ISINCLUDEINI18N><![CDATA[N]]></ISINCLUDEINI18N> -<!--3324141A8D04401B9ED57CCF3A2B7BE7--></AD_MESSAGE> - <!--3346DD643A854521B2429785B9362D5E--><AD_MESSAGE> <!--3346DD643A854521B2429785B9362D5E--> <AD_MESSAGE_ID><![CDATA[3346DD643A854521B2429785B9362D5E]]></AD_MESSAGE_ID> <!--3346DD643A854521B2429785B9362D5E--> <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID> diff -r 4ece62a0e09c -r 2255a1048867 src/org/openbravo/dal/core/SessionHandler.java --- a/src/org/openbravo/dal/core/SessionHandler.java Wed Aug 31 11:42:06 2016 +0200 +++ b/src/org/openbravo/dal/core/SessionHandler.java Wed Aug 31 12:22:30 2016 +0200 @@ -40,7 +40,6 @@ import org.openbravo.base.util.Check; import org.openbravo.dal.service.OBDal; import org.openbravo.database.ExternalConnectionPool; -import org.openbravo.erpCommon.utility.OBMessageUtils; import org.openbravo.database.SessionInfo; import org.openbravo.service.db.DbUtility; @@ -181,7 +180,8 @@ */ public void beginNewTransaction() throws OBException { if (isCurrentTransactionActive()) { - throw new OBException(OBMessageUtils.messageBD("NewTrxCreationCheck")); + throw new OBException( + "Not possible to start a new transaction while there is still one active."); } tx = getSession().beginTransaction(); } ------------------------------------------------------------------------------ _______________________________________________ Openbravo-commits mailing list Openbravo-commits@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/openbravo-commits