Hey

Lars Hoss wrote:
> thanx for your respond Rickard!
> uhm, i just wonder how to access the service in the ejb?
> what for a JNDI name do i have to use?

You can use either the "java:" namespace (which is JVM local) or the
default namespace which is distributed.

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

-- 
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]

Reply via email to