JBoss Community Archive (Read Only)

Arquillian Old

Weld EE 1.1 - Embedded

A DeployableContainer implementation that can run and connect to a embedded(same JVM) Weld(CDI reference implementation) EE version. Mock EE APIs are available. This implementation has lifecycle support, so the container will be started and stopped as part of the test run.

Container Injection Support Matrix

@EJB

@EJB (no-interface)

@Inject (CDI)

@Inject (MC)

@PersistenceContext @PersistenceUnit

images/author/download/attachments/23822416/fact_good.png

images/author/download/attachments/23822416/fact_good.png

images/author/download/attachments/23822416/fact_good.png

 

 

Local EJBs only, which get treated as managed beans. Transactions, security and EJB context injection are not applied.

Configuration

Default Protocol: Local

Container Configuration Options

Name

Type

Default

Description

enableConversationScope

boolean

false

Activate ConversationScope between @Test methods. Use this to simulate Weld Servlet HTTP Conversation scope support.

Example of Maven profile setup

<profile>
	<id>weld-ee-embedded-1.1</id>
	<dependencies>
		<dependency>
			<groupId>org.jboss.arquillian.container</groupId>
			<artifactId>arquillian-weld-ee-embedded-1.1</artifactId>
			<version>1.0.0-SNAPSHOT</version>
		</dependency>
		<dependency>
			<groupId>org.jboss.weld</groupId>
			<artifactId>weld-core</artifactId>
		</dependency>
		<dependency>
			<groupId>org.jboss.weld</groupId>
			<artifactId>weld-api</artifactId>
		</dependency>
		<dependency>
			<groupId>org.slf4j</groupId>
			<artifactId>slf4j-simple</artifactId>
		</dependency>
	</dependencies>
	<dependencyManagement>
		<dependencies>
			<dependency>
				<groupId>org.jboss.weld</groupId>
				<artifactId>weld-core-bom</artifactId>
				<version>1.1.0.Final</version>
				<type>pom</type>
				<scope>import</scope>
			</dependency>
		</dependencies>
	</dependencyManagement>
</profile>

To run Weld EE Embedded you also need the Java EE APIs. These APIs might be provided to you by other dependencies like org.jboss.jbossas:jboss-as-client, org.jboss.spec:jboss-javaee-6.0 or org.glassfish.extras:glassfish-embedded-all.

<dependency>
    <groupId>javax.el</groupId>
    <artifactId>el-api</artifactId>
    <version>2.2</version>
    <scope>test</scope>
 </dependency>
 <dependency>
    <groupId>org.glassfish.web</groupId>
    <artifactId>el-impl</artifactId>
    <version>2.1.2-b04</version>
    <scope>test</scope>
 </dependency>
 <dependency>
    <groupId>org.jboss.spec.javax.servlet</groupId>
    <artifactId>jboss-servlet-api_3.0_spec</artifactId>
    <version>1.0.0.Beta2</version>
    <scope>test</scope>
 </dependency>
 <dependency>
    <groupId>javax.validation</groupId>
    <artifactId>validation-api</artifactId>
    <version>1.0.0.GA</version>
    <scope>test</scope>
 </dependency>
 <dependency>
    <groupId>javax.transaction</groupId>
    <artifactId>jta</artifactId>
    <version>1.1</version>
    <scope>test</scope>
 </dependency>
 <dependency>
    <groupId>javax.persistence</groupId>
    <artifactId>persistence-api</artifactId>
    <version>1.0</version>
    <scope>test</scope>
 </dependency>
 <dependency>
    <groupId>org.jboss.ejb3</groupId>
    <artifactId>jboss-ejb3-api</artifactId>
    <version>3.1.0</version>
    <scope>test</scope>
 </dependency>
JBoss.org Content Archive (Read Only), exported from JBoss Community Documentation Editor at 2020-03-10 12:19:59 UTC, last content change 2011-04-16 16:34:27 UTC.