[hibernate-dev] exposing statistics easier (HHH-3593 solution)

Elias Ross genman at noderunner.net
Thu Nov 20 22:02:11 EST 2008


On Thu, Nov 20, 2008 at 5:00 PM, John Mazzitelli <mazz at redhat.com> wrote:
> You assume the hibernate app is always running in a container that supports
> that.
>
> But, by definition, Hibernate is not required to be running in any kind of
> container environment - it is designed to be able to run even in a simple
> J2SE environment.

I don't assume anything. I'm just observing it's trivial for people
that already use an application server. But even under JSE it's
trivial to publish an MBean in a few lines of Java code as well:

MBeanServer server = ... ;
SessionFactory factory;
server.registerMBean(new org.hibernate.jmx.StatisticsService(factory),
new ObjectName(":type=Statistics"));

Let's instead burn some calories in Hibernate 3.3 getting natural ID
key caching working properly, okay? :-)



More information about the hibernate-dev mailing list