I have the following set of Java EE 6 applications deployed under JBoss 6:
- a common JAR with an EJB remote interface
- 1st WAR-Application with the implementation of that EJB remote interface
- 2nd WAR-Application with a POJO using the EJB remote interface (@EJB MyRemoteInterface remoteBean;)
- both WARs have a Maven dependeny with scope provided to the common JAR (not included as JAR within the WAR's lib)
Now, all applications builds fine and the WARs are able to use other common classes from the JAR. But during deployment, I get the error, that the remote interface can't be injected.
So, what is the correct way to deal with the need of sharing the interface class file between the 2 WARs? Do I have to include it as a JAR in WEB-INF/lib in order to make injection work or should it be sufficient to have it deployed?