-
Bug
-
Resolution: Done
-
Major
-
None
-
None
In the EJB development guide, section 1.9.3. Project Dependencies for Remote EJB Clients
there is this pom.xml snippet:
<!-- Import the transaction spec API. We use runtime scope because we aren't using any direct reference to the spec API in our client code --> <dependency> <groupId>org.jboss.spec.javax.transaction</groupId> <artifactId>jboss-transaction-api_1.2_spec</artifactId> <scope>runtime</scope> </dependency> <!-- Import the EJB API. We use runtime scope because we aren't using any direct reference to EJB spec API in our client code --> <dependency> <groupId>org.jboss.spec.javax.ejb</groupId> <artifactId>jboss-ejb-api_3.2_spec</artifactId> <scope>runtime</scope> </dependency>
The runtime scope and the comment about it are wrong. In cases where the client code contains deferences to JTA/EJB apis, then you need this dependency in the compile scope.
Now if I assume that this is taken from the ejb-remote quickstart, then strictly speaking, these two dependencies are not needed at all, because the client-side code of it doesn't contain any references to these APIs. But in some other cases it might be needed, so I don't think that we have to remove these dependencies (depending on the approach, some users will need it).
So what I would like to change is...
I suggest to change the scope in the documentation to compile and change the comments to something like this is only needed if the client application contains direct references to EJB API (or JTA api, in the other case)
- blocks
-
JBEAP-1978 Review and update any topics that display quickstart code snippets for updates
- Closed
- is cloned by
-
JBEAP-3447 ejb-remote: Scope of some dependencies for EJB client applications is wrong
- Closed
- relates to
-
JBEAP-3355 Unnecessary dependencies for the ejb-remote quickstart's client side
- Closed