Hi David,
Yes, although I was convinced I had added the ejb-jar.xml, his answer made me check it again. I noticed I had added it to the test sources of that module (so it is testable) but not to the main sources, so when I used the module as dependency it was missing the ejb-jar.xml in the jar.

Kind regards/ Met vriendelijke groet,

Pascal Alma
-------------------------------
Senior Consultant

M: +31 (0)6 29385944
@: [email protected]
W: http://www.palma-it.com

On 20 mrt 2009, at 23:55, David Blevins wrote:

Hi Pascal,

Did Per's response answer your question?

-David

On Mar 18, 2009, at 1:24 AM, Pascal Alma wrote:


Hi,

I am running into the following problem while creating a unit/ integration test with Maven:

I want to test a jndi lookup in my test class, which is looking up an EJB (Stateless session bean) that is defined in separate Maven project. This module is added as dependency in my pom file but the EJB's in it don't show up in the global jndi list of the embedded OpenEJB when my test run. If I deploy the module in GlassFish I see the EJB in the JNDI tree so I assume that that part is valid. How can I tell OpenEJB to install the EJB-JAR that is referred to in the dependency before my test take place??

Here is my pom.xml:

<?xml version="1.0"?>
<project>
  <modelVersion>4.0.0</modelVersion>

  <parent>
      <artifactId>my-mule-layer</artifactId>
      <groupId>net.pascalalma</groupId>
      <version>1.0-SNAPSHOT</version>
  </parent>

  <groupId>net.pascalalma</groupId>
  <artifactId>my-mule-core</artifactId>
  <name>${artifactId}</name>
  <version>1.0-SNAPSHOT</version>

  <dependencies>
      <dependency>
          <groupId>org.apache.openejb</groupId>
          <artifactId>openejb-core</artifactId>
          <version>3.1</version>
          <scope>test</scope>
          <exclusions>
              <exclusion>
                  <groupId>commons-lang</groupId>
                  <artifactId>commons-lang</artifactId>
              </exclusion>
          </exclusions>
      </dependency>

      <dependency>
          <groupId>net.pascalalma</groupId>
          <artifactId>my-business-services</artifactId>
          <version>1.0-SNAPSHOT</version>
          <type>ejb</type>
          <scope>provided</scope>
      </dependency>

  </dependencies>

</project>

Kind regards/,

Pascal Alma






Reply via email to