User: starksm
Date: 02/02/16 19:04:31
Modified: src/main/org/jboss/web AbstractWebContainer.java
Log:
Complete the linkEjbLocalReferences method
Revision Changes Path
1.28 +5 -29 jboss/src/main/org/jboss/web/AbstractWebContainer.java
Index: AbstractWebContainer.java
===================================================================
RCS file: /cvsroot/jboss/jboss/src/main/org/jboss/web/AbstractWebContainer.java,v
retrieving revision 1.27
retrieving revision 1.28
diff -u -r1.27 -r1.28
--- AbstractWebContainer.java 16 Feb 2002 00:27:23 -0000 1.27
+++ AbstractWebContainer.java 17 Feb 2002 03:04:31 -0000 1.28
@@ -37,7 +37,6 @@
import org.jboss.deployment.DeploymentException;
import org.jboss.deployment.J2eeApplicationMetaData;
import org.jboss.deployment.J2eeModuleMetaData;
-import org.jboss.ejb.LocalHomeObjectFactory;
import org.jboss.metadata.EjbRefMetaData;
import org.jboss.metadata.EjbLocalRefMetaData;
import org.jboss.metadata.EnvEntryMetaData;
@@ -140,7 +139,7 @@
@see org.jboss.security.SecurityAssociation;
@author [EMAIL PROTECTED]
-@version $Revision: 1.27 $
+@version $Revision: 1.28 $
*/
public abstract class AbstractWebContainer
extends ServiceMBeanSupport
@@ -653,36 +652,13 @@
String linkName = ejb.getLink();
String jndiName = di.findEjbLink(linkName);
- log.debug("Linking ejb-ref: "+name+" to JNDI name: "+jndiName);
if( jndiName == null )
- throw new NamingException("ejb-ref: "+name+", expected jndi-name in
jboss-web.xml");
+ throw new NamingException("ejb-ref: "+name+", target not found, add
valid ejb-link");
+ // The local home location is "local/"+jndiName
+ jndiName = "local/" + jndiName;
+ log.debug("Linking ejb-local-ref: "+name+" to JNDI name: "+jndiName);
Util.bind(envCtx, name, new LinkRef(jndiName));
}
-/*
- String uniqueKey = Long.toString( (new java.util.Date()).getTime() );
- while(enum.hasNext())
- {
- // Internal link
- if (debug)
- log.debug("Binding "+ref.getName()+" to bean source:
"+ref.getLink());
- if (getApplication().getContainer(ref.getLink()) == null)
- throw new DeploymentException ("Bean "+ref.getLink()+" not
found within this application.");
- // get local home
- // bind it into the local namespace
- LocalHomeObjectFactory.rebind( uniqueKey + ref.getName(),
- getApplication(), getApplication().getContainer(ref.getLink())
);
- StringRefAddr refAddr = new StringRefAddr("nns",
uniqueKey+ref.getName() );
- Reference jndiRef = new Reference(ref.getLocalHome(),
- refAddr, LocalHomeObjectFactory.class.getName(), null );
- bind(envCtx, ref.getName(), jndiRef );
-
- }
- else
- {
- throw new DeploymentException( "Local references currently
require ejb-link" );
- }
- }
-*/
}
public void startService() throws Exception
_______________________________________________
Jboss-development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development