@Override public void add(CriticalComponent component) { components.add(component); }
public static void addIgnore(String className, String propertyName) { logger.trace("Adding ignore on " + className + "/" + propertyName); ignores.add(new Pair<>(className, propertyName)); }
@Override public void add(CriticalComponent component) { components.add(component); }
@Override public void add(CriticalComponent component) { components.add(component); }
@Override public void add(CriticalComponent component) { components.add(component); }
@Override public void add(CriticalComponent component) { components.add(component); }
@Override public void add(CriticalComponent component) { components.add(component); }
@Override public void add(CriticalComponent component) { components.add(component); }
private CountDownLatch newLatch(int countDown) { if (state == JournalState.STOPPED) { throw new RuntimeException("Server is not started"); } CountDownLatch latch = new CountDownLatch(countDown); latches.add(latch); return latch; }
private CountDownLatch newLatch(int countDown) { if (state == JournalState.STOPPED) { throw new RuntimeException("Server is not started"); } CountDownLatch latch = new CountDownLatch(countDown); latches.add(latch); return latch; }
public static void addIgnore(String className, String propertyName) { logger.trace("Adding ignore on " + className + "/" + propertyName); ignores.add(new Pair<>(className, propertyName)); }
public static void addIgnore(String className, String propertyName) { logger.trace("Adding ignore on " + className + "/" + propertyName); ignores.add(new Pair<>(className, propertyName)); }
public static void addIgnore(String className, String propertyName) { logger.trace("Adding ignore on " + className + "/" + propertyName); ignores.add(new Pair<>(className, propertyName)); }
public static void addIgnore(String className, String propertyName) { logger.trace("Adding ignore on " + className + "/" + propertyName); ignores.add(new Pair<>(className, propertyName)); }
public static void addIgnore(String className, String propertyName) { logger.trace("Adding ignore on " + className + "/" + propertyName); ignores.add(new Pair<>(className, propertyName)); }
public static void addIgnore(String className, String propertyName) { logger.trace("Adding ignore on " + className + "/" + propertyName); ignores.add(new Pair<>(className, propertyName)); }
@Override public void sendNotification(Notification notification) throws Exception { pendingNotifications.add(notification); latch.countDown(); }
/** * * * * @param logname the prefix for log output * @param location The location where this command is being executed from * @param hook it will finish the process upon shutdown of the VM * @param args The arguments being passwed to the the CLI tool * @return * @throws Exception */ public static Process build(String logname, File location, boolean hook, String... args) throws Exception { boolean IS_WINDOWS = System.getProperty("os.name").toLowerCase().trim().startsWith("win"); String[] newArgs; if (IS_WINDOWS) { newArgs = rebuildArgs(args, "cmd", "/c", "artemis.cmd"); } else { newArgs = rebuildArgs(args, "./artemis"); } java.lang.ProcessBuilder builder = new java.lang.ProcessBuilder(newArgs); builder.directory(new File(location, "bin")); Process process = builder.start(); ProcessLogger outputLogger = new ProcessLogger(true, process.getInputStream(), logname, false); outputLogger.start(); // Adding a reader to System.err, so the VM won't hang on a System.err.println as identified on this forum thread: ProcessLogger errorLogger = new ProcessLogger(true, process.getErrorStream(), logname, true); errorLogger.start(); processes.add(process); cleanupProcess(); return process; }
/** * Allocates a connection * * @param mcf The managed connection factory * @param cxRequestInfo The connection request information * @return The connection * @throws ResourceException Thrown if there is a problem obtaining the connection */ @Override public Object allocateConnection(final ManagedConnectionFactory mcf, final ConnectionRequestInfo cxRequestInfo) throws ResourceException { if (ActiveMQRALogger.LOGGER.isTraceEnabled()) { ActiveMQRALogger.LOGGER.trace("allocateConnection(" + mcf + ", " + cxRequestInfo + ")"); } ManagedConnection mc = mcf.createManagedConnection(null, cxRequestInfo); Object c = mc.getConnection(null, cxRequestInfo); if (ActiveMQRALogger.LOGGER.isTraceEnabled()) { ActiveMQRALogger.LOGGER.trace("Allocated connection: " + c + ", with managed connection: " + mc); } connections.add(mc); return c; }
/** * Allocates a connection * * @param mcf The managed connection factory * @param cxRequestInfo The connection request information * @return The connection * @throws ResourceException Thrown if there is a problem obtaining the connection */ @Override public Object allocateConnection(final ManagedConnectionFactory mcf, final ConnectionRequestInfo cxRequestInfo) throws ResourceException { if (ActiveMQRALogger.LOGGER.isTraceEnabled()) { ActiveMQRALogger.LOGGER.trace("allocateConnection(" + mcf + ", " + cxRequestInfo + ")"); } ManagedConnection mc = mcf.createManagedConnection(null, cxRequestInfo); Object c = mc.getConnection(null, cxRequestInfo); if (ActiveMQRALogger.LOGGER.isTraceEnabled()) { ActiveMQRALogger.LOGGER.trace("Allocated connection: " + c + ", with managed connection: " + mc); } connections.add(mc); return c; }