|
From: Colin S. <col...@ex...> - 2004-08-11 21:39:51
|
How do you stop it from doing it multiple times? Maybe a static based singleton flag? Rob Harrop wrote: > Colin, > > I was thinking of having either JmxMBeanAdapter or JmxProxyFactoryBean > register the PropertyEditor, that way the Spring core can remain > blissfully unaware. > > Rob > > Colin Sampaleanu wrote: > >> Rob, >> >> For some Spring PropertyEditors, which convert to spring-specific >> classes, Spring just relies on the fact that if a class's package >> includes another class with the same name with the suffix 'Editor', >> it is automatically recognized and registered as a PropertyEditor >> (assuming it implements the latter, of course). For some other >> editors, such as the one that converts between a classname and a >> Class object, the container registers the editor itself. >> >> My feeling is that ideally the registration would happen >> automatically for the user. However, I can't think of a very clean >> way right now. The base container should probably not know about the >> JMX specific property editor... >> >> Colin >> >> >> Rob Harrop wrote: >> >>> All, >>> >>> I am working through some support classes for JMX. Once in >>> particular is JmxProxyFactoryBean. This class will generate a proxy >>> for a JMX resource and allow FactoryBean access to the proxy. You >>> need to supply the ObjectName for the MBean and I was wondering >>> whether to type the property as String or ObjectName and use a >>> custom PropertyEditor. If the PropertyEditor is the way to go, is >>> there some kind of standard way for registering these? Should the >>> FactoryBean do it itself, or should this be left to the user? >>> >>> Rob >> |