> DbSourceHome home = (DbSourceHome) new
> InitialContext().lookup("java:comp/env/ejb/guyr/DbSource");
in my case it will look
InitialContext().lookup("java:comp/env/jndi/guyr/DbSource");
:)
> <ejb-ref-name>ejb/guyr/DbSource</ejb-ref-name>
Again, in my case that will be:
<ejb-ref-name>jndi/guyr/DbSource</ejb-ref-name>
The only problem here is that jndi/ context may be used by the EJB container
for some purposes, but currently that works. :)
What is strange to me is the internal reference resolving. Here I'm talking
about JBoss 2.0 FINAL, but as far as I remember, same behaviour is in JBoss
2.2.1...
The EJB specs says: "The name must be unique among the names of the
enterprise beans in the same ejb-jar file." (EJB 1.1 specification, page 246
(250 in Acrobat Reader)).
However, if you have two similar .jar files (jaws.xml and jboss.xml files
are different) then internal links are resolved a little bit strange:
- for the first deployed .jar file everything goes fine, internal links
correspond to beans in that .jar file.
- for all subsequent deployed .jar files, all internal references will be
resolved to the beans deployed by first .jar file...
Well, EJB 1.1 specs assume that application assembler may change bean names
(the <ejb-name> entries in the ejb-jar.xml file), but that's _not_
required...
So, that is why you have to use the external references even if you want
them to reference beans in the same .jar file...
Regards,
Roman
_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/jboss-user