Hi Dave,Jacek,Mohd,
There is a method index in JndiEncInfoBuilder. This method is for
handling relative paths.
If we see the logic part of what it does is
1) put for each ejbName its enterprise bean info object
byEjbName.put(bean.ejbName, bean);
then it puts as file.getName()+"#"+bean.ejbName;
and then it puts parentfile.getName/file.getName#bean.ejbName and so forth.
The ejbLink values are used as keys to get the beans.
Now if there are two ejbs of the same name in different jars won't
byEjbName.put(bean.ejbName, bean) overwrite it?
Also if we have an ear with 2 jars of the same names in different
paths with ejbs of the same name, won't this logic fail?
eg:
earModule
---------------------ejb.jar#TestBean
---------------------master/ejb.jar#TestBean
now in the map,
ejb.jar#TestBean will result in an entry ejb.jar#TestBean
while
master/ejb.jar#TestBean will result in two entries
ejb.jar#TestBean and master/ejb.jar#TestBean
ejb.jar#TestBean will overwrite the first entry
and if we lookup from master/ejb.jar the TestBean
in the other jar we will lookup ../ejb.jar#TestBean which will get us
the wrong one.
Am I missing something here? I am planning to use this same logic for
resolving the persistenceUnitRefs instead of my logic. But I am unable
to understand how it will work
Thanks
Manu