private MBeanServer getMBeanServer() { return this.context.getContext().getMBeanServer(); } }
/** * Creates the work directories. * @throws JBIException */ protected void createWorkDirectories() throws JBIException { final File modules = new File( this.installContext.getInstallRoot(), MODULES_PATH ); final File services = new File( this.installContext.getInstallRoot(), SERVICES_PATH ); if(( ! modules.exists() && ! modules.mkdirs()) || ( ! services.exists() && ! services.mkdirs())) throw new JBIException( "Could not create work directories." ); } }
public void onInstall() throws JBIException { if (installContext == null) { throw new NotInitialisedYetException(); } DocumentFragment fragment = installContext.getInstallationDescriptorExtension(); if (fragment != null) { LOGGER.debug("Installation Descriptor Extension Found"); } else { LOGGER.debug("Installation Descriptor Extension Not Found !"); } // lets load this from Spring... Map map = applicationContext.getBeansOfType(ActivationSpec.class, false, false); for (Iterator iter = map.values().iterator(); iter.hasNext();) { ActivationSpec spec = (ActivationSpec) iter.next(); LOGGER.debug("Registering {}", spec.getComponentName()); } }
protected void doInit() throws Exception { configuration = new HttpConfiguration(); configuration.setRootDir(this.context.getInstallRoot()); configuration.setComponentName(this.context.getComponentName()); configuration.load(); ObjectName name = this.context.getContext().getMBeanNames().createCustomComponentMBeanName("bootstrap"); this.mbeanName = MBeanServerHelper.register(getMBeanServer(), name, configuration); }
final File installRootFile = new File(getInstallContext().getInstallRoot()); final String workspaceRootDir = installContext.getContext().getWorkspaceRoot(); final File destFile = new File(workspaceRootDir, axis2File.getName()); if (!destFile.exists()) { final String workspaceRootDir = getInstallContext().getContext().getWorkspaceRoot(); final File modules = new File(workspaceRootDir, MODULES_PATH); final File[] moduleFiles = installRootFile.listFiles(new FileFilter() {
protected void doInit() throws Exception { configuration = new JmsConfiguration(); configuration.setRootDir(this.context.getInstallRoot()); configuration.setComponentName(this.context.getComponentName()); configuration.load(); Object mbean = getExtensionMBean(); if (mbean != null) { this.mbeanName = MBeanServerHelper.register(getMBeanServer(), createExtensionMBeanName(), mbean); } }
this.componentDescription, this.componentContext, true); List<String> classpath = installContext.getClassPathElements();
private MBeanServer getMBeanServer() { return this.context.getContext().getMBeanServer(); } }
final File installRootFile = new File( this.installContext.getInstallRoot()); final File destFile = new File( this.installContext.getInstallRoot(), file.getName()); if( ! destFile.exists()) { try {
protected void doCleanUp() throws Exception { if (this.mbeanName != null) { MBeanServer server = this.context.getContext().getMBeanServer(); if (server == null) { throw new JBIException("null mBeanServer"); } if (server.isRegistered(this.mbeanName)) { server.unregisterMBean(this.mbeanName); } } }
protected void doCleanUp() throws Exception { if (this.mbeanName != null) { MBeanServer server = this.context.getContext().getMBeanServer(); if (server == null) { throw new JBIException("null mBeanServer"); } if (server.isRegistered(this.mbeanName)) { server.unregisterMBean(this.mbeanName); } } }
/** * Create the directories that will be used by axis */ protected void createWorkDirectories() { final String workspaceRootDir = installContext.getContext().getWorkspaceRoot(); final File modules = new File(workspaceRootDir, MODULES_PATH); final File services = new File(workspaceRootDir, SERVICES_PATH); if (!modules.exists()) { if (!modules.mkdirs()) { getLogger().warning( "Cannot create modules directory at '" + modules.getAbsolutePath() + "'"); } } if (!services.exists()) { if (!services.mkdirs()) { getLogger().warning( "Cannot create services directory at '" + services.getAbsolutePath() + "'"); } } }
protected ObjectName createExtensionMBeanName() throws Exception { return this.context.getContext().getMBeanNames().createCustomComponentMBeanName("bootstrap"); }
protected ObjectName createExtensionMBeanName() throws Exception { return this.context.getContext().getMBeanNames().createCustomComponentMBeanName("bootstrap"); }
final String workspaceRootDir = this.installContext.getContext().getWorkspaceRoot(); final File modules = new File(workspaceRootDir, MODULES_PATH); final File configFile = new File(workspaceRootDir, AXIS2_XML);
protected ObjectName createExtensionMBeanName() throws Exception { return this.context.getContext().getMBeanNames().createCustomComponentMBeanName("bootstrap"); }
protected void doInit() throws Exception { Object mbean = getExtensionMBean(); if (mbean != null) { this.mbeanName = createExtensionMBeanName(); MBeanServer server = this.context.getContext().getMBeanServer(); if (server == null) { throw new JBIException("null mBeanServer"); } if (server.isRegistered(this.mbeanName)) { server.unregisterMBean(this.mbeanName); } server.registerMBean(mbean, this.mbeanName); } }
protected void doInit() throws Exception { Object mbean = getExtensionMBean(); if (mbean != null) { this.mbeanName = createExtensionMBeanName(); MBeanServer server = this.context.getContext().getMBeanServer(); if (server == null) { throw new JBIException("null mBeanServer"); } if (server.isRegistered(this.mbeanName)) { server.unregisterMBean(this.mbeanName); } server.registerMBean(mbean, this.mbeanName); } }
@SuppressWarnings("unchecked") public void initialize() { this.mockComponentContext = new MockComponentContext(jbi.getComponent().getIdentification() .getName(), this.component, getInstallRoot().getAbsolutePath(), getWorkspaceRoot() .getAbsolutePath(), componentConfiguration.getLogger()); InstallationContext mockInstallationContext = new MockInstallationContext(getInstallRoot(), jbi, mockComponentContext, true); // jbi bootstrap try { Class<? extends JBIBootstrap> jbiBootstrapClass = (Class<? extends JBIBootstrap>) Class .forName(jbi.getComponent().getBootstrapClassName()); JBIBootstrap jbiBootstrap = jbiBootstrapClass.newInstance(); jbiBootstrap.init(mockInstallationContext); } catch (Exception e) { throw new UncheckedException(e); } // jbi initialize try { this.component.init(mockInstallationContext.getContext()); } catch (JBIException jbie) { throw new UncheckedException(jbie); } }