public String deploy(String name, String path, String... args) { Resource resource = new FileSystemResource( ArchiveUtils.getArchiveRoot(ArchiveUtils.getArchive(path))); AppDefinition definition = new AppDefinition(resource.getFilename(), Collections.singletonMap(LiveBeansView.MBEAN_DOMAIN_PROPERTY_NAME, "functions." + name)); AppDeploymentRequest request = new AppDeploymentRequest(definition, resource, Collections.singletonMap(AppDeployer.GROUP_PROPERTY_KEY, "functions"), Arrays.asList(args)); String id = this.deployer.deploy(request); this.deployed.put(id, path); this.names.put(name, id); this.ids.put(id, name); register(name); return id; }
@Override public void setApplicationContext(ApplicationContext context) throws BeansException { if (context.getEnvironment() .getProperty(LiveBeansView.MBEAN_DOMAIN_PROPERTY_NAME) == null) { this.liveBeansView.setApplicationContext(context); } }
protected LiveBeansView buildLiveBeansView() { return new ServletContextLiveBeansView(getServletContext()); }
@Override public void setApplicationContext(ApplicationContext context) throws BeansException { if (context.getEnvironment().getProperty(LiveBeansView.MBEAN_DOMAIN_PROPERTY_NAME) == null) { this.liveBeansView.setLeafContext(context); } }