Hi Dave... On 8/5/06, David Blevins <[EMAIL PROTECTED]> wrote:
On Aug 5, 2006, at 1:29 PM, Mohammed Nour wrote: > Hi All... > > During my play with OPENEJB-146 I was trying to deploy a bean that > could be > looked up through JNDI and has a local Home and Component > interfaces, at > first I had *NoNameFound* exception when I used the JNDI name > assigned to > this bean in the openejb-jar.xml, I went through the code of OEJB > and found > out that it adds the word *Local* to this JNDI name because this > bean has a > local Home and Component interfaces, and I sould lookup this bean > using this > modified JNDI name, I wonder why this happnes? shouldn't the client > be able > to lookup the bean using the JNDI name that she\he has assigned to > the bean? When you want the javax.ejb.EJBHome, you use the name you gave it. When you want the LocalHome, you tack on "Local" to the JNDI name. Also note, you can't lookup LocalHomes over the RemoteInitialContextFactory.
:), These info I already know, but my main question is why?, the client should provide the JNDI that he\she has provided in the openejb-jar.xml, and if the EJB is providing a Local Home interface this lookup should return the local Home, and when it is providing the remote Home interface the lookup should return the remote one, but this way we are asking the client to provide one JNDI name and look the bean up by using another one - that I knew by debugging the src code of OEJB - !!!??? I think this is not the way a client of OEJB should do it. -David
> Thanks and best regards... > Mohammad Nour El-Din
