Skip to content
This repository has been archived by the owner on Jan 19, 2024. It is now read-only.

Commit

Permalink
Fixes to enable successful MuleContainer constructor invokation
Browse files Browse the repository at this point in the history
  • Loading branch information
nahuel-dallavecchia committed Dec 14, 2012
1 parent 88a108e commit 2e84cf5
Showing 1 changed file with 6 additions and 4 deletions.
Expand Up @@ -9,14 +9,14 @@

import org.codehaus.cargo.container.ContainerCapability;
import org.codehaus.cargo.container.configuration.LocalConfiguration;
import org.codehaus.cargo.container.deployable.Deployable;
import org.codehaus.cargo.container.spi.AbstractInstalledLocalContainer;
import org.codehaus.cargo.container.spi.jvm.JvmLauncher;
import org.mule.MuleServer;
import org.mule.module.launcher.MuleContainer;
import org.mule.module.reboot.DefaultMuleClassPathConfig;
import org.mule.module.reboot.MuleContainerBootstrap;
import org.mule.module.reboot.MuleContainerSystemClassLoader;
import org.mule.tools.cargo.deployer.FileDeployer;
import org.mule.tools.cargo.deployable.MuleApplicationDeployable;

/**
* Start an embedded {@link MuleServer} using maven dependencies.
Expand Down Expand Up @@ -104,8 +104,10 @@ protected void doStart(final JvmLauncher launcher) throws Exception {
Thread.currentThread().setContextClassLoader(muleClassLoader);
try {
final Class<?> muleClass = Thread.currentThread().getContextClassLoader().loadClass(Mule3xInstalledLocalContainer.MULE_CONTAINER_CLASSNAME);
final Constructor<?> c = muleClass.getConstructor(new Class[] {String[].class});
this.container = c.newInstance((Object[])(new String[0]));
final Constructor<?> c = muleClass.getConstructor(String[].class);
final Object[] objs = {new String()};
final Object[] passed = {objs};
this.container = c.newInstance(new Object[] {new String[0]});
final Method startMethod = muleClass.getMethod("start", boolean.class);
startMethod.invoke(this.container, false);

Expand Down

0 comments on commit 2e84cf5

Please sign in to comment.