Hi, I'm quite new to ejb and jndi. I have read the tutorial and so far am ok in grasping the concept but the big thing i fail to understand is that how can an ejb binded at my machine be referenced from other machine without me telling them? How will a machine in my network or on the internet know i've got this ejb binded on this machine? will they write some fully qualified ip address or dns name before the ejb reference to access it? How? i'm confused.
Yes, the machine information is specified in the environment object when you create a InitialContext from it. (including provider url) However sometime you want to get the a local jndi name, whereas you can new InitialContext() directly, by default, it looks up the localhost.
Joined: Dec 09, 2003
and when do i create an environment object? I am not sure when that is done, i just call initial context in the beginning.