[
https://jira.jboss.org/jira/browse/JBJMX-94?page=com.atlassian.jira.plugi...
]
Adrian Brock closed JBJMX-94.
-----------------------------
Resolution: Out of Date
This issue is out-of-date with JPA deployment.
Its also in the wrong project.
HarUrl only set for org.jboss.hibernate.jmx.Hibernate Mbean.
------------------------------------------------------------
Key: JBJMX-94
URL:
https://jira.jboss.org/jira/browse/JBJMX-94
Project: JBoss JMX
Issue Type: Bug
Affects Versions: JBossAS-3.2.7
Environment: Does not matter.
Reporter: Mikhail Khodorovskiy
Original Estimate: 10 minutes
Remaining Estimate: 10 minutes
We were using the har archives for deploying hibernate in jboss 3.2.6 but created our own
JMX MBean in order to use hibernate3 rather hibernate2 since the Hibernate JMX MBean that
comes with JBoss was using the "net.sf" packaged for hibernate imports but in
hibernate3 the packages where rename to "org.hibernate". The change that breaks
us in jboss-3.2.7 is tyhe check that the HarUrl attribute can only be set on the specific
MBean of a class org.jboss.hibernate.jmx.Hibernate in the following code:
public synchronized void create(DeploymentInfo di)
throws DeploymentException
{
super.create(di);
for(Iterator iter = di.subDeployments.iterator(); iter.hasNext();)
{
DeploymentInfo nested = (DeploymentInfo)iter.next();
if(nested.url.getFile().endsWith("hibernate-service.xml"))
{
for(Iterator serviceIter = nested.mbeans.iterator(); serviceIter.hasNext();)
{
ObjectName service = (ObjectName)serviceIter.next();
if (isHibernateMBean(service))
{
Attribute attr = new Attribute("HarUrl", di.url);
try
{
server.setAttribute(service, attr);
}
catch(Exception e)
{
throw new DeploymentException("Failed to set HarUrl attribute:
" + e.getMessage(), e);
}
}
}
// todo: why allow only one service file?
break;
}
}
}
where isHibernateMBean is defined as dispalyed below:
private boolean isHibernateMBean(ObjectName service)
{
try
{
// MBeanInfo serviceInfo = server.getMBeanInfo(service);
// todo: would really like this to be an isAssignableFrom check;
// is it kosher to do Class.forName() on the MBean class name here?
return Hibernate.class.getName().equals( serviceInfo.getClassName() );
}
catch(Throwable t)
{
log.warn("Unable to determine whether MBean [" + service + "] is
Hibernate MBean");
return false;
}
}
Would you be so kind to remove the check and allow any MBean that has the harUrl
attribute to be set by HARDeployer?
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira