/** * Initialize this remote MBean scheduler, getting the JBoss * RMIAdaptor for communication. */ @Override public void initialize() throws SchedulerException { InitialContext ctx = null; try { ctx = new InitialContext(getContextProperties()); server = (MBeanServerConnection)ctx.lookup(RMI_ADAPTOR_JNDI_NAME); } catch (Exception e) { throw new SchedulerException("Failed to lookup JBoss JMX RMI Adaptor.", e); } finally { if (ctx != null) { try { ctx.close(); } catch (NamingException ignore) { } } } }
@Override protected Object invoke(String operationName, Object[] params, String[] signature) throws SchedulerException { try { return server.invoke(getSchedulerObjectName(), operationName, params, signature); } catch (Exception e) { throw new SchedulerException( "Failed to invoke Scheduler MBean operation: " + operationName, e); } } }
@Override protected Object invoke(String operationName, Object[] params, String[] signature) throws SchedulerException { try { return server.invoke(getSchedulerObjectName(), operationName, params, signature); } catch (Exception e) { throw new SchedulerException( "Failed to invoke Scheduler MBean operation: " + operationName, e); } } }
/** * Initialize this remote MBean scheduler, getting the JBoss * RMIAdaptor for communication. */ @Override public void initialize() throws SchedulerException { InitialContext ctx = null; try { ctx = new InitialContext(getContextProperties()); server = (MBeanServerConnection)ctx.lookup(RMI_ADAPTOR_JNDI_NAME); } catch (Exception e) { throw new SchedulerException("Failed to lookup JBoss JMX RMI Adaptor.", e); } finally { if (ctx != null) { try { ctx.close(); } catch (NamingException ignore) { } } } }
@Override protected Object getAttribute(String attribute) throws SchedulerException { try { return server.getAttribute(getSchedulerObjectName(), attribute); } catch (Exception e) { throw new SchedulerException("Failed to get Scheduler MBean attribute: " + attribute, e); } }
/** * Initialize this remote MBean scheduler, getting the JBoss * RMIAdaptor for communication. */ @Override public void initialize() throws SchedulerException { InitialContext ctx = null; try { ctx = new InitialContext(getContextProperties()); server = (MBeanServerConnection)ctx.lookup(RMI_ADAPTOR_JNDI_NAME); } catch (Exception e) { throw new SchedulerException("Failed to lookup JBoss JMX RMI Adaptor.", e); } finally { if (ctx != null) { try { ctx.close(); } catch (NamingException ignore) { } } } }
@Override protected Object getAttribute(String attribute) throws SchedulerException { try { return server.getAttribute(getSchedulerObjectName(), attribute); } catch (Exception e) { throw new SchedulerException("Failed to get Scheduler MBean attribute: " + attribute, e); } }
@Override protected AttributeList getAttributes(String[] attributes) throws SchedulerException { try { return server.getAttributes(getSchedulerObjectName(), attributes); } catch (Exception e) { throw new SchedulerException("Failed to get Scheduler MBean attributes: " + Arrays.asList(attributes), e); } }
@Override protected AttributeList getAttributes(String[] attributes) throws SchedulerException { try { return server.getAttributes(getSchedulerObjectName(), attributes); } catch (Exception e) { throw new SchedulerException("Failed to get Scheduler MBean attributes: " + Arrays.asList(attributes), e); } }
@Override protected Object invoke(String operationName, Object[] params, String[] signature) throws SchedulerException { try { return server.invoke(getSchedulerObjectName(), operationName, params, signature); } catch (Exception e) { throw new SchedulerException( "Failed to invoke Scheduler MBean operation: " + operationName, e); } } }
@Override protected Object getAttribute(String attribute) throws SchedulerException { try { return server.getAttribute(getSchedulerObjectName(), attribute); } catch (Exception e) { throw new SchedulerException("Failed to get Scheduler MBean attribute: " + attribute, e); } }
@Override protected AttributeList getAttributes(String[] attributes) throws SchedulerException { try { return server.getAttributes(getSchedulerObjectName(), attributes); } catch (Exception e) { throw new SchedulerException("Failed to get Scheduler MBean attributes: " + Arrays.asList(attributes), e); } }