JMX MBeans

49 views
Skip to first unread message

Daryl Stultz

unread,
Jan 4, 2012, 1:04:41 PM1/4/12
to Ebean ORM
Hello,

I have multiple web applications of a single code base (one
application copied out to many webapps each connecting to its own
database). I have things set up such that I create a single
EbeanServer per web application and it is simply named "default". Upon
start up I get this after the first webapp starts up (upon starting of
the second):

WARNING: JMX beans for Ebean server [default] already registered. Will
try unregister/registerEbean:server=default2,function=Logging

I think it happens for all subsequent webapps. Then on shutdown I get
this multiple times, apparently for the third through last webapp:

Shutdown
Jan 4, 2012 11:47:53 AM
com.avaje.ebeaninternal.server.core.DefaultServer$Shutdown run
SEVERE: Error unregistering Ebean Ebean:server=default2
javax.management.InstanceNotFoundException:
Ebean:server=default2,function=Logging
at
com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.getMBean(DefaultMBeanServerInterceptor.java:
1094)

I'm really not familiar with JMX and MBeans. What is going on here? It
appears to be registering some "global" resource in the server scope
(I'm using Tomcat). The result is a conflict of names. I reworked my
config routine to include the name of the web application and all
warnings/errors went away. It seems reasonable that multiple
independent webapps might use a common server name such as "default".
My (Ebean jar is under WEB-INF, not Tomcat lib.)

Any info appreciated.

/Daryl

edge

unread,
Jan 10, 2012, 4:39:33 AM1/10/12
to Ebean ORM
you just need to give your Ebean servers unique names so as JMX can
expose then correctly
You can then use JMX to monitor e.g using Nagios (and manipulate Ebean
using e.g JMX Console)
Reply all
Reply to author
Forward
0 new messages