Java Reference
In-Depth Information
<version>2.10</version>
<configuration>
<systemProperties>
<property>
<name>moduleName</name>
<value>chapter15-ejb-${chapter15-ejb.version}</value>
</property>
</systemProperties>
</configuration>
</plugin>
</plugins>
</build>
The last pom.xml change you want to look at is the dependency on glassfish-
embedded-all , which is the GlassFish implementation of the embedded EJBCon-
tainer . This is a normal Maven dependency:
<dependency>
<groupId>org.glassfish.extras</groupId>
<artifactId>glassfish-embedded-all</artifactId>
<version>3.1</version>
<scope>test</scope>
</dependency>
After adding the GlassFish dependency to your project, you need to provide Glass-Fish the
configuration it needs to integration test your project's EJBs.
GlassFish
Because you're configuring Maven to use the GlassFish implementation of the embedded
EJBContainer , you'll need to add some GlassFish configuration to the project. This
configuration will be in the chapter15-ejb-embedded-test Maven submodule in
the /src/test/domain/config directory. The files in this directory come from the domain1/
config directory of a basic GlassFish installation. They're then slightly modified for the in-
tegration test. All the changes are in domain.xml.
The domain.xml file has had a few changes. First, all of the port configurations have been
prepended with the value 2 in hopes of preventing port collisions when the integration test
runs. For example, the default HTTP listener runs on port 8080, but for the integration
test it has been changed to port 28080. All ports have been changed similarly. Second,
the jdbc-connection-pool configurations have all been updated to use
org.apache.derby.jdbc.EmbeddedDataSource as the data source. Using this
Search WWH ::




Custom Search