dims 2004/07/28 07:24:51
Modified: modules/axis maven.xml project.xml modules/axis/src/java/org/apache/geronimo/axis AxisGbean.java AxisGeronimoConstants.java AxisGeronimoUtils.java DependancyEJBManager.java GeronimoWsDeployContext.java WebServiceContainer.java WebServiceDeployer.java WebServiceDeployerGbean.java modules/axis/src/test/org/apache/geronimo/axis AdminClientDeploymentTest.java AxisGBeanTest.java DynamicEJBDeploymentTest.java EWSTest.java JettyServiceWrapper.java TestServer.java WebServiceDeploymentTest.java WebServiceTest.java Added: modules/axis/src/samples/echo build.xml modules/axis/src/samples/echo/META-INF ejb-jar.xml webservice.xml modules/axis/src/samples/echo/org/apache/ws/echosample Echo.java EchoBean.java EchoStruct.java SmallEchoStruct.java Log: Patch from Srinath....Here are the notes from his message in GERONIMO-269: I have fix the test cases.. I am working around the compiling problem. Right now the user should use ews to generate the module and Only then it can be deployed. I am generating and compile the module with ews inside the maven.xml file. The patch is attached .. eclipse does not a samples dir to the patch as it is not cvs managed I zip it and add it. plase drop it in to the modules/axis/src The code of the Jetty and the OpenEJB modules changing quite regulary (it was twice for last two weeks) and that is how the AxisGbean test fails. I add notes at the code specifying the palces where we should check if the test fails. Revision Changes Path 1.2 +17 -7 incubator-geronimo/modules/axis/maven.xml Index: maven.xml =================================================================== RCS file: /home/cvs/incubator-geronimo/modules/axis/maven.xml,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- maven.xml 22 Jul 2004 14:57:48 -0000 1.1 +++ maven.xml 28 Jul 2004 14:24:47 -0000 1.2 @@ -13,17 +13,27 @@ </goal> <preGoal name="test:test"> - <ant:java classname="org.apache.geronimo.ews.ws4j2ee.utils.PropertyStore" fork="no" > - <ant:arg value="${maven.repo.local}"/> + <deploy:copy-deps todir="${basedir}/target/lib"/> + <ant:java classname="org.apache.geronimo.ews.ws4j2ee.utils.PropertyStore" + fork="no" > + <ant:arg value="${maven.repo.local}"/> <ant:classpath refid="maven.dependency.classpath"/> </ant:java> <j:jelly xmlns="jelly:ant"> - <!-- - <ant:ant antfile="build.xml" inheritall="true" inheritrefs="true" dir="src/samples/echo"/> - <taskdef name="ews" classname="org.apache.geronimo.ews.ws4j2ee.utils.EWSTask"> - <classpath refid="maven.dependency.classpath"/> + <ant:ant antfile="build.xml" + inheritall="true" + inheritrefs="true" + dir="src/samples/echo"/> + <taskdef name="ews" classname="org.apache.geronimo.ews.ws4j2ee.utils.EWSTask"> + <classpath refid="maven.dependency.classpath"/> </taskdef> - --> + <ews outDir="target/generated/samples" module="target/samples/echo.jar"> + <ant:classpath refid="maven.dependency.classpath"/> + </ews> + <ant:ant antfile="build.xml" + inheritall="true" + inheritrefs="true" + dir="target/generated/samples"/> </j:jelly> </preGoal> </project> 1.4 +14 -9 incubator-geronimo/modules/axis/project.xml Index: project.xml =================================================================== RCS file: /home/cvs/incubator-geronimo/modules/axis/project.xml,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- project.xml 22 Jul 2004 14:57:48 -0000 1.3 +++ project.xml 28 Jul 2004 14:24:47 -0000 1.4 @@ -64,7 +64,7 @@ <dependency> <groupId>geronimo</groupId> <artifactId>geronimo-core</artifactId> - <version>1.0-M1</version> + <version>${pom.currentVersion}</version> <properties> <module>true</module> </properties> @@ -130,6 +130,15 @@ </dependency> <dependency> + <groupId>geronimo</groupId> + <artifactId>geronimo-timer</artifactId> + <version>1.0-SNAPSHOT</version> + <properties> + <runtime>true</runtime> + </properties> + </dependency> + + <dependency> <groupId>geronimo-spec</groupId> <artifactId>geronimo-spec-jta</artifactId> <version>1.0.1B-rc2</version> @@ -422,16 +431,12 @@ <includes> <include>**/*Test.java</include> </includes> + <excludes> <exclude>**/Abstract*.java</exclude> - <exclude>**/AdminClientDeploymentTest.java</exclude> - <exclude>**/DynamicEJBDeploymentTest.java</exclude> - <exclude>**/EWSTest.java</exclude> - <exclude>**/WebServiceDeploymentTest.java</exclude> - <exclude>**/WebServiceTest.java</exclude> - <exclude>**/AxisGBeanTest.java</exclude> - <exclude>**/EchoHeadersTest.java</exclude> + <exclude>**/EWSTest.java</exclude> </excludes> + <resources> <resource> <directory>${basedir}/src/test-resources</directory> 1.3 +0 -11 incubator-geronimo/modules/axis/src/java/org/apache/geronimo/axis/AxisGbean.java Index: AxisGbean.java =================================================================== RCS file: /home/cvs/incubator-geronimo/modules/axis/src/java/org/apache/geronimo/axis/AxisGbean.java,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- AxisGbean.java 22 Jul 2004 14:57:48 -0000 1.2 +++ AxisGbean.java 28 Jul 2004 14:24:48 -0000 1.3 @@ -65,7 +65,6 @@ infoFactory.addAttribute("objectName", String.class, false); // operations - infoFactory.addOperation("echo", new Class[]{String.class}); infoFactory.setConstructor(new String[]{"kernel", "Name", "objectName"}); @@ -115,16 +114,6 @@ public void doStop() throws WaitingException, Exception { System.out.println("Axis GBean has stoped"); wscontiner.doStop(); - } - - /** - * Method echo - * - * @param msg - * @return - */ - public String echo(String msg) { - return msg; } /** 1.2 +19 -1 incubator-geronimo/modules/axis/src/java/org/apache/geronimo/axis/AxisGeronimoConstants.java Index: AxisGeronimoConstants.java =================================================================== RCS file: /home/cvs/incubator-geronimo/modules/axis/src/java/org/apache/geronimo/axis/AxisGeronimoConstants.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- AxisGeronimoConstants.java 22 Jul 2004 14:57:48 -0000 1.1 +++ AxisGeronimoConstants.java 28 Jul 2004 14:24:48 -0000 1.2 @@ -15,6 +15,10 @@ */ package org.apache.geronimo.axis; +import javax.management.ObjectName; + +import org.apache.geronimo.kernel.jmx.JMXUtil; + /** * Class AxisGeronimoConstants */ @@ -52,7 +56,7 @@ */ public static final String TRANSACTION_MANAGER_NAME = "geronimo.test:role=TransactionManager"; - + public static final String TRANSACTION_CONTEXT_MANAGER_NAME = "geronimo.test:role=TransactionContextManager"; /** * Field CONNTECTION_TRACKING_COORDINATOR */ @@ -73,4 +77,18 @@ * Field AXIS_SERVICE_PORT */ public static final int AXIS_SERVICE_PORT = 5678; + + public static final String J2EE_SERVER_OBJECT_NAME = J2EE_DOMAIN_NAME + ":j2eeType=J2EEServer,name=" + J2EE_SERVER_NAME; + + public static final ObjectName CONTAINER_NAME = JMXUtil.getObjectName("geronimo.test:ejb=Mock"); + public static final ObjectName TRANSACTIONMANAGER_NAME = JMXUtil.getObjectName(J2EE_DOMAIN_NAME + ":type=TransactionManager"); + public static final ObjectName TRANSACTIONCONTEXTMANAGER_NAME = JMXUtil.getObjectName(J2EE_SERVER_NAME + ":type=TransactionContextManager"); + public static final ObjectName TRACKEDCONNECTIONASSOCIATOR_NAME = JMXUtil.getObjectName("geronimo.test:role=TrackedConnectionAssociator"); + public static final ObjectName WORKMANAGER_NAME = JMXUtil.getObjectName("geronimo.server:type=WorkManager,name=DefaultWorkManager"); + public static final ObjectName RESOURCE_ADAPTER_NAME = JMXUtil.getObjectName("openejb.server:j2eeType=ResourceAdapter,J2EEServer=TestOpenEJBServer,name=MockRA"); + public static final ObjectName ACTIVATIONSPEC_NAME = JMXUtil.getObjectName("geronimo.server:j2eeType=ActivationSpec,name=MockMDB"); + public static final ObjectName THREADPOOL_NAME = JMXUtil.getObjectName(J2EE_SERVER_NAME + ":type=ThreadPool,name=DefaultThreadPool"); + public static final ObjectName TRANSACTIONALTIMER_NAME = JMXUtil.getObjectName(J2EE_SERVER_NAME + ":type=ThreadPooledTimer,name=TransactionalThreaPooledTimer"); + public static final ObjectName NONTRANSACTIONALTIMER_NAME = JMXUtil.getObjectName(J2EE_SERVER_NAME + ":type=ThreadPooledTimer,name=NonTransactionalThreaPooledTimer"); + } 1.2 +57 -3 incubator-geronimo/modules/axis/src/java/org/apache/geronimo/axis/AxisGeronimoUtils.java Index: AxisGeronimoUtils.java =================================================================== RCS file: /home/cvs/incubator-geronimo/modules/axis/src/java/org/apache/geronimo/axis/AxisGeronimoUtils.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- AxisGeronimoUtils.java 22 Jul 2004 14:57:48 -0000 1.1 +++ AxisGeronimoUtils.java 28 Jul 2004 14:24:48 -0000 1.2 @@ -15,17 +15,71 @@ */ package org.apache.geronimo.axis; +import java.io.File; +import java.lang.reflect.Method; + +import javax.ejb.EJBHome; +import javax.management.ObjectName; + +import org.apache.axis.AxisFault; +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; import org.apache.geronimo.deployment.DeploymentException; +import org.apache.geronimo.ews.ws4j2ee.wsutils.GeronimoUtils; import org.apache.geronimo.gbean.jmx.GBeanMBean; import org.apache.geronimo.kernel.Kernel; - -import javax.management.ObjectName; -import java.io.File; +import org.openejb.ContainerIndex; +import org.openejb.EJBContainer; /** * Class AxisGeronimoUtils */ public class AxisGeronimoUtils { + + public static final Log log = LogFactory.getLog(GeronimoUtils.class); + public static Object invokeEJB( + String ejbName, + String methodName, + Class[] parmClasses, + Object[] parameters)throws AxisFault{ + try { + ContainerIndex index = ContainerIndex.getInstance(); + int length = index.length(); + System.out.println("number of continers "+length); + for(int i = 0;i<length;i++){ + EJBContainer contianer = index.getContainer(i); + if(contianer!= null){ + String name = contianer.getEJBName(); + System.out.println("found the ejb "+name); + log.debug("found the ejb "+name); + if(ejbName.equals(name)){ + EJBHome statelessHome = contianer.getEJBHome(); + Object stateless = statelessHome.getClass().getMethod("create", null).invoke(statelessHome, null); + if(parmClasses!= null){ + Object obj = stateless.getClass().getMethod(methodName,parmClasses).invoke(stateless, parameters); + return obj; + }else{ + Method[] methods = stateless.getClass().getMethods(); + for(int j = 0;i< methods.length;j++){ + if(methods[j].getName().equals(methodName)){ + return methods[j].invoke(stateless, parameters); + } + } + throw new NoSuchMethodException(methodName+" not found"); + } + } + }else{ + System.out.println("Continer is null"); + log.debug("Continer is null"); + } + } + throw new AxisFault("Dependancy ejb "+ejbName+" not found "); + } catch (Exception e) { + throw AxisFault.makeFault(e); + } + + } + /** * Method startGBean * 1.2 +119 -60 incubator-geronimo/modules/axis/src/java/org/apache/geronimo/axis/DependancyEJBManager.java Index: DependancyEJBManager.java =================================================================== RCS file: /home/cvs/incubator-geronimo/modules/axis/src/java/org/apache/geronimo/axis/DependancyEJBManager.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- DependancyEJBManager.java 22 Jul 2004 14:57:48 -0000 1.1 +++ DependancyEJBManager.java 28 Jul 2004 14:24:48 -0000 1.2 @@ -14,8 +14,29 @@ * limitations under the License. */ package org.apache.geronimo.axis; +import java.io.BufferedInputStream; +import java.io.File; +import java.io.FileInputStream; +import java.io.InputStream; +import java.io.ObjectInputStream; +import java.util.Collections; +import java.util.Enumeration; +import java.util.HashMap; +import java.util.HashSet; +import java.util.Hashtable; +import java.util.Map; +import java.util.Set; +import java.util.Vector; + +import javax.management.MalformedObjectNameException; +import javax.management.ObjectName; +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; +import org.apache.geronimo.connector.ActivationSpecWrapper; +import org.apache.geronimo.connector.ResourceAdapterWrapper; import org.apache.geronimo.connector.outbound.connectiontracking.ConnectionTrackingCoordinator; +import org.apache.geronimo.connector.work.GeronimoWorkManager; import org.apache.geronimo.deployment.DeploymentException; import org.apache.geronimo.gbean.GBeanInfo; import org.apache.geronimo.gbean.jmx.GBeanMBean; @@ -23,29 +44,19 @@ import org.apache.geronimo.kernel.Kernel; import org.apache.geronimo.kernel.config.Configuration; import org.apache.geronimo.kernel.jmx.JMXUtil; +import org.apache.geronimo.pool.ThreadPool; import org.apache.geronimo.system.serverinfo.ServerInfo; +import org.apache.geronimo.timer.vm.VMStoreThreadPooledNonTransactionalTimer; +import org.apache.geronimo.timer.vm.VMStoreThreadPooledTransactionalTimer; import org.apache.geronimo.transaction.GeronimoTransactionManager; +import org.apache.geronimo.transaction.context.TransactionContextManager; import org.openejb.ContainerIndex; -import javax.management.MalformedObjectNameException; -import javax.management.ObjectName; -import java.io.BufferedInputStream; -import java.io.File; -import java.io.FileInputStream; -import java.io.InputStream; -import java.io.ObjectInputStream; -import java.util.Collections; -import java.util.Enumeration; -import java.util.HashSet; -import java.util.Hashtable; -import java.util.Set; -import java.util.Vector; - /** * Class DependancyEJBManager */ public class DependancyEJBManager { - + protected final Log log = LogFactory.getLog(getClass()); /** * Field j2eeServerObjectName */ @@ -75,6 +86,7 @@ private static final ObjectName connectionTrackerObjectName = JMXUtil.getObjectName(j2eeDomainName + ":type=ConnectionTracker"); + /** * Field containerIndexObjectName */ @@ -108,6 +120,7 @@ public DependancyEJBManager(Kernel kernel) { this.kernel = kernel; configStore = new File(AxisGeronimoConstants.AXIS_CONFIG_STORE); + log.debug("configuration Store is "+configStore.getAbsolutePath()); dependedEJBs = new Vector(); } @@ -120,15 +133,18 @@ */ public void startDependancies(Hashtable properites) throws MalformedObjectNameException, DeploymentException { + //start the J2EE server startJ2EEServer(); + log.debug("start the J2ee server"); + //start the ContinerIndex startContainerIndex(); - + log.debug("start the Continer Index"); + + //start the each dependent EJB Enumeration enu = properites.keys(); - while (enu.hasMoreElements()) { String dir = (String) enu.nextElement(); String serviceName = (String) properites.get(dir); - startDependancy(dir, serviceName); } } @@ -141,15 +157,18 @@ public void stopDependancies() throws DeploymentException { // stop strated ejbs for (int i = 0; i < dependedEJBs.size(); i++) { - AxisGeronimoUtils.stopGBean((ObjectName) dependedEJBs.get(i), - kernel); + ObjectName gbeanName = (ObjectName) dependedEJBs.get(i); + AxisGeronimoUtils.stopGBean(gbeanName,kernel); + System.out.println("stop the dependent EJB name="+gbeanName); + log.debug("stop the dependent EJB name="+gbeanName); } // stop the continer Index stopContainerIndex(); - + log.debug("stop the Continer Index"); // stop the j2ee server stopJ2EEServer(); + log.debug("stop the J2EE server"); } /** @@ -175,7 +194,14 @@ // start the configuration kernel.startRecursiveGBean(objectName); - } catch (Exception e) { + + System.out.println("start dependent EJB name="+objectName + +" dir="+unpackedDir.getAbsolutePath()); + log.debug("start dependent EJB name="+objectName + +" dir="+unpackedDir.getAbsolutePath()); + } catch (DeploymentException e) { + throw e; + }catch (Exception e) { throw new DeploymentException(e); } } @@ -226,7 +252,6 @@ try { String str = System.getProperty(javax.naming.Context.URL_PKG_PREFIXES); - if (str == null) { str = ":org.apache.geronimo.naming"; } else { @@ -235,51 +260,85 @@ System.setProperty(javax.naming.Context.URL_PKG_PREFIXES, str); - GBeanMBean serverInfoGBean = new GBeanMBean(ServerInfo.GBEAN_INFO); + setUpTransactionManager(kernel); + setUpTimer(kernel); + GBeanMBean serverInfoGBean = new GBeanMBean(ServerInfo.GBEAN_INFO); serverInfoGBean.setAttribute("baseDirectory", "."); - - this.serverInfoObjectName = ObjectName.getInstance(j2eeDomainName - + ":type=ServerInfo"); - - AxisGeronimoUtils.startGBean(serverInfoObjectName, serverInfoGBean, - kernel); - - GBeanMBean j2eeServerGBean = - new GBeanMBean(J2EEServerImpl.GBEAN_INFO); - + ObjectName serverInfoObjectName = ObjectName.getInstance(j2eeDomainName + ":type=ServerInfo"); + kernel.loadGBean(serverInfoObjectName, serverInfoGBean); + kernel.startGBean(serverInfoObjectName); + + GBeanMBean j2eeServerGBean = new GBeanMBean(J2EEServerImpl.GBEAN_INFO); j2eeServerGBean.setReferencePatterns("ServerInfo", Collections.singleton(serverInfoObjectName)); - - this.j2eeServerObjectName = ObjectName.getInstance(j2eeDomainName - + ":j2eeType=J2EEServer,name=" + j2eeServerName); - - AxisGeronimoUtils.startGBean(j2eeServerObjectName, j2eeServerGBean, - kernel); - - GBeanMBean tmGBean = - new GBeanMBean(GeronimoTransactionManager.GBEAN_INFO); - Set patterns = new HashSet(); - - patterns.add(ObjectName.getInstance("geronimo.server:j2eeType=JCAManagedConnectionFactory,*")); - patterns.add(ObjectName.getInstance("geronimo.server:j2eeType=ActivationSpec,*")); - tmGBean.setReferencePatterns("resourceManagers", patterns); - AxisGeronimoUtils.startGBean(transactionManagerObjectName, tmGBean, - kernel); - - GBeanMBean connectionTrackerGBean = - new GBeanMBean(ConnectionTrackingCoordinator.GBEAN_INFO); - ObjectName connectionTrackerObjectName = - ObjectName.getInstance(j2eeDomainName - + ":type=ConnectionTracker"); - - AxisGeronimoUtils.startGBean(connectionTrackerObjectName, - connectionTrackerGBean, kernel); + ObjectName j2eeServerObjectName = ObjectName.getInstance(AxisGeronimoConstants.J2EE_SERVER_OBJECT_NAME); + kernel.loadGBean(j2eeServerObjectName, j2eeServerGBean); + kernel.startGBean(j2eeServerObjectName); + // //load mock resource adapter for mdb - // DeploymentHelper.setUpResourceAdapter(kernel); + // setUpResourceAdapter(kernel); } catch (Exception e) { throw new DeploymentException(e); } + } + + + private void setUpTransactionManager(Kernel kernel) throws DeploymentException{ + try { + GBeanMBean tmGBean = new GBeanMBean(GeronimoTransactionManager.GBEAN_INFO); + Set rmpatterns = new HashSet(); + rmpatterns.add(ObjectName.getInstance("geronimo.server:j2eeType=JCAManagedConnectionFactory,*")); + tmGBean.setReferencePatterns("ResourceManagers", rmpatterns); + AxisGeronimoUtils.startGBean(AxisGeronimoConstants.TRANSACTIONMANAGER_NAME, tmGBean,kernel); + GBeanMBean tcmGBean = new GBeanMBean(TransactionContextManager.GBEAN_INFO); + tcmGBean.setReferencePattern("TransactionManager", AxisGeronimoConstants.TRANSACTIONMANAGER_NAME); + AxisGeronimoUtils.startGBean(AxisGeronimoConstants.TRANSACTIONCONTEXTMANAGER_NAME, tcmGBean,kernel); + GBeanMBean trackedConnectionAssociator = new GBeanMBean(ConnectionTrackingCoordinator.GBEAN_INFO); + AxisGeronimoUtils.startGBean(AxisGeronimoConstants.TRACKEDCONNECTIONASSOCIATOR_NAME, trackedConnectionAssociator,kernel); + } catch (Exception e) { + throw new DeploymentException(e); + } + } + + public static void setUpTimer(Kernel kernel) throws Exception { + GBeanMBean threadPoolGBean = new GBeanMBean(ThreadPool.GBEAN_INFO); + threadPoolGBean.setAttribute("keepAliveTime", new Integer(5000)); + threadPoolGBean.setAttribute("poolSize", new Integer(5)); + threadPoolGBean.setAttribute("poolName", "DefaultThreadPool"); + AxisGeronimoUtils.startGBean(AxisGeronimoConstants.THREADPOOL_NAME, threadPoolGBean,kernel); + GBeanMBean transactionalTimerGBean = new GBeanMBean(VMStoreThreadPooledTransactionalTimer.GBEAN_INFO); + transactionalTimerGBean.setAttribute("repeatCount", new Integer(5)); + transactionalTimerGBean.setReferencePattern("TransactionContextManager", AxisGeronimoConstants.TRANSACTIONCONTEXTMANAGER_NAME); + transactionalTimerGBean.setReferencePattern("ThreadPool", AxisGeronimoConstants.THREADPOOL_NAME); + AxisGeronimoUtils.startGBean(AxisGeronimoConstants.TRANSACTIONALTIMER_NAME, transactionalTimerGBean,kernel); + GBeanMBean nonTransactionalTimerGBean = new GBeanMBean(VMStoreThreadPooledNonTransactionalTimer.GBEAN_INFO); + nonTransactionalTimerGBean.setReferencePattern("ThreadPool", AxisGeronimoConstants.THREADPOOL_NAME); + AxisGeronimoUtils.startGBean(AxisGeronimoConstants.NONTRANSACTIONALTIMER_NAME, nonTransactionalTimerGBean,kernel); + } + + public void setUpResourceAdapter(Kernel kernel) throws Exception { + GBeanMBean geronimoWorkManagerGBean = new GBeanMBean(GeronimoWorkManager.getGBeanInfo()); + geronimoWorkManagerGBean.setAttribute("syncMaximumPoolSize", new Integer(5)); + geronimoWorkManagerGBean.setAttribute("startMaximumPoolSize", new Integer(5)); + geronimoWorkManagerGBean.setAttribute("scheduledMaximumPoolSize", new Integer(5)); + geronimoWorkManagerGBean.setReferencePattern("XAServices", AxisGeronimoConstants.TRANSACTIONMANAGER_NAME); + AxisGeronimoUtils.startGBean(AxisGeronimoConstants.WORKMANAGER_NAME, geronimoWorkManagerGBean,kernel); + + GBeanMBean resourceAdapterGBean = new GBeanMBean(ResourceAdapterWrapper.getGBeanInfo()); + Map activationSpecInfoMap = new HashMap(); +// ActivationSpecInfo activationSpecInfo = new ActivationSpecInfo(MockActivationSpec.class, ActivationSpecWrapper.getGBeanInfo()); +// activationSpecInfoMap.put(MockActivationSpec.class.getName(), activationSpecInfo); +// resourceAdapterGBean.setAttribute("resourceAdapterClass", MockResourceAdapter.class); +// resourceAdapterGBean.setAttribute("activationSpecInfoMap", activationSpecInfoMap); + resourceAdapterGBean.setReferencePattern("WorkManager", AxisGeronimoConstants.WORKMANAGER_NAME); + AxisGeronimoUtils.startGBean(AxisGeronimoConstants.RESOURCE_ADAPTER_NAME, resourceAdapterGBean,kernel); + + GBeanMBean activationSpecGBean = new GBeanMBean(ActivationSpecWrapper.getGBeanInfo()); +// activationSpecGBean.setAttribute("activationSpecClass", MockActivationSpec.class); + activationSpecGBean.setAttribute("containerId", AxisGeronimoConstants.CONTAINER_NAME.getCanonicalName()); + activationSpecGBean.setReferencePattern("ResourceAdapterWrapper", AxisGeronimoConstants.RESOURCE_ADAPTER_NAME); + AxisGeronimoUtils.startGBean(AxisGeronimoConstants.ACTIVATIONSPEC_NAME, activationSpecGBean,kernel); } /** 1.2 +3 -0 incubator-geronimo/modules/axis/src/java/org/apache/geronimo/axis/GeronimoWsDeployContext.java Index: GeronimoWsDeployContext.java =================================================================== RCS file: /home/cvs/incubator-geronimo/modules/axis/src/java/org/apache/geronimo/axis/GeronimoWsDeployContext.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- GeronimoWsDeployContext.java 22 Jul 2004 14:57:48 -0000 1.1 +++ GeronimoWsDeployContext.java 28 Jul 2004 14:24:48 -0000 1.2 @@ -117,4 +117,7 @@ public String getOutPutLocation() { return outputLocation; } + public boolean isCompile(){ + return true; + } } 1.5 +38 -14 incubator-geronimo/modules/axis/src/java/org/apache/geronimo/axis/WebServiceContainer.java Index: WebServiceContainer.java =================================================================== RCS file: /home/cvs/incubator-geronimo/modules/axis/src/java/org/apache/geronimo/axis/WebServiceContainer.java,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- WebServiceContainer.java 22 Jul 2004 14:57:48 -0000 1.4 +++ WebServiceContainer.java 28 Jul 2004 14:24:48 -0000 1.5 @@ -15,6 +15,8 @@ */ package org.apache.geronimo.axis; +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; import org.apache.geronimo.gbean.jmx.GBeanMBean; import org.apache.geronimo.jetty.JettyWebAppContext; import org.apache.geronimo.kernel.Kernel; @@ -40,7 +42,7 @@ * Class WebServiceContainer */ public class WebServiceContainer { - + protected final Log log = LogFactory.getLog(getClass()); /** * Field kernel */ @@ -80,6 +82,8 @@ * Field ejbManager */ private DependancyEJBManager ejbManager; + + private ObjectName tcmName; /** * Constructor WebServiceContainer @@ -98,12 +102,10 @@ containerPatterns = Collections.singleton(containerName); appName = new ObjectName(AxisGeronimoConstants.APPLICATION_NAME); - tmName = - new ObjectName(AxisGeronimoConstants.TRANSACTION_MANAGER_NAME); + tmName = new ObjectName(AxisGeronimoConstants.TRANSACTION_MANAGER_NAME); + tcmName = new ObjectName(AxisGeronimoConstants.TRANSACTION_CONTEXT_MANAGER_NAME); tcaName = new ObjectName(AxisGeronimoConstants.CONNTECTION_TRACKING_COORDINATOR); } catch (MalformedObjectNameException e) { - e.printStackTrace(); - throw new RuntimeException(e); } } @@ -121,7 +123,11 @@ */ public void doStart() throws Exception { ejbManager = new DependancyEJBManager(kernel); - + + //The code needed a axis.properties file. If it is not there it is created. + //the ideal case is this information should be in the server-config.wsdd file + //but still the Axis is stanalone. I do not like the idea of yet another + //deployment discrypter. File axisPopertiesfile = new File(new File(AxisGeronimoConstants.AXIS_CONFIG_STORE), "axis.properties"); @@ -129,9 +135,11 @@ if (axisPopertiesfile.exists()) { axisProperties.load(new FileInputStream(axisPopertiesfile)); + log.debug(axisPopertiesfile.getAbsoluteFile() + " file found and loaded"); } else { axisPopertiesfile.getParentFile().mkdirs(); axisPopertiesfile.createNewFile(); + log.debug(" axis.properties file not found and created"); } // TODO deployed webservices should be stored in the local config store @@ -141,28 +149,43 @@ // Start the EJB's that depend on the webservices ejbManager.startDependancies(axisProperties); - + log.debug("start dependent EJBs "); + + //This code is taken from the org.apache.geronimo.jetty.ApplicationTest in the + //jetty module tests .. If something is not working we got to test weather the + //test has changed + GBeanMBean app = new GBeanMBean(JettyWebAppContext.GBEAN_INFO, myCl); URL url = Thread.currentThread().getContextClassLoader().getResource("deployables/axis/"); - app.setAttribute("URI", URI.create(url.toString())); +// app.setAttribute("uri", URI.create(url.toString())); +// app.setAttribute("contextPath", "/axis"); +// app.setAttribute("componentContext", null); +// UserTransactionImpl userTransaction = new UserTransactionImpl(); +// app.setAttribute("userTransaction", userTransaction); +// app.setReferencePatterns("Configuration", Collections.EMPTY_SET); +// app.setReferencePatterns("JettyContainer", containerPatterns); +// app.setReferencePatterns("TransactionContextManager", +// Collections.singleton(tmName)); +// app.setReferencePatterns("TrackedConnectionAssociator", +// Collections.singleton(tcaName)); + + app.setAttribute("uri", URI.create(url.toString())); app.setAttribute("contextPath", "/axis"); app.setAttribute("componentContext", null); - UserTransactionImpl userTransaction = new UserTransactionImpl(); - app.setAttribute("userTransaction", userTransaction); app.setReferencePatterns("Configuration", Collections.EMPTY_SET); app.setReferencePatterns("JettyContainer", containerPatterns); - app.setReferencePatterns("TransactionManager", - Collections.singleton(tmName)); - app.setReferencePatterns("TrackedConnectionAssociator", - Collections.singleton(tcaName)); + app.setReferencePattern("TransactionContextManager", tcmName); + app.setReferencePattern("TrackedConnectionAssociator", tcaName); + // TODO add a dependancy to such that to this service to started the // jetty must have been started start(appName, app); + log.debug("Axis started as a web application inside Jetty"); } /** @@ -222,6 +245,7 @@ for (int i = 0; i < jars.length; i++) { if (jars[i].getAbsolutePath().endsWith(".jar")) { urls.add(jars[i].toURL()); + log.debug("found a jar" + jars[i].getAbsolutePath()); } } } 1.2 +119 -22 incubator-geronimo/modules/axis/src/java/org/apache/geronimo/axis/WebServiceDeployer.java Index: WebServiceDeployer.java =================================================================== RCS file: /home/cvs/incubator-geronimo/modules/axis/src/java/org/apache/geronimo/axis/WebServiceDeployer.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- WebServiceDeployer.java 22 Jul 2004 14:57:48 -0000 1.1 +++ WebServiceDeployer.java 28 Jul 2004 14:24:48 -0000 1.2 @@ -15,6 +15,20 @@ */ package org.apache.geronimo.axis; +import java.io.File; +import java.io.FileInputStream; +import java.io.FileNotFoundException; +import java.io.FileOutputStream; +import java.io.IOException; +import java.net.URL; +import java.net.URLClassLoader; +import java.util.Enumeration; +import java.util.Properties; +import java.util.zip.ZipEntry; +import java.util.zip.ZipFile; + +import javax.management.ObjectName; + import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.apache.geronimo.deployment.DeploymentException; @@ -28,16 +42,6 @@ import org.apache.xmlbeans.XmlObject; import org.openejb.deployment.OpenEJBModuleBuilder; -import javax.management.ObjectName; -import java.io.File; -import java.io.FileInputStream; -import java.io.FileNotFoundException; -import java.io.FileOutputStream; -import java.io.IOException; -import java.net.URL; -import java.net.URLClassLoader; -import java.util.Properties; - /** * Class WebServiceDeployer */ @@ -115,7 +119,7 @@ /** * Field hasEJB */ - private boolean hasEJB = true; + private boolean hasEJB = false; /** * Constructor WebServiceDeployer @@ -137,7 +141,9 @@ } /** - * Method deploy + * <p>Method deploy is used to do the Deployment based on the j2ee web service module + * as explaied by the JSR109 specification. But to use this the classapth must contains + * the $JAVA_HOME/lib/tools.jar</p> * * @param module * @param j2eeApplicationName @@ -155,7 +161,6 @@ new GeronimoWsDeployContext(module, tempOutDir + "/server"); Ws4J2ee ws4j2ee = new Ws4J2ee(deployContext, null); - ws4j2ee.generate(); log.info("ews code generation done."); @@ -165,19 +170,52 @@ this.hasEJB = true; System.out.println("the web service is based on a ejb."); - log.info("the web service is based on a ejb."); + //log.info("the web service is based on a ejb."); } else if (packageModule.getWebddfile() != null) { this.hasEJB = false; System.out.println("the web service is based on a java class."); - log.info("the web service is based on a java class."); + //log.info("the web service is based on a java class."); } else { throw new DeploymentException("the module must have web.xml or ejb-jar.xml file"); } File file = findTheImpl(); + deployTheWebService(file); + addEntryToAxisDDStatically(file); + } + + /** + * <p>Deploy the web service based on the jar file generated by the EWS tool. + * This is to work around the compilation probleam</p> + * @param module + * @param j2eeApplicationName + * @param j2eeModuleName + * @throws Exception + */ + public void deployEWSModule(String module, String j2eeApplicationName, String j2eeModuleName) + throws Exception { + this.j2eeModuleName = j2eeModuleName; + this.module = module; + log.info("start deployment with the " + this.module + "."); + ZipFile zipfile = new ZipFile(module); + Enumeration entires = zipfile.entries(); + while(entires.hasMoreElements()){ + ZipEntry zipe = (ZipEntry)entires.nextElement(); + String name = zipe.getName(); + if(name.endsWith("/ejb-jar.xml")){ + this.hasEJB = true; + System.out.println("entry found "+name+" the web service is based on a ejb."); + //log.info("the web service is based on a ejb."); + break; + } + } + + File file = new File(module); deployTheWebService(file); + addEntryToAxisDDStatically(file); + } /** @@ -252,17 +290,14 @@ deployEJB(earFile, unpackedDir); } else { File out = new File(unpackedDir, earFile.getName()); - copyTheFile(earFile, out); } } catch (Exception e) { - // if something goes wrong make sure nothing leaves in a middle // state if (unpackedDir != null) { AxisGeronimoUtils.delete(unpackedDir); } - throw new DeploymentException(e); } } @@ -277,6 +312,15 @@ private void deployEJB(File earFile, File unpackedDir) throws DeploymentException { try { +///////////////////////////////////////////////////////////////////////////////////////////// + /** + * TODO following code deploy the EJB in the OpenEJB EJB continaer. + * The code is borrows from the geronimo openEJB module + * modules/core/src/test/org/openejb/deployment/EJBConfigBuilderTest.java#testEJBJarDeploy() + * Method. If this code is broken first the above test should check. If that change this will broke + * But this can quickly fix looking at it. + */ + ModuleBuilder moduleBuilder = new OpenEJBModuleBuilder(kernel); ClassLoader oldCl = Thread.currentThread().getContextClassLoader(); @@ -286,11 +330,16 @@ Thread.currentThread().setContextClassLoader(cl); File carFile = File.createTempFile("OpenEJBTest", ".car"); + ObjectName j2eeServerObjectName = ObjectName.getInstance(AxisGeronimoConstants.J2EE_SERVER_OBJECT_NAME); try { - EARConfigBuilder earConfigBuilder = new EARConfigBuilder(new ObjectName(j2eeDomainName + ":j2eeType=J2EEServer,name=" - + j2eeServerName), transactionManagerObjectName, - connectionTrackerObjectName, null, null, + EARConfigBuilder earConfigBuilder + = new EARConfigBuilder( + j2eeServerObjectName, + AxisGeronimoConstants.TRANSACTIONCONTEXTMANAGER_NAME, + AxisGeronimoConstants.TRACKEDCONNECTIONASSOCIATOR_NAME, + AxisGeronimoConstants.TRANSACTIONALTIMER_NAME, + AxisGeronimoConstants.NONTRANSACTIONALTIMER_NAME, null, moduleBuilder, null, null, null); XmlObject plan = earConfigBuilder.getDeploymentPlan(earFile.toURL()); @@ -299,7 +348,7 @@ plan); LocalConfigStore.unpack(unpackedDir, new FileInputStream(carFile)); - +///////////////////////////////////////////////////////////////////////////////// // store the property IFF all goes well storeProperties(); } finally { @@ -357,5 +406,53 @@ in.close(); out.close(); } + } + /** + * <p>add the entry to the Axis Confieration file about the web service. + * This find the coniguration file and and update this. There are two problems. + * Number one is service is deployed only once the Axis is restarted. And it is + * best not to do this while the Axis is running.</p> + * @param module + * @throws DeploymentException + */ + private void addEntryToAxisDDStatically(File module)throws DeploymentException{ +// try { +// InputStream wsddconf = null; +// File file = null; +// ClassLoader contextLoader = Thread.currentThread().getContextClassLoader(); +// URL url = contextLoader.getResource("deployables/axis/WEB-INF/server-config.wsdd"); +// if(url != null){ +// file = new File(url.getFile()); +// if(!url.sameFile(file.toURL())) +// throw new DeploymentException("can not load the configuaration"); +// wsddconf = new FileInputStream(file); +// } +// +// if(wsddconf == null){ +// wsddconf = contextLoader.getResourceAsStream("org/apache/axis/server/server-config.wsdd"); +// } +// +// ZipFile zipfile = new ZipFile(module); +// ZipEntry zentry = zipfile.getEntry("deploy.wsdd"); +// InputStream deplydd = zipfile.getInputStream(zentry); +// +// Admin admin = new Admin(); +// +// WSDDDocument wsddDoc = new WSDDDocument(XMLUtils.newDocument(wsddconf)); +// WSDDDeployment deployment = wsddDoc.getDeployment(); +// AxisEngine engine = new AxisServer(deployment); +// engine.setShouldSaveConfig(true); +// engine.init(); +// MessageContext msgContext = new MessageContext(engine); +// +// Document doc = XMLUtils.newDocument(deplydd); +// Document result = admin.process(msgContext, doc.getDocumentElement()); +// System.out.println(XMLUtils.DocumentToString(result)); +// PrintWriter w = new PrintWriter(new FileWriter(file)); +// deployment.writeToContext(new SerializationContextImpl(w)); +// w.close(); +// } catch (Exception e) { +// throw new DeploymentException(e); +// } } } 1.2 +11 -2 incubator-geronimo/modules/axis/src/java/org/apache/geronimo/axis/WebServiceDeployerGbean.java Index: WebServiceDeployerGbean.java =================================================================== RCS file: /home/cvs/incubator-geronimo/modules/axis/src/java/org/apache/geronimo/axis/WebServiceDeployerGbean.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- WebServiceDeployerGbean.java 22 Jul 2004 14:57:48 -0000 1.1 +++ WebServiceDeployerGbean.java 28 Jul 2004 14:24:48 -0000 1.2 @@ -60,8 +60,12 @@ infoFactory.addOperation("deploy", new Class[]{String.class, String.class, String.class}); - infoFactory.setConstructor(new String[]{"kernel", "Name", - "objectName"}); + + infoFactory.addOperation("deployEWSModule", new Class[]{String.class, + String.class, + String.class}); + + infoFactory.setConstructor(new String[]{"kernel", "Name"}); GBEAN_INFO = infoFactory.getBeanInfo(); } @@ -134,6 +138,11 @@ public void deploy(String module, String j2eeApplicationName, String j2eeModuleName) throws Exception { wsdeployer.deploy(module, j2eeApplicationName, j2eeModuleName); + } + + public void deployEWSModule(String module, String j2eeApplicationName, String j2eeModuleName) + throws Exception { + wsdeployer.deployEWSModule(module, j2eeApplicationName, j2eeModuleName); } /** 1.1 incubator-geronimo/modules/axis/src/samples/echo/build.xml Index: build.xml =================================================================== <?xml version="1.0"?> <project basedir="." default="jar" > <property name="src" location="."/> <property name="build" location="build"/> <property name="build.classes" location="${build}/classes"/> <property name="build.lib" location="${build}/lib"/> <property name="lib" location="lib"/> <property name="jar.dir" location="../../../target/samples/"/> <target name="compile" depends="init" unless="jars.uptodate"> <mkdir dir="${build.classes}"/> <mkdir dir="${build.lib}"/> <javac destdir="${build.classes}" debug="on"> <classpath refid="maven.dependency.classpath" /> <src path="${src}"/> </javac> </target> <target name="jar" depends="compile" unless="jars.uptodate"> <echoproperties /> <mkdir dir="${build.classes}/META-INF/"/> <copy file ="${basedir}/META-INF/webservice.xml" todir="${build.classes}/META-INF"/> <copy file ="${basedir}/META-INF/ejb-jar.xml" todir="${build.classes}/META-INF"/> <mkdir dir="${jar.dir}"/> <jar jarfile="${jar.dir}/echo.jar" basedir="${build.classes}" > <include name="**" /> </jar> <copy todir="${build.classes}/META-INF"> <fileset dir="${basedir}/META-INF/"> <include name="**/*.xml"/> <exclude name="build.xml"/> </fileset> </copy> <delete dir="${build}"/> </target> <target name="init"> <uptodate property="jars.uptodate" targetfile="${jar.dir}/echo.jar"> <srcfiles dir="${src}"> <include name="**/*.java"/> <include name="**/*.xml"/> <include name="**/*.wsdl"/> <exclude name="${build}/**"/> </srcfiles> </uptodate> <echo message="the files are up to date = ${jars.uptodate}"></echo> </target> </project> 1.1 incubator-geronimo/modules/axis/src/samples/echo/META-INF/ejb-jar.xml Index: ejb-jar.xml =================================================================== <?xml version="1.0" encoding="UTF-8"?> <ejb-jar xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/ejb-jar_2_1.xsd" version="2.1"> <display-name>BookQuoteService</display-name> <enterprise-beans> <session> <display-name>echo</display-name> <ejb-name>echo</ejb-name> <home>org.apache.ws.echosample.EchoHome</home> <remote>org.apache.ws.echosample.EchoEJB</remote> <ejb-class>org.apache.ws.echosample.EchoBean</ejb-class> <session-type>Stateless</session-type> <transaction-type>Bean</transaction-type> </session> </enterprise-beans> <assembly-descriptor> <method-permission> <unchecked/> <method> <ejb-name>echo</ejb-name> <method-name>*</method-name> </method> </method-permission> </assembly-descriptor> </ejb-jar> 1.1 incubator-geronimo/modules/axis/src/samples/echo/META-INF/webservice.xml Index: webservice.xml =================================================================== <?xml version="1.0" encoding="UTF-8"?> <webservices xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ns1="http://echosample.ws.apache.org" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://www.ibm.com/standards/xml/webservices/j2ee/j2ee_web_services_1_1.xsd" version="1.1"> <description>echo Service</description> <display-name>echo</display-name> <webservice-description > <description>echo</description> <display-name>echo</display-name> <webservice-description-name >echoService</webservice-description-name> <wsdl-file >echo.wsdl</wsdl-file> <jaxrpc-mapping-file >echomapping.xml</jaxrpc-mapping-file> <port-component > <description >echo</description> <display-name >echo</display-name> <icon xml:lang="en-us" id="ID000298"> <small-icon>token</small-icon> <large-icon>token</large-icon> </icon> <port-component-name >echo</port-component-name> <wsdl-port id="ID000311">ns1:echoPort</wsdl-port> <service-endpoint-interface >org.apache.ws.echosample.Echo</service-endpoint-interface> <service-impl-bean > <ejb-link >echo</ejb-link> </service-impl-bean> </port-component> </webservice-description> </webservices> 1.1 incubator-geronimo/modules/axis/src/samples/echo/org/apache/ws/echosample/Echo.java Index: Echo.java =================================================================== package org.apache.ws.echosample; public interface Echo extends java.rmi.Remote { public void echoVoid()throws java.rmi.RemoteException; public int echoInt(int in)throws java.rmi.RemoteException; public double echoDouble(double in)throws java.rmi.RemoteException; public float echoFloat(float in)throws java.rmi.RemoteException; public boolean echoBoolean(boolean in)throws java.rmi.RemoteException; public String echoString(String in)throws java.rmi.RemoteException; public short echoShort(short in)throws java.rmi.RemoteException; public long echoLong(long in)throws java.rmi.RemoteException; //public char echoChar(char in); public byte[] echoBytes(byte[] in)throws java.rmi.RemoteException; public void echoEvoid()throws java.rmi.RemoteException; public EchoStruct echoStruct(EchoStruct in)throws java.rmi.RemoteException; //public EchoStruct[] echoAStruct(EchoStruct[] in)throws java.rmi.RemoteException; } 1.1 incubator-geronimo/modules/axis/src/samples/echo/org/apache/ws/echosample/EchoBean.java Index: EchoBean.java =================================================================== package org.apache.ws.echosample; public class EchoBean implements javax.ejb.SessionBean{ public void ejbCreate() {} public void echoVoid(){} public int echoInt(int in){ return in; } public double echoDouble(double in){ return in; } public float echoFloat(float in){ return in; } public boolean echoBoolean(boolean in){ return in; } public String echoString(String in){ return in; } public short echoShort(short in){ return in; } public long echoLong(long in){ return in; } public char echoChar(char in){ return in; } public byte[] echoBytes(byte[] in){ return in; } public void echoEvoid(){ } public EchoStruct echoStruct(EchoStruct in){ return in; } // public EchoStruct[] echoAStruct(EchoStruct[] in){ // return in; // } public void ejbActivate() throws javax.ejb.EJBException, java.rmi.RemoteException {} public void ejbPassivate() throws javax.ejb.EJBException, java.rmi.RemoteException {} public void ejbRemove() throws javax.ejb.EJBException, java.rmi.RemoteException {} public void setSessionContext(javax.ejb.SessionContext arg0)throws javax.ejb.EJBException, java.rmi.RemoteException {} } 1.1 incubator-geronimo/modules/axis/src/samples/echo/org/apache/ws/echosample/EchoStruct.java Index: EchoStruct.java =================================================================== package org.apache.ws.echosample; import java.io.Serializable; public class EchoStruct implements Serializable{ private int intVal; private double doubleVal; private byte[] bytesVal; private float floatVal; private long longVal; private short shortVal; private boolean boolaenVal; private String strVal; private int[] intaVal; private double[] doubleaVal; private byte[][] bytesaVal; private float[] floataVal; private long[] longaVal; private short[] shortaVal; private boolean[] boolaenaVal; private String[] straVal; private SmallEchoStruct sturctVal; private SmallEchoStruct sturctaVal; /** * @return */ public boolean[] getBoolaenaVal() { return boolaenaVal; } /** * @return */ public boolean isBoolaenVal() { return boolaenVal; } /** * @return */ public byte[][] getBytesaVal() { return bytesaVal; } /** * @return */ public byte[] getBytesVal() { return bytesVal; } /** * @return */ public double[] getDoubleaVal() { return doubleaVal; } /** * @return */ public double getDoubleVal() { return doubleVal; } /** * @return */ public float[] getFloataVal() { return floataVal; } /** * @return */ public float getFloatVal() { return floatVal; } /** * @return */ public int[] getIntaVal() { return intaVal; } /** * @return */ public int getIntVal() { return intVal; } /** * @return */ public long[] getLongaVal() { return longaVal; } /** * @return */ public long getLongVal() { return longVal; } /** * @return */ public short[] getShortaVal() { return shortaVal; } /** * @return */ public short getShortVal() { return shortVal; } /** * @return */ public String[] getStraVal() { return straVal; } /** * @return */ public String getStrVal() { return strVal; } /** * @param bs */ public void setBoolaenaVal(boolean[] bs) { boolaenaVal = bs; } /** * @param b */ public void setBoolaenVal(boolean b) { boolaenVal = b; } /** * @param bs */ public void setBytesaVal(byte[][] bs) { bytesaVal = bs; } /** * @param bs */ public void setBytesVal(byte[] bs) { bytesVal = bs; } /** * @param ds */ public void setDoubleaVal(double[] ds) { doubleaVal = ds; } /** * @param d */ public void setDoubleVal(double d) { doubleVal = d; } /** * @param fs */ public void setFloataVal(float[] fs) { floataVal = fs; } /** * @param f */ public void setFloatVal(float f) { floatVal = f; } /** * @param is */ public void setIntaVal(int[] is) { intaVal = is; } /** * @param i */ public void setIntVal(int i) { intVal = i; } /** * @param ls */ public void setLongaVal(long[] ls) { longaVal = ls; } /** * @param l */ public void setLongVal(long l) { longVal = l; } /** * @param ses */ public void setShortaVal(short[] ses) { shortaVal = ses; } /** * @param s */ public void setShortVal(short s) { shortVal = s; } /** * @param strings */ public void setStraVal(String[] strings) { straVal = strings; } /** * @param string */ public void setStrVal(String string) { strVal = string; } /** * @return */ public SmallEchoStruct getSturctaVal() { return sturctaVal; } /** * @return */ public SmallEchoStruct getSturctVal() { return sturctVal; } /** * @param struct */ public void setSturctaVal(SmallEchoStruct struct) { sturctaVal = struct; } /** * @param struct */ public void setSturctVal(SmallEchoStruct struct) { sturctVal = struct; } } 1.1 incubator-geronimo/modules/axis/src/samples/echo/org/apache/ws/echosample/SmallEchoStruct.java Index: SmallEchoStruct.java =================================================================== package org.apache.ws.echosample; import java.io.Serializable; public class SmallEchoStruct implements Serializable{ private String val1; private String val2; /** * @return */ public String getVal1() { return val1; } /** * @return */ public String getVal2() { return val2; } /** * @param string */ public void setVal1(String string) { val1 = string; } /** * @param string */ public void setVal2(String string) { val2 = string; } } 1.2 +51 -28 incubator-geronimo/modules/axis/src/test/org/apache/geronimo/axis/AdminClientDeploymentTest.java Index: AdminClientDeploymentTest.java =================================================================== RCS file: /home/cvs/incubator-geronimo/modules/axis/src/test/org/apache/geronimo/axis/AdminClientDeploymentTest.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- AdminClientDeploymentTest.java 22 Jul 2004 14:57:49 -0000 1.1 +++ AdminClientDeploymentTest.java 28 Jul 2004 14:24:50 -0000 1.2 @@ -15,8 +15,19 @@ */ package org.apache.geronimo.axis; +import java.io.File; +import java.io.InputStream; +import java.io.PrintWriter; +import java.net.MalformedURLException; +import java.net.URL; +import java.net.URLClassLoader; + +import javax.management.ObjectName; + import org.apache.axis.AxisEngine; import org.apache.axis.MessageContext; +import org.apache.axis.client.AdminClient; +import org.apache.axis.client.Call; import org.apache.axis.deployment.wsdd.WSDDDeployment; import org.apache.axis.deployment.wsdd.WSDDDocument; import org.apache.axis.encoding.SerializationContextImpl; @@ -27,18 +38,16 @@ import org.apache.geronimo.gbean.jmx.GBeanMBean; import org.apache.geronimo.kernel.Kernel; import org.w3c.dom.Document; - -import javax.management.ObjectName; -import java.io.File; -import java.io.InputStream; -import java.io.PrintWriter; -import java.net.URL; -import java.net.URLClassLoader; +/** + * <p>This test case shows the possible two ways of add a entry to the Axis + * server-config.wsdd Deployment Discrypter.</p> + */ public class AdminClientDeploymentTest extends AbstractTestCase { private ObjectName name; private Kernel kernel; private JettyServiceWrapper jettyService; + private File jarFile; /** * @param testName @@ -47,31 +56,11 @@ super(testName); } - public void testDeployWithAdminClient() throws Exception{ - File jarFile = new File(outDir + "/echo-ewsimpl.jar"); - if(!jarFile.exists()){ - GeronimoWsDeployContext deployContext = - new GeronimoWsDeployContext( - getTestFile("target/samples/echo.jar"), - outDir); - Ws4J2ee ws4j2ee = new Ws4J2ee(deployContext, null); - ws4j2ee.generate(); - } - + public void testDeployWithAdminClientStatically() throws Exception{ URLClassLoader cl = new URLClassLoader(new URL[]{jarFile.toURL()}); InputStream deplydd = cl.getResourceAsStream("deploy.wsdd"); assertNotNull(deplydd); - -// AdminClient adminClient = new AdminClient(); -// URL requestUrl = new URL("http://localhost:" -// +AxisGeronimConstants.AXIS_SERVICE_PORT -// +"/axis/services/AdminService"); -// Call call = adminClient.getCall(); -// call.setTargetEndpointAddress(requestUrl); -// String result = adminClient.process(null,deplydd); -// System.out.println(result); - Admin admin = new Admin(); InputStream wsddconf = getClass().getClassLoader().getResourceAsStream("org/apache/axis/server/server-config.wsdd"); assertNotNull(wsddconf); @@ -89,6 +78,30 @@ deployment.writeToContext(new SerializationContextImpl(w)); w.close(); } + public void testDeployWithAdminClientDinamically() throws Exception{ + URLClassLoader cl = new URLClassLoader(new URL[]{jarFile.toURL()}); + InputStream deplydd = cl.getResourceAsStream("deploy.wsdd"); + assertNotNull(deplydd); + + AdminClient adminClient = new AdminClient(); + URL requestUrl = new URL("http://localhost:" + +AxisGeronimoConstants.AXIS_SERVICE_PORT + +"/axis/services/AdminService"); + Call call = adminClient.getCall(); + call.setTargetEndpointAddress(requestUrl); + String result = adminClient.process(null,deplydd); + System.out.println(result); + } + + + public void testURLFileTest() throws MalformedURLException{ + ClassLoader contextLoader = Thread.currentThread().getContextClassLoader(); + URL url = contextLoader.getResource("deployables/axis/WEB-INF/web.xml"); + assertNotNull(url); + File file = new File(url.getFile()); + assertTrue(file.exists()); + assertTrue(url.sameFile(file.toURL())); + } protected void setUp() throws Exception { @@ -104,6 +117,16 @@ gbean.setAttribute("Name", "Test"); kernel.loadGBean(name, gbean); kernel.startGBean(name); + + jarFile = new File(outDir + "/echo-ewsimpl.jar"); + if(!jarFile.exists()){ + GeronimoWsDeployContext deployContext = + new GeronimoWsDeployContext( + getTestFile("target/samples/echo.jar"), + outDir); + Ws4J2ee ws4j2ee = new Ws4J2ee(deployContext, null); + ws4j2ee.generate(); + } } protected void tearDown() throws Exception { 1.3 +9 -6 incubator-geronimo/modules/axis/src/test/org/apache/geronimo/axis/AxisGBeanTest.java Index: AxisGBeanTest.java =================================================================== RCS file: /home/cvs/incubator-geronimo/modules/axis/src/test/org/apache/geronimo/axis/AxisGBeanTest.java,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- AxisGBeanTest.java 22 Jul 2004 14:57:49 -0000 1.2 +++ AxisGBeanTest.java 28 Jul 2004 14:24:50 -0000 1.3 @@ -24,7 +24,10 @@ import java.net.HttpURLConnection; import java.net.URL; import java.net.URLClassLoader; - +/** + * <p> This test case start the AxisGbean and test retiving the index.html of the + * Axis Service</p> + */ public class AxisGBeanTest extends AbstractTestCase { private ObjectName name; private Kernel kernel; @@ -37,7 +40,7 @@ super(testName); } - public void testLoad() throws Exception { + public void testStartAxisService() throws Exception { String textFileurl = "http://localhost:"+AxisGeronimoConstants.AXIS_SERVICE_PORT+"/axis/index.html"; ClassLoader cl = getClass().getClassLoader(); ClassLoader myCl = new URLClassLoader(new URL[0], cl); @@ -46,10 +49,10 @@ kernel.loadGBean(name, gbean); kernel.startGBean(name); System.out.println(kernel.getMBeanServer().getAttribute(name, "state")); - System.out.println( - kernel.getMBeanServer().invoke(name, "echo", - new Object[]{"Hello"}, - new String[]{String.class.getName()})); +// System.out.println( +// kernel.getMBeanServer().invoke(name, "echo", +// new Object[]{"Hello"}, +// new String[]{String.class.getName()})); HttpURLConnection connection = (HttpURLConnection) new URL(textFileurl).openConnection(); BufferedReader reader = new BufferedReader( new InputStreamReader(connection.getInputStream())); 1.2 +15 -2 incubator-geronimo/modules/axis/src/test/org/apache/geronimo/axis/DynamicEJBDeploymentTest.java Index: DynamicEJBDeploymentTest.java =================================================================== RCS file: /home/cvs/incubator-geronimo/modules/axis/src/test/org/apache/geronimo/axis/DynamicEJBDeploymentTest.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- DynamicEJBDeploymentTest.java 22 Jul 2004 14:57:49 -0000 1.1 +++ DynamicEJBDeploymentTest.java 28 Jul 2004 14:24:50 -0000 1.2 @@ -40,6 +40,11 @@ import java.util.HashSet; import java.util.Set; +/** + * <p>This test case show the infomation about openEJB that we assumed. And the + * simmlier code code is used in the real code. As the OpenEJB is developing and + * rapidly changing this test case act as a notifier for saying things has chaged</p> + */ public class DynamicEJBDeploymentTest extends AbstractTestCase{ private static final String j2eeDomainName = "openejb.server"; private static final String j2eeServerName = "TestOpenEJBServer"; @@ -84,7 +89,7 @@ Set patterns = new HashSet(); patterns.add(ObjectName.getInstance("geronimo.server:j2eeType=JCAManagedConnectionFactory,*")); patterns.add(ObjectName.getInstance("geronimo.server:j2eeType=ActivationSpec,*")); - tmGBean.setReferencePatterns("resourceManagers", patterns); + tmGBean.setReferencePatterns("ResourceManagers", patterns); kernel.loadGBean(transactionManagerObjectName, tmGBean); kernel.startGBean(transactionManagerObjectName); assertRunning(kernel, transactionManagerObjectName); @@ -119,8 +124,9 @@ Thread.currentThread().setContextClassLoader(cl); File carFile = File.createTempFile("OpenEJBTest", ".car"); + ObjectName j2eeServerObjectName = new ObjectName(j2eeDomainName + + ":j2eeType=J2EEServer,name=" + j2eeServerName); try { - EARConfigBuilder earConfigBuilder = new EARConfigBuilder(new ObjectName(j2eeDomainName + ":j2eeType=J2EEServer,name=" + j2eeServerName), transactionManagerObjectName, @@ -132,6 +138,13 @@ null, null, null); +// new EARConfigBuilder( null, +// null, +// j2eeServerObjectName, +// moduleBuilder, +// null, // web +// null, //connector +// transactionManagerObjectName, connectionTrackerObjectName); XmlObject plan = earConfigBuilder.getDeploymentPlan(earFile.toURL()); earConfigBuilder.buildConfiguration(carFile, null, earFile, plan); 1.2 +6 -6 incubator-geronimo/modules/axis/src/test/org/apache/geronimo/axis/EWSTest.java Index: EWSTest.java =================================================================== RCS file: /home/cvs/incubator-geronimo/modules/axis/src/test/org/apache/geronimo/axis/EWSTest.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- EWSTest.java 22 Jul 2004 14:57:49 -0000 1.1 +++ EWSTest.java 28 Jul 2004 14:24:50 -0000 1.2 @@ -18,23 +18,24 @@ import org.apache.geronimo.ews.ws4j2ee.toWs.Ws4J2ee; import java.io.File; - +/** + * <p>This test case represents the code generation with the EWS module. + * This test case needed the $JAVA_HOME/lib.tools.jar at the classapth.</p> + */ public class EWSTest extends AbstractTestCase { - /** - * @param testName - */ public EWSTest(String testName) { super(testName); } public void testEcho() throws Exception { - System.out.println(new File(".").getAbsolutePath()); GeronimoWsDeployContext deployContext = new GeronimoWsDeployContext( getTestFile("target/samples/echo.jar"), outDir); Ws4J2ee ws4j2ee = new Ws4J2ee(deployContext, null); ws4j2ee.generate(); + File out = new File(outDir,"echo-ewsimpl.jar"); + assertTrue(out.exists()); } protected void setUp() throws Exception { @@ -43,5 +44,4 @@ protected void tearDown() throws Exception { } - } 1.2 +30 -11 incubator-geronimo/modules/axis/src/test/org/apache/geronimo/axis/JettyServiceWrapper.java Index: JettyServiceWrapper.java =================================================================== RCS file: /home/cvs/incubator-geronimo/modules/axis/src/test/org/apache/geronimo/axis/JettyServiceWrapper.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- JettyServiceWrapper.java 22 Jul 2004 14:57:49 -0000 1.1 +++ JettyServiceWrapper.java 28 Jul 2004 14:24:50 -0000 1.2 @@ -22,6 +22,7 @@ import org.apache.geronimo.jetty.connector.HTTPConnector; import org.apache.geronimo.kernel.Kernel; import org.apache.geronimo.transaction.GeronimoTransactionManager; +import org.apache.geronimo.transaction.context.TransactionContextManager; import javax.management.MBeanServer; import javax.management.MalformedObjectNameException; @@ -31,7 +32,7 @@ import java.util.Set; /** - * @author [EMAIL PROTECTED] + * <p>This class wrap the Jetty service, This is a test utility only</p> */ public class JettyServiceWrapper { private ObjectName containerName; @@ -39,6 +40,7 @@ private ObjectName tmName; private ObjectName tcaName; private ObjectName connectorName; + private ObjectName tcmName; private final MBeanServer mbServer; @@ -49,8 +51,8 @@ containerPatterns = Collections.singleton(containerName); connectorName = new ObjectName(AxisGeronimoConstants.WEB_CONNECTOR_NAME); tmName = new ObjectName(AxisGeronimoConstants.TRANSACTION_MANAGER_NAME); - tcaName = - new ObjectName(AxisGeronimoConstants.CONNTECTION_TRACKING_COORDINATOR); + tcaName = new ObjectName(AxisGeronimoConstants.CONNTECTION_TRACKING_COORDINATOR); + tcmName = new ObjectName(AxisGeronimoConstants.TRANSACTION_CONTEXT_MANAGER_NAME); } public void doStart() throws Exception { @@ -58,20 +60,37 @@ GBeanMBean tm; GBeanMBean ctc; GBeanMBean container; + container = new GBeanMBean(JettyContainerImpl.GBEAN_INFO); + connector = new GBeanMBean(HTTPConnector.GBEAN_INFO); connector.setAttribute("port", new Integer(AxisGeronimoConstants.AXIS_SERVICE_PORT)); connector.setReferencePatterns("JettyContainer", containerPatterns); + start(containerName, container); start(connectorName, connector); - tm = new GBeanMBean(GeronimoTransactionManager.GBEAN_INFO); - Set patterns = new HashSet(); - patterns.add( - ObjectName.getInstance( - "geronimo.server:j2eeType=JCAManagedConnectionFactory,*")); - tm.setReferencePatterns("resourceManagers", patterns); - start(tmName, tm); - ctc = new GBeanMBean(ConnectionTrackingCoordinator.GBEAN_INFO); + +// tm = new GBeanMBean(GeronimoTransactionManager.GBEAN_INFO); +// Set patterns = new HashSet(); +// patterns.add( +// ObjectName.getInstance( +// "geronimo.server:j2eeType=JCAManagedConnectionFactory,*")); +// tm.setReferencePatterns("ResourceManagers", patterns); +// start(tmName, tm); +// ctc = new GBeanMBean(ConnectionTrackingCoordinator.GBEAN_INFO); + + + + tm = new GBeanMBean(GeronimoTransactionManager.GBEAN_INFO); + Set patterns = new HashSet(); + patterns.add(ObjectName.getInstance("geronimo.server:j2eeType=JCAManagedConnectionFactory,*")); + tm.setReferencePatterns("ResourceManagers", patterns); + start(tmName, tm); + GBeanMBean tcm = new GBeanMBean(TransactionContextManager.GBEAN_INFO); + tcm.setReferencePattern("TransactionManager", tmName); + start(tcmName, tcm); + ctc = new GBeanMBean(ConnectionTrackingCoordinator.GBEAN_INFO); + start(tcaName, ctc); } 1.3 +4 -6 incubator-geronimo/modules/axis/src/test/org/apache/geronimo/axis/TestServer.java Index: TestServer.java =================================================================== RCS file: /home/cvs/incubator-geronimo/modules/axis/src/test/org/apache/geronimo/axis/TestServer.java,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- TestServer.java 22 Jul 2004 14:57:49 -0000 1.2 +++ TestServer.java 28 Jul 2004 14:24:50 -0000 1.3 @@ -23,6 +23,10 @@ import javax.management.ObjectName; import java.net.URL; import java.net.URLClassLoader; +/** + * <p>Simple stanalone Axis Service started via a GBean. This is a test utility only</p> + * @author [EMAIL PROTECTED] + */ public class TestServer { private Kernel kernel; @@ -50,12 +54,6 @@ jettyService.doStop(); kernel.shutdown(); - } - - /* (non-Javadoc) - * @see java.lang.Object#finalize() - */ - protected void finalize() throws Throwable { } } 1.2 +3 -6 incubator-geronimo/modules/axis/src/test/org/apache/geronimo/axis/WebServiceDeploymentTest.java Index: WebServiceDeploymentTest.java =================================================================== RCS file: /home/cvs/incubator-geronimo/modules/axis/src/test/org/apache/geronimo/axis/WebServiceDeploymentTest.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- WebServiceDeploymentTest.java 22 Jul 2004 14:57:49 -0000 1.1 +++ WebServiceDeploymentTest.java 28 Jul 2004 14:24:50 -0000 1.2 @@ -20,9 +20,6 @@ import java.io.File; -/** - * @author [EMAIL PROTECTED] - */ public class WebServiceDeploymentTest extends AbstractTestCase{ private Kernel kernel; public WebServiceDeploymentTest(String name){ @@ -39,15 +36,15 @@ protected void tearDown() throws Exception { kernel.shutdown(); File file = new File(tempDir); + AxisGeronimoUtils.delete(file); + file = new File(AxisGeronimoConstants.AXIS_CONFIG_STORE); AxisGeronimoUtils.delete(file); } - - public void testDeployEJB() throws Exception{ WebServiceDeployer deployer = new WebServiceDeployer(tempDir,kernel); - deployer.deploy(getTestFile("target/samples/echo.jar"), + deployer.deployEWSModule(getTestFile("target/generated/samples/echo-ewsimpl.jar"), null, "ws/apache/axis/test2"); } 1.2 +35 -29 incubator-geronimo/modules/axis/src/test/org/apache/geronimo/axis/WebServiceTest.java Index: WebServiceTest.java =================================================================== RCS file: /home/cvs/incubator-geronimo/modules/axis/src/test/org/apache/geronimo/axis/WebServiceTest.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- WebServiceTest.java 22 Jul 2004 14:57:49 -0000 1.1 +++ WebServiceTest.java 28 Jul 2004 14:24:50 -0000 1.2 @@ -15,7 +15,7 @@ */ package org.apache.geronimo.axis; -import org.apache.geronimo.ews.ws4j2ee.wsutils.GeronimoUtils; + import org.apache.geronimo.gbean.jmx.GBeanMBean; import org.apache.geronimo.kernel.Kernel; @@ -39,32 +39,37 @@ } public void testLoad() throws Exception { - ClassLoader cl = getClass().getClassLoader(); - ClassLoader myCl = null; - - URL toolsURL = null; - String tools = System.getProperty("java.home"); - - if (tools != null) { - File f = new File(tools,"./../lib/tools.jar"); - System.out.println("tools.jar is "+f.getAbsolutePath()); - if (f.exists()) { - toolsURL = f.toURL(); - myCl = new URLClassLoader(new URL[]{toolsURL}, cl); - } - } - - GBeanMBean deploygbean = - new GBeanMBean(WebServiceDeployerGbean.getGBeanInfo(), myCl); + ClassLoader cl = Thread.currentThread().getContextClassLoader(); + ClassLoader myCl = new URLClassLoader(new URL[]{}, cl); + +// This code trying to lad the tools.jar and set it to the Context ClassLoader. +// It does not seem to help. +// URL toolsURL = null; +// String tools = System.getProperty("java.home"); +// assertNotNull(tools); +// //File f = new File(tools,"./../lib/tools.jar"); +// File f = new File("H:/j2sdk1.4.1_01/lib/","tools.jar"); +// System.out.println("tools.jar is "+f.getAbsolutePath()); +// if (f.exists()) { +// toolsURL = f.toURL(); +// myCl = new URLClassLoader(new URL[]{toolsURL}, cl); +// } +// Thread.currentThread().setContextClassLoader(myCl); +// +// GBeanMBean deploygbean = +// new GBeanMBean(WebServiceDeployerGbean.getGBeanInfo(), myCl); + + GBeanMBean deploygbean = + new GBeanMBean(WebServiceDeployerGbean.getGBeanInfo(), cl); kernel.loadGBean(deployGbeanName, deploygbean); kernel.startGBean(deployGbeanName); System.out.println( kernel.getMBeanServer().getAttribute(deployGbeanName, "state")); kernel.getMBeanServer().invoke( deployGbeanName, - "deploy", + "deployEWSModule", new Object[] { - getTestFile("target/samples/echo.jar"), + getTestFile("target/generated/samples/echo-ewsimpl.jar"), null, "ws/apache/axis/echo" }, new String[] { @@ -82,7 +87,7 @@ //invoke the ejb just in the same way it is invoked by the webservice String msg = "Hi Hello"; String result = - (String) GeronimoUtils.invokeEJB( + (String) AxisGeronimoUtils.invokeEJB( "echo", "echoString", new Class[] { String.class }, @@ -90,13 +95,13 @@ System.out.println(result); assertEquals(msg, result); - GeronimoUtils.invokeEJB("echo", "echoVoid", new Class[] { + AxisGeronimoUtils.invokeEJB("echo", "echoVoid", new Class[] { }, new Object[] { }); int valInt = 2345; Integer intObj = - (Integer) GeronimoUtils.invokeEJB( + (Integer) AxisGeronimoUtils.invokeEJB( "echo", "echoInt", null, @@ -105,7 +110,7 @@ double valDouble = 2425.57; Double doubleObj = - (Double) GeronimoUtils.invokeEJB( + (Double) AxisGeronimoUtils.invokeEJB( "echo", "echoDouble", null, @@ -114,7 +119,7 @@ float valfloat = 2425.57f; Float floatObj = - (Float) GeronimoUtils.invokeEJB( + (Float) AxisGeronimoUtils.invokeEJB( "echo", "echoFloat", null, @@ -123,7 +128,7 @@ boolean valBoolean = true; Boolean booleanObj = - (Boolean) GeronimoUtils.invokeEJB( + (Boolean) AxisGeronimoUtils.invokeEJB( "echo", "echoBoolean", null, @@ -132,7 +137,7 @@ long valLong = 2425573566l; Long longObj = - (Long) GeronimoUtils.invokeEJB( + (Long) AxisGeronimoUtils.invokeEJB( "echo", "echoLong", null, @@ -141,7 +146,7 @@ short valShort = 242; Short shortObj = - (Short) GeronimoUtils.invokeEJB( + (Short) AxisGeronimoUtils.invokeEJB( "echo", "echoShort", null, @@ -150,7 +155,7 @@ byte[] byteVal = "Hi Hello".getBytes(); byte[] byteValreturn = - (byte[]) GeronimoUtils.invokeEJB( + (byte[]) AxisGeronimoUtils.invokeEJB( "echo", "echoBytes", new Class[] { byte[].class }, @@ -169,6 +174,7 @@ kernel.boot(); jettyService = new JettyServiceWrapper(kernel); jettyService.doStart(); + AxisGeronimoUtils.delete(file); file.getParentFile().mkdirs(); }