/** * Start the container with a deployment. * * <p>Effectively calls {@code start().deploy(deployment)}</p> * * @param deployment The deployment to deploy. * @return The container. * @throws Exception if an error occurs. * @see #start() * @see #deploy(Archive) */ public Swarm start(Archive<?> deployment) throws Exception { return start().deploy(deployment); }
/** * Start the container with a deployment. * * <p>Effectively calls {@code start().deploy(deployment)}</p> * * @param deployment The deployment to deploy. * @return The container. * @throws Exception if an error occurs. * @see #start() * @see #deploy(Archive) */ public Swarm start(Archive<?> deployment) throws Exception { return start().deploy(deployment); }
/** * Start the container with a deployment. * * <p>Effectively calls {@code start().deploy(deployment)}</p> * * @param deployment The deployment to deploy. * @return The container. * @throws Exception if an error occurs. * @see #start() * @see #deploy(Archive) */ public Swarm start(Archive<?> deployment) throws Exception { return start().deploy(deployment); }
public static void main(String... args) throws Exception { if (System.getProperty("boot.module.loader") == null) { System.setProperty("boot.module.loader", "org.wildfly.swarm.bootstrap.modules.BootModuleLoader"); } String clsName = System.getProperty(ANNOTATED_CLASS_NAME); Class<?> cls = Class.forName(clsName); Method[] methods = cls.getMethods(); for (Method method : methods) { if (!Modifier.isStatic(method.getModifiers())) { continue; } CreateSwarm anno = method.getAnnotation(CreateSwarm.class); if (anno == null) { continue; } boolean startEagerly = anno.startEagerly(); ((Swarm) method.invoke(null)).start().deploy(); } }
public static void main(String[] args) throws Exception { Swarm container = new Swarm(); System.out.println("\tBuilding kie server deployable..."); JAXRSArchive deployment = createDeployment(container); System.out.println("\tStaring Wildfly Swarm...."); container.start(); System.out.println("\tConfiguring kjars to be auto deployed to server " + Arrays.toString(args)); installKJars(args); System.out.println("\tDeploying kie server ...."); container.deploy(deployment); } }
swarm.start(); if (System.getProperty("thorntail.inhibit.default-deployment") == null) { swarm.deploy();
swarm.start(); if (System.getProperty("swarm.inhibit.default-deployment") == null) { swarm.deploy();
swarm.start(); if (System.getProperty("thorntail.inhibit.default-deployment") == null) { swarm.deploy();
public static void main(String... args) throws Exception { Swarm container = new Swarm(); container.fraction(ContainerUtils.loggingFraction()); JAXRSArchive deployment = ShrinkWrap.create(JAXRSArchive.class); deployment.addPackage(Main.class.getPackage()); deployment.as(RibbonArchive.class).advertise("pricing"); deployment.as(Secured.class); ContainerUtils.addExternalKeycloakJson(deployment); container.start(); container.deploy(deployment); } }
container.deploy(deployment);
container.deploy(deployment);
public static void main(String... args) throws Exception { Swarm container = new Swarm(); container.fraction(ContainerUtils.loggingFraction()); container.fraction(new JPAFraction() .defaultDatasource("LibraryDS")); JAXRSArchive deployment = ShrinkWrap.create(JAXRSArchive.class); deployment.addPackage(Main.class.getPackage()); deployment.as(RibbonArchive.class).advertise("library"); deployment.as(Secured.class) .protect("/items") .withMethod("GET") .withRole("*"); ContainerUtils.addExternalKeycloakJson(deployment); deployment.add(new ClassLoaderAsset("META-INF/persistence.xml", Main.class.getClassLoader()), "WEB-INF/classes/META-INF/persistence.xml"); deployment.add(new ClassLoaderAsset("project-stages.yml", Main.class.getClassLoader()), "WEB-INF/classes/project-stages.yml"); deployment.addAllDependencies(); container.start(); container.deploy(deployment); } }