-
Feature Request
-
Resolution: Done
-
Major
-
JBossAS-4.0.3RC2, JBossAS-3.2.8RC1, JBossAS-5.0.0.Beta1
-
None
-
None
I want to register a property editor that uses classes within my .ear deployment.
<mbean code="org.jboss.varia.property.PropertyEditorManagerService"
name="mqube.smsgw:type=Service,name=PropertyEditorManager">
<attribute name="Editors">
com.foo.ConnectionClass=com.foo.ConnectionClassEditor
</attribute>
</mbean>
Suggested changes below:
diff -b -B -U8 -r1.5 PropertyEditorManagerService.java
— src/main/org/jboss/varia/property/PropertyEditorManagerService.java 27 Aug 2003 04:34:17 -0000 1.5
+++ src/main/org/jboss/varia/property/PropertyEditorManagerService.java 7 Sep 2005 20:59:06 -0000
@@ -91,19 +91,19 @@
*
- @param typeName The classname of the objetcs to be edited.
- @param editorTypeName The class of the editor.
*/
public void registerEditor(final String typeName,
final String editorTypeName)
throws ClassNotFoundException { - Class type = Class.forName(typeName); - Class editorType = Class.forName(editorTypeName); - + ClassLoader cl = Thread.currentThread().getContextClassLoader(); + Class type = cl.loadClass(typeName); + Class editorType = cl.loadClass(editorTypeName); PropertyEditorManager.registerEditor(type, editorType); }
/** Turn a string[] into an comma seperated list. */
private String makeString(final String[] array)
{
StringBuffer buff = new StringBuffer();
I don't know what the implications of doing this might be. Please advise.
- relates to
-
JBAS-1709 MBean attribute classes not loaded with deployment classloader
- Closed