1 22 package org.jboss.ejb3.enc; 23 24 import org.jboss.ejb3.EJBContainer; 25 import org.jboss.ejb3.Ejb3Deployment; 26 import org.jboss.ejb3.DeploymentScope; 27 28 import javax.naming.NameNotFoundException ; 29 import java.util.LinkedHashMap ; 30 31 37 public class EjbModuleEjbResolver extends DeploymentEjbResolver 38 { 39 protected LinkedHashMap ejbContainers; 40 protected Ejb3Deployment deployment; 41 42 public EjbModuleEjbResolver(DeploymentScope deploymentScope, String errorName, LinkedHashMap ejbContainers, Ejb3Deployment deployment) 43 { 44 super(deploymentScope, errorName); 45 this.ejbContainers = ejbContainers; 46 this.deployment = deployment; 47 } 48 49 @Override 50 protected EJBContainer searchDeploymentInternally(String ejbLink, Class businessIntf) 51 { 52 for (Object obj : ejbContainers.values()) 53 { 54 EJBContainer container = (EJBContainer) obj; 55 if (container.getEjbName().equals(ejbLink)) 56 { 57 return container; 58 } 59 } 60 return null; 61 } 62 63 @Override 64 protected EJBContainer searchForEjbContainerInternally(Class businessIntf) throws NameNotFoundException 65 { 66 EJBContainer rtnContainer; 67 rtnContainer = getEjbContainer(deployment, businessIntf); 68 return rtnContainer; 69 } 70 71 } 72 | Popular Tags |