From the WIKI page:
"Make sure you know what you are doing when you use this service, as
should only be used in rare cases."
My guess is Tom wrote it because something he had was exposing
a port but it wasn't deployed through a -service.xml,
i.e. it was doing registerMBean() directly and then the config
was hardwired within the MBean?
It would certainly be wrong to apply service binding config
at JMX registeration for -service.xml since the attributes
aren't set until the later configuration stage
and would therefore overwrite the SBM settings.
Since this is a rare case, it doesn't seem worth
having a generic solution. All you need is a simple
example of how to use Dimitris's Listener MBean
to respond to a jmx registration event by doing:
Object value = serviceBindingManager.getXXXBinding(...);
mbeanServer.setAttribute(objectName, attributeName, value);
with the SBM injected.
Or for a POJO, I guess it would be an AOP Constructor
interceptor? Since the bean would not be managed by the MC.
On Wed, 2008-08-13 at 10:58 -0500, Brian Stansberry wrote:
I found this service buried in the guts of varia:
http://wiki.jboss.org/wiki/MbeanConfigurator
Basically listens for JMX notifications of bean registrations and calls
the legacy ServiceBindingManager mbean. Which, due to my work on
JBAS-5192 no longer exists; a new version exists that doesn't expose the
functionality this MBeanConfigurator wants [1].
I can't see any point to this service; AFAICT all it does is use a
listener to invoke the same operation that the regular mbean service
deployment logic would have called anyway.
If anyone sees any point to this that I'm missing, please let me know.
Otherwise I plan to get rid of it. To continue to support this, I'll
have to repackage the new SBM implementation and restore the legacy SBM
as an optional service that we don't include in any standard config.
Waste of a day.
[1]
http://wiki.jboss.org/wiki/AS5ServiceBindingManager
--
xxxxxxxxxxxxxxxxxxxxxxxxxxxx
Adrian Brock
Chief Scientist
JBoss, a division of Red Hat
xxxxxxxxxxxxxxxxxxxxxxxxxxxx