Hi!
Lars Hoss wrote:
> man, you are damn fast! ;-)
> ok, so the ObjectName that is returned by the method preRegister
> has nothing to do with the JNDI, right?
Right. This is the JMX name of your *administrable service* (remember
that your stuff will be in two parts: the "public" service that you're
providing, and the administrable part that runs the service)
> i guess the code might look something like to following:
>
> public ObjectName preRegister(MBeanServer server, ObjectName name)
> throws Exception
> {
> ...
> new InitialContext().bind("java:/MyServer", myServer);
> return new ObjectName(":service=MyServer");
> }
Yes, something like that.
I actually prefer this:
.. preRegister(..)
{
...
return name == null? new ObjectName(":service=MyServer") : name;
}
i.e. if the user has configured a name explicitly in jboss.conf (for
whatever reason), then use that. Otherwise provide a reasonable default.
/Rickard
--
Rickard �berg
Email: [EMAIL PROTECTED]
http://www.telkel.com
http://www.jboss.org
http://www.dreambean.com
--
--------------------------------------------------------------
To subscribe: [EMAIL PROTECTED]
To unsubscribe: [EMAIL PROTECTED]
Problems?: [EMAIL PROTECTED]