Github user exabrial commented on a diff in the pull request:

    https://github.com/apache/tomee/pull/175#discussion_r223483193
  
    --- Diff: 
container/openejb-jpa-integration/src/main/java/org/apache/openejb/jpa/integration/eclipselink/OpenEJBServerPlatform.java
 ---
    @@ -26,13 +27,14 @@
     import javax.transaction.Synchronization;
     import javax.transaction.TransactionManager;
     
    -public class OpenEJBServerPlatform extends JMXServerPlatformBase {
    +public class OpenEJBServerPlatform extends JMXServerPlatformBase 
implements JMXEnabledPlatform {
         public OpenEJBServerPlatform(final DatabaseSession newDatabaseSession) 
{
             super(newDatabaseSession);
             try {
                 mBeanServer = MBeanServer.class.cast(
                     
OpenEJBServerPlatform.class.getClassLoader().loadClass("org.apache.openejb.monitoring.LocalMBeanServer")
                         .getMethod("get").invoke(null));
    +            this.prepareServerSpecificServicesMBean();
             } catch (final Exception e) {
                 // no-op
    --- End diff --
    
    I agree with you; I don't understand why they split it out either, but they 
literally did it for _every other server_ so there's probably a good reason. 
    
    On the fail vs noop, that was there before me. I suggest leaving it so we 
don't change current behavior (if JMX fails to initialize, we still alow the 
application to run. Right now JMX is failing.)
    
    > 6e2a4f7c419 (Thiago Veronezi    2015-11-23 14:38:43 -0500 36)             
        .getMethod("get").invoke(null));
    > 515306f7ba0 (Jonathan S. Fisher 2018-09-29 13:10:49 -0500 37)             
this.prepareServerSpecificServicesMBean();
    > 6e2a4f7c419 (Thiago Veronezi    2015-11-23 14:38:43 -0500 38)         } 
catch (final Exception e) {
    > 6e2a4f7c419 (Thiago Veronezi    2015-11-23 14:38:43 -0500 39)             
// no-op
    > 6e2a4f7c419 (Thiago Veronezi    2015-11-23 14:38:43 -0500 40)         }
    > 6e2a4f7c419 (Thiago Veronezi    2015-11-23 14:38:43 -0500 41)     }
    > 6e2a4f7c419 (Thiago Veronezi    2015-11-23 14:38:43 -0500 42) 


---

Reply via email to