details:   https://code.openbravo.com/erp/devel/pi/rev/f066457a2a6e
changeset: 29508:f066457a2a6e
user:      Inigo Sanchez <inigo.sanchez <at> openbravo.com>
date:      Thu May 19 09:56:37 2016 +0200
summary:   Fixed issue 32704: Base test for weld has conflicts with analytics 
module.

The problem was when a test that uses WeldBaseTest is thrown in an enviroment
with analytics module installed. It is a known issue in Jersey Servlet.

Setting this property to "true" is avoided throwing the error. It is a 
workaround
implemented in jersey-servlet-1.19.jar (CDIExtension.class) for Weld proxy bug.

diffstat:

 
modules/org.openbravo.base.weld/src-test/org/openbravo/base/weld/test/WeldBaseTest.java
 |  8 +++++++-
 1 files changed, 7 insertions(+), 1 deletions(-)

diffs (25 lines):

diff -r a0e1933e5b81 -r f066457a2a6e 
modules/org.openbravo.base.weld/src-test/org/openbravo/base/weld/test/WeldBaseTest.java
--- 
a/modules/org.openbravo.base.weld/src-test/org/openbravo/base/weld/test/WeldBaseTest.java
   Thu May 19 11:14:55 2016 +0200
+++ 
b/modules/org.openbravo.base.weld/src-test/org/openbravo/base/weld/test/WeldBaseTest.java
   Thu May 19 09:56:37 2016 +0200
@@ -11,7 +11,7 @@
  * under the License.
  * The Original Code is Openbravo ERP.
  * The Initial Developer of the Original Code is Openbravo SLU
- * All portions are Copyright (C) 2010-2015 Openbravo SLU
+ * All portions are Copyright (C) 2010-2016 Openbravo SLU
  * All Rights Reserved.
  * Contributor(s):  ______________________________________.
  ************************************************************************
@@ -57,6 +57,12 @@
   @Deployment
   public static JavaArchive createTestArchive() {
     if (archive == null) {
+
+      // Setting this property to "true" is avoided throwing an error when 
this class is used with
+      // analytics module. It is a workaround for Weld proxy bug. See issue:
+      // https://issues.openbravo.com/view.php?id=32704
+      
System.setProperty("com.sun.jersey.server.impl.cdi.lookupExtensionInBeanManager",
 "true");
+
       log.info("Creating cdi archive...");
       final String sourcePath = 
OBPropertiesProvider.getInstance().getOpenbravoProperties()
           .getProperty("source.path");

------------------------------------------------------------------------------
Mobile security can be enabling, not merely restricting. Employees who
bring their own devices (BYOD) to work are irked by the imposition of MDM
restrictions. Mobile Device Manager Plus allows you to control only the
apps on BYO-devices by containerizing them, leaving personal data untouched!
https://ad.doubleclick.net/ddm/clk/304595813;131938128;j
_______________________________________________
Openbravo-commits mailing list
Openbravo-commits@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openbravo-commits

Reply via email to