[jboss-cvs] JBossAS SVN: r58369 - trunk/server/src/main/org/jboss/web/deployers
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Tue Nov 14 20:57:53 EST 2006
Author: scott.stark at jboss.org
Date: 2006-11-14 20:57:52 -0500 (Tue, 14 Nov 2006)
New Revision: 58369
Modified:
trunk/server/src/main/org/jboss/web/deployers/AbstractWarDeployment.java
Log:
Update the link resolution to use EjbUtil50
Modified: trunk/server/src/main/org/jboss/web/deployers/AbstractWarDeployment.java
===================================================================
--- trunk/server/src/main/org/jboss/web/deployers/AbstractWarDeployment.java 2006-11-15 00:23:14 UTC (rev 58368)
+++ trunk/server/src/main/org/jboss/web/deployers/AbstractWarDeployment.java 2006-11-15 01:57:52 UTC (rev 58369)
@@ -42,7 +42,7 @@
import org.jboss.deployers.spi.deployer.DeploymentUnit;
import org.jboss.deployers.spi.structure.DeploymentContext;
-import org.jboss.deployment.J2eeApplicationMetaData;
+import org.jboss.ejb.EjbUtil50;
import org.jboss.logging.Logger;
import org.jboss.metadata.EjbLocalRefMetaData;
import org.jboss.metadata.EjbRefMetaData;
@@ -421,7 +421,7 @@
* @param metaData the WebMetaData from the WebApplication object passed to
* the performDeploy method.
*/
- protected void processEnc(ClassLoader loader, WebMetaData metaData)
+ protected void processEnc(ClassLoader loader, WebApplication webApp)
throws Exception
{
if(loader == null)
@@ -431,6 +431,7 @@
Context envCtx = null;
Thread currentThread = Thread.currentThread();
ClassLoader currentLoader = currentThread.getContextClassLoader();
+ WebMetaData metaData = webApp.getMetaData();
try
{
// Create a java:comp/env environment unique for the web application
@@ -468,7 +469,7 @@
envCtx.bind("UserTransaction", new LinkRef("UserTransaction"));
log.debug("Linked java:comp/UserTransaction to JNDI name: UserTransaction");
envCtx = envCtx.createSubcontext("env");
- processEncReferences(metaData, envCtx);
+ processEncReferences(webApp, envCtx);
}
finally
{
@@ -481,9 +482,11 @@
log.debug("AbstractWebContainer.parseWebAppDescriptors, End");
}
- protected void processEncReferences(WebMetaData metaData, Context envCtx)
+ protected void processEncReferences(WebApplication webApp, Context envCtx)
throws ClassNotFoundException, NamingException
{
+ DeploymentUnit unit = webApp.getDeploymentUnit();
+ WebMetaData metaData = webApp.getMetaData();
Iterator envEntries = metaData.getEnvironmentEntries();
log.debug("addEnvEntries");
addEnvEntries(envEntries, envCtx);
@@ -494,13 +497,13 @@
log.debug("linkResourceRefs");
linkResourceRefs(resourceRefs, envCtx);
log.debug("linkMessageDestinationRefs");
- linkMessageDestinationRefs(metaData, envCtx);
+ linkMessageDestinationRefs(unit, metaData, envCtx);
Iterator ejbRefs = metaData.getEjbReferences();
log.debug("linkEjbRefs");
- linkEjbRefs(ejbRefs, envCtx);
+ linkEjbRefs(unit, ejbRefs, envCtx);
Iterator ejbLocalRefs = metaData.getEjbLocalReferences();
log.debug("linkEjbLocalRefs");
- linkEjbLocalRefs(ejbLocalRefs, envCtx);
+ linkEjbLocalRefs(unit, ejbLocalRefs, envCtx);
Iterator serviceRefs = metaData.getServiceReferences();
log.debug("linkServiceRefs");
//WebServiceClientHandler.setupServiceRefEnvironment(envCtx, serviceRefs);
@@ -596,7 +599,7 @@
}
}
- protected void linkMessageDestinationRefs(WebMetaData metaData, Context envCtx)
+ protected void linkMessageDestinationRefs(DeploymentUnit unit, WebMetaData metaData, Context envCtx)
throws NamingException
{
Iterator i = metaData.getMessageDestinationReferences();
@@ -612,7 +615,7 @@
{
if (jndiName == null)
{
- MessageDestinationMetaData messageDestination = null; //EjbUtil.findMessageDestination(server, di, link);
+ MessageDestinationMetaData messageDestination = EjbUtil50.findMessageDestination(server, unit, link);
if (messageDestination == null)
throw new NamingException("message-destination-ref '" + refName +
"' message-destination-link '" + link + "' not found and no jndi-name in jboss-web.xml");
@@ -636,7 +639,7 @@
}
}
- protected void linkEjbRefs(Iterator ejbRefs, Context envCtx)
+ protected void linkEjbRefs(DeploymentUnit unit, Iterator ejbRefs, Context envCtx)
throws NamingException
{
while (ejbRefs.hasNext())
@@ -649,7 +652,7 @@
//use ejb-link if it is specified
if (linkName != null)
{
- jndiName = null; // EjbUtil.findEjbLink(server, di, linkName);
+ jndiName = EjbUtil50.findEjbLink(server, unit, linkName);
//if flag does not allow misconfigured ejb-links, it is an error
if ((jndiName == null) && !(getLenientEjbLink()))
@@ -670,7 +673,7 @@
}
}
- protected void linkEjbLocalRefs(Iterator ejbRefs, Context envCtx)
+ protected void linkEjbLocalRefs(DeploymentUnit unit, Iterator ejbRefs, Context envCtx)
throws NamingException
{
while (ejbRefs.hasNext())
@@ -683,7 +686,7 @@
//use the ejb-link field if it is specified
if (linkName != null)
{
- jndiName = null; // EjbUtil.findLocalEjbLink(server, di, linkName);
+ jndiName = EjbUtil50.findLocalEjbLink(server, unit, linkName);
//if flag does not allow misconfigured ejb-links, it is an error
if ((jndiName == null) && !(getLenientEjbLink()))
More information about the jboss-cvs-commits
mailing list