-
Bug
-
Resolution: Duplicate
-
Major
-
JBossAS-4.0.2 Final
-
None
In server\src\main\org\jboss\ejb\EjbUtil.java in
method "private static String resolveAbsoluteLink(DeploymentInfo di, String link, boolean isLocal)"
I find the following [fixed - marked with DG] code below.
The problem is that if this is called AND di.metaData is an instanceof ApplicationMetaData AND
appMD.getBeanByEjbName(link) is null AND logging is turned on AND appMD.getEnterpriseBeans().hasNext() is true
AND getJndiName() returns NOT null, THEN the resolved link will be the last appMD.getEnterpriseBeans() iteration,
INSTEAD of the result of looking through each subcontext.
That is, if logging is turned on, under some circumstances,
ejbName is changed as an unintended side-effect.
private static String resolveAbsoluteLink(DeploymentInfo di, String link, boolean isLocal)
{
if (log.isTraceEnabled())
String ejbName = null;
// Search current DeploymentInfo
if (di.metaData instanceof ApplicationMetaData)
{
ApplicationMetaData appMD = (ApplicationMetaData) di.metaData;
BeanMetaData beanMD = appMD.getBeanByEjbName(link);
if (beanMD != null)
{
ejbName = getJndiName(beanMD, isLocal);
if (log.isTraceEnabled())
return ejbName;
}
else if (log.isTraceEnabled())
{
log.trace("No match for ejb-link: " + link);
Iterator iter = appMD.getEnterpriseBeans();
while (iter.hasNext())
}
}
// Search each subcontext
Iterator it = di.subDeployments.iterator();
while (it.hasNext() && ejbName == null)
return ejbName;
}
- duplicates
-
JBAS-46 EJB Deployment uses wrong ejb-local-ref for ejb-link
- Closed