Package org.jboss.gravia.runtime

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


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

*/
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

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

    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

Related Classes of org.jboss.gravia.runtime.RuntimeType

Copyright © 2018 www.massapicom. 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.