@Override public int count(String connectionFactory, String queue, String username, String password) throws MBeanException { try { return jmsService.count(connectionFactory, queue, username, password); } catch (Throwable t) { throw new MBeanException(null, t.getMessage()); } }
@Override public Object execute() throws Exception { ShellTable table = new ShellTable(); table.column("Messages Count"); table.addRow().addContent(getJmsService().count(connectionFactory, queue, username, password)); table.print(System.out); return null; }
public Object doExecute() throws Exception { ShellTable table = new ShellTable(); table.column("Messages Count"); table.addRow().addContent(getJmsService().count(connectionFactory, queue, username, password)); table.print(System.out); return null; }