Details
-
Bug
-
Resolution: Done
-
Minor
-
1.0 alpha
-
None
Description
I've observed the following exception....
org.jboss.admin.service.datasource.DataSourceServiceRuntimeException: Exception occurred retrieving jndi name
at org.jboss.admin.service.MBeanServerHelper.getMBeanAttribute(MBeanServerHelper.java:108)
at org.jboss.admin.service.MBeanServerHelper.getMBeanIntAttribute(MBeanServerHelper.java:75)
at org.jboss.admin.service.jms.MBeanServerDestinationHelper.populateDestinationData(MBeanServerDestinationHelper.java:227)
at org.jboss.admin.service.jms.DestinationServiceImpl.getDestination(DestinationServiceImpl.java:103)
at org.jboss.admin.console.web.struts.jms.ViewDestinationAction.perform(ViewDestinationAction.java:67)
at org.jboss.admin.console.web.struts.BaseAction.execute(BaseAction.java:32)
...
This issue is not about what caused the exception but rather that MBeanServerHelper.getMBeanAttribute(), or any other method on this class, should not be throwing exceptions which live in the org.jboss.admin.service.datasource package. Instead a more generic runtimeexception should be created and MBeanServerHelper should throw that instead. All methods on this class should be checked not just getMBeanAttribute()