I solved this by modifying the dependency for the ejb
project in pom.xml
to be provided
and then wrapping the war
and ejb
projects into an ear
project. pom.xml
of the web archive now looks like this:
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>soar-ejb</artifactId>
<version>1.0</version>
<scope>provided</scope>
</dependency>
Then in the ear
project's pom.xml
we have this:
<dependencies>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>soar-ejb</artifactId>
<version>1.0</version>
<type>ejb</type>
</dependency>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>soar-war</artifactId>
<version>1.0</version>
<type>war</type>
</dependency>
</dependencies>
@Resource
injection is now working on the env-entries
in the ejb
's ejb-jar.xml
when I deploy to the server from the ear
project !