1 17 package org.apache.servicemix.jbi.management.task; 18 19 import org.apache.servicemix.jbi.container.JBIContainer; 20 import org.apache.servicemix.jbi.framework.AdminCommandsServiceMBean; 21 import org.apache.servicemix.jbi.management.task.JbiTask; 22 23 import junit.framework.TestCase; 24 25 26 31 public abstract class JbiTaskSupport extends TestCase { 32 protected JBIContainer container = new JBIContainer(); 33 JbiTask remoteConnection; 34 37 protected void setUp() throws Exception { 38 super.setUp(); 39 container.setCreateMBeanServer(true); 40 container.setMonitorDeploymentDirectory(false); 41 container.setMonitorInstallationDirectory(false); 42 container.init(); 43 container.start(); 44 45 remoteConnection = new JbiTask(){ 46 protected void doExecute(AdminCommandsServiceMBean acs) throws Exception { 47 } 48 49 }; 50 remoteConnection.init(); 51 } 52 53 56 protected void tearDown() throws Exception { 57 super.tearDown(); 58 remoteConnection.close(); 59 container.shutDown(); 60 } 61 62 63 } 64 | Popular Tags |