/**
  * Deploy a url
  *
  * @param url the deployment url
  * @throws Throwable for any error
  */
 protected KernelDeployment deploy(final URL url) throws Throwable {
   HornetQBootstrapServer.log.debug("Deploying " + url);
   KernelDeployment deployment = deployer.deploy(url);
   deployments.add(deployment);
   HornetQBootstrapServer.log.debug("Deployed " + url);
   return deployment;
 }
  /** Deploys a XML on the container */
  public KernelDeployment deploy(final String name, final String xml) throws Throwable {
    ByteArrayOutputStream byteOut = new ByteArrayOutputStream();
    PrintStream printOut = new PrintStream(byteOut);
    printOut.print(xml);
    printOut.flush();
    ByteArrayInputStream is = new ByteArrayInputStream(byteOut.toByteArray());

    KernelDeployment deployment = deployer.deploy(name, is);

    deployments.add(deployment);

    return deployment;
  }