Package org.mule.jbi

Examples of org.mule.jbi.JbiContainer


        addMessageRouterRules(digester, path, "response");

        digester.addRule(path, new Rule(){
            public void end(String s, String s1) throws Exception {
                AbstractComponent c = (AbstractComponent)digester.peek();
                JbiContainer cont = ((JbiContainer)digester.getRoot());
                c.setContainer(cont);
                cont.getRegistry().addTransientComponent(c.getName(), ComponentType.JBI_ENGINE_COMPONENT, c, c.getBootstrap());
            }
        });
    }
View Full Code Here


            }
        }
  }
 
  public void install(File f) {
    JbiContainer container = JbiContainer.Factory.getInstance();
    File wrkDir = container.getWorkingDir();
    File proDir = Directories.getAutoInstallProcessedDir(wrkDir);
    File fp;
    try {
      IOUtils.createDirs(proDir);
      fp = getRenamedFile(f, proDir);
      if (!f.renameTo(fp)) {
        throw new IOException();
      }
    } catch (IOException e) {
      logger.info("Could not move file " + f + " for auto installation");
      return;
    }
    ObjectName service = null;
    ObjectName installer = null;
    MBeanServer server = container.getMBeanServer();
    try {
      service = container.createMBeanName(null, "service", "install");
      installer = (ObjectName) server.invoke(service, "loadNewInstaller", new Object[] { fp.toURL().toString() }, new String[] { String.class.getName() });
      server.invoke(installer, "install", null, null);
      new File(fp.getAbsolutePath() + ".success").createNewFile();
    } catch (Throwable t) {
      try {
View Full Code Here

TOP

Related Classes of org.mule.jbi.JbiContainer

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.