1 17 package org.apache.geronimo.tomcat.deployment; 18 19 import java.util.Map ; 20 import java.util.jar.JarFile ; 21 22 import org.apache.geronimo.common.DeploymentException; 23 import org.apache.geronimo.deployment.DeploymentContext; 24 import org.apache.geronimo.gbean.AbstractName; 25 import org.apache.geronimo.gbean.GBeanData; 26 import org.apache.geronimo.j2ee.deployment.Module; 27 import org.apache.geronimo.j2ee.deployment.WebServiceBuilder; 28 import org.apache.geronimo.j2ee.j2eeobjectnames.NameFactory; 29 import org.apache.geronimo.kernel.GBeanAlreadyExistsException; 30 import org.apache.geronimo.kernel.repository.Environment; 31 import org.apache.geronimo.webservices.SerializableWebServiceContainerFactoryGBean; 32 33 36 public class MockWebServiceBuilder implements WebServiceBuilder { 37 public void findWebServices(JarFile moduleFile, boolean isEJB, Map correctedPortLocations, Environment environment, Map sharedContext) throws DeploymentException { 38 } 39 40 public boolean configurePOJO(GBeanData targetGBean, String servletName, Module module, String seiClassName, DeploymentContext context) throws DeploymentException { 41 AbstractName webServiceContainerFactoryName = context.getNaming().createChildName(targetGBean.getAbstractName(), "webServiceContainer", NameFactory.GERONIMO_SERVICE); 42 GBeanData webServiceContainerFactoryGBean = new GBeanData(webServiceContainerFactoryName, SerializableWebServiceContainerFactoryGBean.GBEAN_INFO); 43 try { 44 context.addGBean(webServiceContainerFactoryGBean); 45 } catch (GBeanAlreadyExistsException e) { 46 throw new DeploymentException("Could not add webServiceContainerFactoryGBean", e); 47 } 48 targetGBean.setReferencePattern("WebServiceContainerFactory", webServiceContainerFactoryName); 49 return true; 50 } 51 52 public boolean configureEJB(GBeanData targetGBean, String ejbName, JarFile moduleFile, Map sharedContext, ClassLoader classLoader) throws DeploymentException { 53 return true; 54 } 55 } 56 | Popular Tags |