[jboss-cvs] JBossAS SVN: r94797 - branches/vfs3-integration/hibernate-int/src/main/java/org/jboss/hibernate/jmx.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Tue Oct 13 17:30:41 EDT 2009
Author: alesj
Date: 2009-10-13 17:30:41 -0400 (Tue, 13 Oct 2009)
New Revision: 94797
Modified:
branches/vfs3-integration/hibernate-int/src/main/java/org/jboss/hibernate/jmx/Hibernate.java
Log:
Use @JMX class, more type safe.
Modified: branches/vfs3-integration/hibernate-int/src/main/java/org/jboss/hibernate/jmx/Hibernate.java
===================================================================
--- branches/vfs3-integration/hibernate-int/src/main/java/org/jboss/hibernate/jmx/Hibernate.java 2009-10-13 21:19:02 UTC (rev 94796)
+++ branches/vfs3-integration/hibernate-int/src/main/java/org/jboss/hibernate/jmx/Hibernate.java 2009-10-13 21:30:41 UTC (rev 94797)
@@ -36,6 +36,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;
@@ -215,7 +216,7 @@
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();
builder.addAnnotation(jmxAnnotation);
More information about the jboss-cvs-commits
mailing list