Package org.jboss.arquillian.container.spi.client.protocol.metadata

Examples of org.jboss.arquillian.container.spi.client.protocol.metadata.ProtocolMetaData


      {
         throw new IllegalArgumentException(
                  "Invalid Archive type. Ensure that your @Deployment method returns type 'ForgeArchive'.");
      }

      return new ProtocolMetaData().addContext(furnaceHolder);
   }
View Full Code Here


      catch (Exception e)
      {
         throw new DeploymentException("Failed to deploy " + addonToDeploy, e);
      }

      return new ProtocolMetaData().addContext(runnable.getForge());
   }
View Full Code Here

        }

        LOG.info("Done deploying plugin '" + pluginName + "' (" + archive + ") to PluginContainer "
                + container.get().getName() +".");
       
        return new ProtocolMetaData();
    }
View Full Code Here

            AppContext appContext = container.deploy(name, file);

            HTTPContext httpContext = new HTTPContext("0.0.0.0", configuration.getHttpPort());
            httpContext.add(new Servlet("ArquillianServletRunner", "/" + getArchiveNameWithoutExtension(archive)));
            beanManagerInstance.set(appContext.getBeanManager());
            return new ProtocolMetaData().addContext(httpContext);
        } catch (Exception e) {
            e.printStackTrace();
            throw new DeploymentException("Unable to deploy", e);
        }
    }
View Full Code Here

            } else {
              httpContext.add(new Servlet("ArquillianServletRunner", "/arquillian-protocol"));
            }
           
            // we should probably get all servlets and add them to the context
            return new ProtocolMetaData().addContext(httpContext);
        } catch (Exception e) {
            e.printStackTrace();
            throw new DeploymentException("Unable to deploy", e);
        }
    }
View Full Code Here

            } else {
                httpContext.add(new Servlet("ArquillianServletRunner", "/arquillian-protocol")); // needs another jar to add the fake webapp
            }
            addServlets(httpContext, appInfo);

            return new ProtocolMetaData().addContext(httpContext);
        } catch (final Exception e) {
            e.printStackTrace();
            throw new DeploymentException("Unable to deploy", e);
        }
    }
View Full Code Here

            startCdiContexts(name); // ensure tests can use request/session scopes even if we don't have a request

            classLoader.set(SystemInstance.get().getComponent(ContainerSystem.class).getAppContext(info.appId).getClassLoader());

            return new ProtocolMetaData().addContext(httpContext);
        } catch (final Exception e) {
            e.printStackTrace();
            throw new DeploymentException("Unable to deploy", e);
        }
    }
View Full Code Here

    @Inject
    private Instance<ProtocolMetaData> protocolMetadata;

    public void beforeSuite(@Observes final BeforeEnrichment event) {
        final ProtocolMetaData metaData = protocolMetadata.get();
        if(metaData == null || !metaData.hasContext(HTTPContext.class)) {
            return;
        }

        try {
            Thread.currentThread().getContextClassLoader().loadClass(REMOTE_INITIAL_CONTEXT_FACTORY);

            final HTTPContext httpContext = metaData.getContexts(HTTPContext.class).iterator().next();
            final Properties props = new Properties();
            props.setProperty(Context.INITIAL_CONTEXT_FACTORY, REMOTE_INITIAL_CONTEXT_FACTORY);
            props.setProperty(Context.PROVIDER_URL, "http://" + httpContext.getHost() + ":" + httpContext.getPort() + "/tomee/ejb");

            Context existing = null;
View Full Code Here

      doStart();
      WebAppContext wctx = devMode.getWebAppContext();
      HTTPContext httpContext = new HTTPContext(config.getBindAddress(), config.getPort());
          for(ServletHolder servlet : wctx.getServletHandler().getServlets())
              httpContext.add(new Servlet(servlet.getName(), wctx.getContextPath()));
      return new ProtocolMetaData().addContext(httpContext);
    } catch (Exception e) {
      throw new DeploymentException("Could not deploy " + archive.getName(), e);
    }
  }
View Full Code Here

        String address = AddressProvider.provideAddress(event);
        if (address != null) {
            return address;
        }

        ProtocolMetaData pmd = protocolMetaDataInstance.get();

        if (pmd == null) {
            // PMD is only available per-method level testing
            return null;
        }

        address = AddressProvider.extractAddress(event, pmd);
        if (address != null) {
            return address;
        }

        HTTPContext httpContext = pmd.getContext(HTTPContext.class);
        if (httpContext != null) {
            return httpContext.getHost();
        }

        RMIContext rmiContext = pmd.getContext(RMIContext.class);
        if (rmiContext != null) {
            return rmiContext.getIp();
        }

        JMXContext jmxContext = pmd.getContext(JMXContext.class);
        if (jmxContext != null) {
            try {
                Field hostField = JMXContext.class.getDeclaredField("host");
                hostField.setAccessible(true);
                return (String) hostField.get(jmxContext);
View Full Code Here

TOP

Related Classes of org.jboss.arquillian.container.spi.client.protocol.metadata.ProtocolMetaData

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.