congrats Icon
New! Announcing our next generation AI code completions
Read here
Tabnine Logo
TestContainer.<init>
Code IndexAdd Tabnine to your IDE (free)

How to use
org.jboss.arquillian.container.weld.ee.embedded_1_1.mock.TestContainer
constructor

Best Java code snippets using org.jboss.arquillian.container.weld.ee.embedded_1_1.mock.TestContainer.<init> (Showing top 6 results out of 315)

origin: org.jboss.weld/weld-porting-package-tck10

public boolean deploy(Collection<Class<?>> classes, Collection<URL> beansXml) {
  this.testContainer = new TestContainer(beansXml, classes);
  try {
    testContainer.startContainer();
  } catch (Exception e) {
    this.deploymentException = new DeploymentException("Error deploying beans", e);
    return false;
  }
  testContainer.ensureRequestActive();
  return true;
}
origin: org.jboss.weld/weld-porting-package

public boolean deploy(Collection<Class<?>> classes, Collection<URL> beansXml) {
  this.testContainer = new TestContainer(beansXml, classes);
  try {
    testContainer.startContainer();
  } catch (Exception e) {
    this.deploymentException = new DeploymentException("Error deploying beans", e);
    return false;
  }
  testContainer.ensureRequestActive();
  return true;
}
origin: org.jboss.arquillian.container/arquillian-weld-ee-embedded-1.1

/**
 * Bootstrap and shutdown the container.
 * 
 * @param runnable a {@link Runnable} to be called whilst the container is
 *           active
 * 
 */
public void run(Runnable runnable) throws Exception
{
  TestContainer container = null;
  try
  {
   container = new TestContainer(beansXml, classes);
   container.startContainer().ensureRequestActive();
   runnable.run(container.getBeanManager(container.getDeployment().getBeanDeploymentArchives().iterator().next()));
  }
  finally
  {
   if (container != null)
   {
     container.stopContainer();
   }
  }
}
origin: org.jboss.weld.arquillian.container/arquillian-weld-ee-embedded-1.1

/**
 * Bootstrap and shutdown the container.
 * 
 * @param runnable a {@link Runnable} to be called whilst the container is
 *           active
 * 
 */
public void run(Runnable runnable) throws Exception
{
  TestContainer container = null;
  try
  {
   container = new TestContainer(beansXml, classes);
   container.startContainer().ensureRequestActive();
   runnable.run(container.getBeanManager(container.getDeployment().getBeanDeploymentArchives().iterator().next()));
  }
  finally
  {
   if (container != null)
   {
     container.stopContainer();
   }
  }
}
origin: org.jboss.arquillian.container/arquillian-weld-ee-embedded-1.1

public ProtocolMetaData deploy(Archive<?> archive) throws DeploymentException
{  
 ShrinkWrapClassLoader classLoader = getClassLoader(archive);
 ContextClassLoaderManager classLoaderManager = new ContextClassLoaderManager(classLoader);
 classLoaderManager.enable();
 
 TestContainer container = new TestContainer(findArchiveId(archive), findBeansXml(archive), findBeanClasses(archive, classLoader), true);
 Bootstrap bootstrap = container.getBootstrap();
 contextClassLoaderManagerProducer.set(classLoaderManager);
 try {
   container.startContainer();
 } finally {
   // always set container - even if an exception occurs, we want the container to be cleaned up properly in undeploy()
   testContainerProducer.set(container);
   bootstrapProducer.set(bootstrap);
 }
 // Assume a flat structure
 WeldManager manager = container.getBeanManager(container.getDeployment().getBeanDeploymentArchives().iterator().next());
 weldManagerProducer.set(manager);
 beanManagerProducer.set(manager);
 return new ProtocolMetaData();
}
origin: org.jboss.weld.arquillian.container/arquillian-weld-ee-embedded-1.1

classLoaderManager.enable();
TestContainer container = new TestContainer(findArchiveId(archive), findBeansXml(archive), findBeanClasses(archive, classLoader));
Bootstrap bootstrap = container.getBootstrap();
org.jboss.arquillian.container.weld.ee.embedded_1_1.mockTestContainer<init>

Javadoc

Create a container, specifying the classes and beans.xml to deploy

Popular methods of TestContainer

  • ensureRequestActive
  • startContainer
    Starts the container and begins the application
  • stopContainer
    Clean up the container, ending any active contexts
  • getBeanManager
  • getBootstrap
  • getDeployment
  • instance

Popular in Java

  • Reading from database using SQL prepared statement
  • onCreateOptionsMenu (Activity)
  • requestLocationUpdates (LocationManager)
  • scheduleAtFixedRate (ScheduledExecutorService)
  • Path (java.nio.file)
  • SQLException (java.sql)
    An exception that indicates a failed JDBC operation. It provides the following information about pro
  • Date (java.util)
    A specific moment in time, with millisecond precision. Values typically come from System#currentTime
  • DataSource (javax.sql)
    An interface for the creation of Connection objects which represent a connection to a database. This
  • JLabel (javax.swing)
  • IsNull (org.hamcrest.core)
    Is the value null?
  • Top 12 Jupyter Notebook Extensions
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyStudentsTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now