Open starksm64 opened 1 week ago
ejb-link can only access the EJB in the same application[]. ejb-link can reference another JAR using #
, but that JAR must reside within the same application (within the EAR file).
) Eclipse GlassFish Application Development Guide
"""
As an alternative to using <lookup-name>
mentioned in the original issue, there is <mapped-name>
for resolving jndi names.
<ejb-ref-type>Session</ejb-ref-type>
<remote>ejb.VehicleIF</remote>
- <ejb-link>StatelessVehicleBean</ejb-link>
+ <mapped-name>ejb_vehicle_StatelessVehicleBean</mapped-name>
</ejb-ref>
With the above changes, the gf-appclient-jndi
passes correctly.
[INFO]
[INFO] Results:
[INFO]
[INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0
[INFO]
Environment Details
Problem Description
The https://github.com/jakartaredhat/gf-appclient-jndi.git has an appclient that accesses a remote ejb using jndi. The reference to the ejb is specfified via the application-client.xml ejb-ref/ejb-link. The test launches the appclient using the target/glassfish8/glassfish/bin/appclient script and the unpackaged test ear contents. This mimics what is done in the EE platform tck appclient tests.
This fails with a jndi look up error that indicates although the ejb is found, the jndi name that is associated with the java:comp/env/ejb/StatelessVehicleBean local binding is "#ejb.VehicleIF" rather than the full name of "ejb_vehicle_StatelessVehicleBean#ejb.VehicleIF" as indicated in the server.log.
There is a target/appclient-0.log produced by running the test. The following can be found in that log:
Steps to reproduce
Impact of Issue
This is a current block in the JPA platform tests that use an appclient vehicle