[
https://issues.apache.org/jira/browse/TOMEE-2249?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16642404#comment-16642404
]
ASF GitHub Bot commented on TOMEE-2249:
---------------------------------------
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)
> TomEE Plume warns of an NPE during init of JPA
> ----------------------------------------------
>
> Key: TOMEE-2249
> URL: https://issues.apache.org/jira/browse/TOMEE-2249
> Project: TomEE
> Issue Type: Bug
> Affects Versions: 7.0.5
> Reporter: Jonathan S Fisher
> Priority: Major
> Labels: pull-request-available
>
> {code}
> [EL Warning]: 2018-09-28 14:57:39.63--ServerSession(1903518886)--Problem
> while registering MBean: java.lang.NullPointerException
> {code}
> See analysis and discussion here:
> http://tomee-openejb.979440.n4.nabble.com/EclipseLink-NPE-Warning-occurs-every-time-during-first-use-TomEE-7-0-5-td4684797.html
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)