/** * Check if this Container DEFAULTs to the Local protocol. * * <p>Hack to get around ARQ-391 * * @param container * @return true if DeployableContianer.getDefaultProtocol == Local */ public static boolean isLocalContainer(Container container) { if (container == null || container.getDeployableContainer() == null || container.getDeployableContainer().getDefaultProtocol() == null) { return false; } return "Local".equals(container.getDeployableContainer().getDefaultProtocol().getName()); }
private Container findContainer(ContainerRegistry registry, DeployableContainer<?> deployable) { for (Container container : registry.getContainers()) { if (container.getDeployableContainer() == deployable) { return container; } } return null; }