hi!
man, you are damn fast! ;-)
ok, so the ObjectName that is returned by the method preRegister
has nothing to do with the JNDI, right?
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");
}
yours,
lars
> I.e. in your MBean:
> new InitialContext.bind("java:/Myserver", myServer); // Only objects in
> this JVM can use MyServer
> or
> new InitialContext.bind("Myserver", myServer); // Can be accessed
> remotely by RMI clients
>
> lookup is done like this (as usual):
> new InitialContext().lookup("java:/Myserver");
> or
> new InitialContext().lookup("Myserver");
>
> .... doesn't get much easier than that, does it? ;-)
>
> /Rickard
--
--------------------------------------------------------------
To subscribe: [EMAIL PROTECTED]
To unsubscribe: [EMAIL PROTECTED]
Problems?: [EMAIL PROTECTED]