Examples of RuntimeType


Examples of org.glassfish.api.admin.RuntimeType

    }


    public String getRuntimeTypePrefix(StartupContext startupContext) {
        Properties args = startupContext.getArguments();
        RuntimeType serverType = RuntimeType.getDefault();
        String typeString = args.getProperty("-type");
        if (typeString != null)
            serverType = RuntimeType.valueOf(typeString);
        LOG.fine("server type is: " + serverType.name());
        if (serverType.isEmbedded()) return "embedded";
        if (serverType.isSingleInstance() || serverType.isDas()) return "admin";
        if (serverType.isInstance()) return "instance";
        return "";
    }
View Full Code Here

Examples of org.glassfish.api.admin.RuntimeType

    }


    public String getRuntimeTypePrefix(StartupContext startupContext) {
        Properties args = startupContext.getArguments();
        RuntimeType serverType = RuntimeType.getDefault();
        String typeString = args.getProperty("-type");
        if (typeString != null)
            serverType = RuntimeType.valueOf(typeString);
        LOG.fine("server type is: " + serverType.name());
        if (serverType.isEmbedded()) return "embedded";
        if (serverType.isSingleInstance() || serverType.isDas()) return "admin";
        if (serverType.isInstance()) return "instance";
        return "";
    }
View Full Code Here

Examples of org.jboss.gravia.runtime.RuntimeType

public class HttpServiceTest {

    @Deployment
    @StartLevelAware(autostart = true)
    public static Archive<?> deployment() {
        final RuntimeType targetContainer = ArchiveBuilder.getTargetContainer();
        final ArchiveBuilder archive = new ArchiveBuilder("http-service");
        archive.addClasses(AnnotatedContextListener.class, WebAppContextListener.class);
        archive.addClasses(HttpRequest.class);
        archive.setManifest(new Asset() {
            @Override
View Full Code Here

Examples of org.jboss.gravia.runtime.RuntimeType

public class HttpServiceTest {

    @Deployment
    @StartLevelAware(autostart = true)
    public static Archive<?> deployment() {
        final RuntimeType targetContainer = ArchiveBuilder.getTargetContainer();
        final ArchiveBuilder archive = new ArchiveBuilder("http-service");
        archive.addClasses(AnnotatedContextListener.class, WebAppContextListener.class);
        archive.addClasses(HttpRequest.class);
        archive.setManifest(new Asset() {
            @Override
View Full Code Here

Examples of org.jboss.gravia.runtime.RuntimeType

*/
public class ManagedContainerTest {

    @Test
    public void testContainerLifecycle() throws Exception {
        RuntimeType runtimeType = RuntimeType.getRuntimeType(System.getProperty("target.container"));
        ContainerConfigurationBuilder builder = ContainerConfigurationBuilder.create(runtimeType);
        ContainerConfiguration configuration = builder.setTargetDirectory("target/managed-container").getConfiguration();
        ManagedContainer<?> container = ManagedContainer.Factory.create(configuration);
        Assert.assertNotNull("ManagedContainer not null", container);
        try {
View Full Code Here

Examples of org.jboss.gravia.runtime.RuntimeType

public class HttpServiceTest {

    @Deployment
    @StartLevelAware(autostart = true)
    public static Archive<?> deployment() {
        final RuntimeType targetContainer = ArchiveBuilder.getTargetContainer();
        final ArchiveBuilder archive = new ArchiveBuilder("http-service");
        archive.addClasses(AnnotatedContextListener.class, WebAppContextListener.class);
        archive.addClasses(HttpRequest.class);
        archive.setManifest(new Asset() {
            @Override
View Full Code Here

Examples of org.jboss.gravia.runtime.RuntimeType

    public static class Factory<T extends ContainerConfiguration> {

        @SuppressWarnings({ "rawtypes", "unchecked" })
        public static <T extends ContainerConfiguration> ManagedContainer<T> create(T configuration) throws LifecycleException {
            RuntimeType type = configuration.getRuntimeType();
            ServiceLoader<ManagedContainer> loader = ServiceLoader.load(ManagedContainer.class);
            Iterator<ManagedContainer> iterator = loader.iterator();
            while(iterator.hasNext()) {
                ManagedContainer<T> service = iterator.next();
                if (service.getRuntimeType() == type) {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.