[jboss-cvs] JBossAS SVN: r94796 - branches/Branch_5_x/hibernate-int/src/main/org/jboss/hibernate/jmx.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Tue Oct 13 17:19:02 EDT 2009
Author: alesj
Date: 2009-10-13 17:19:02 -0400 (Tue, 13 Oct 2009)
New Revision: 94796
Modified:
branches/Branch_5_x/hibernate-int/src/main/org/jboss/hibernate/jmx/Hibernate.java
Log:
Enable @JMX.
Modified: branches/Branch_5_x/hibernate-int/src/main/org/jboss/hibernate/jmx/Hibernate.java
===================================================================
--- branches/Branch_5_x/hibernate-int/src/main/org/jboss/hibernate/jmx/Hibernate.java 2009-10-13 21:12:01 UTC (rev 94795)
+++ branches/Branch_5_x/hibernate-int/src/main/org/jboss/hibernate/jmx/Hibernate.java 2009-10-13 21:19:02 UTC (rev 94796)
@@ -25,7 +25,6 @@
import java.net.URL;
import java.util.Date;
import java.util.Properties;
-
import javax.naming.InitialContext;
import javax.naming.NamingException;
@@ -38,6 +37,7 @@
import org.hibernate.jmx.StatisticsServiceMBean;
import org.hibernate.transaction.JBossTransactionManagerLookup;
import org.hibernate.transaction.JTATransactionFactory;
+import org.jboss.aop.microcontainer.aspects.jmx.JMX;
import org.jboss.beans.metadata.api.annotations.Inject;
import org.jboss.beans.metadata.api.model.FromContext;
import org.jboss.beans.metadata.spi.builder.BeanMetaDataBuilder;
@@ -217,11 +217,10 @@
hibernateStatisticsService.setSessionFactory( sessionFactory );
BeanMetaDataBuilder builder = BeanMetaDataBuilder.createBuilder(hibernateStatisticsServiceName, StatisticsService.class.getName());
StringBuffer buffer = new StringBuffer();
- buffer.append("@org.jboss.aop.microcontainer.aspects.jmx.JMX(name=\"").append(hibernateStatisticsServiceName).append("JMX\"");
+ buffer.append("@").append(JMX.class.getName()).append("(name=\"").append(hibernateStatisticsServiceName).append("JMX\"");
buffer.append(", exposedInterface=").append(StatisticsServiceMBean.class.getName()).append(".class, registerDirectly=true)");
String jmxAnnotation = buffer.toString();
- // todo - add the @JMX into annotations
- //builder.addAnnotation(jmxAnnotation);
+ builder.addAnnotation(jmxAnnotation);
controller.install(builder.getBeanMetaData(), hibernateStatisticsService);
}
More information about the jboss-cvs-commits
mailing list