Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deployment of EAR with Remote EJBs doesn't work #25054

Open
chicko12345 opened this issue Jul 17, 2024 · 1 comment
Open

Deployment of EAR with Remote EJBs doesn't work #25054

chicko12345 opened this issue Jul 17, 2024 · 1 comment

Comments

@chicko12345
Copy link

chicko12345 commented Jul 17, 2024

Deployment of EAR with Remote EJBs doesn't work

Hello Community,

first of all - thank you for your work. Since the glassfish AS development was moved to Eclipse, the progress is on another level. Kudos to you!

Environment Details

  • GlassFish Version 7.0.15:
  • JDK version 17:
  • OS Windows:
  • Database Oracle/Postgres:

Problem Description

We're trying to migrate our application from glassfish 5.1.0 to the current version (7.0.15)
Unfortunately the deployment of our EAR fails because several Remote EJBs cannot be found by the ejb-container.
We've tried to track the problem down and found the commit, which has changed the behaviour of the ejb-container in such way, that the deployment fails:
Commit HASH: 6fbf895
Commit Message: Fixes generated EJB remote interfaces loading
Class com.sun.ejb.codegen.ClassGenerator

Just one code line was replaced by this commit in the method:

private static boolean useMethodHandles(final ClassLoader loader, final Class<?> anchorClass,
final String targetPackageName)

old version:
return Objects.equals(targetPackageName, anchorClass.getPackageName());
new version:
return Objects.equals(anchorClass.getPackage(), loader.getDefinedPackage(targetPackageName));

To be sure, that was the only cause, we've reverted this commit, built the ejb-container locally and the application can be deployed without any further problems.

Our Remote EJB Interfaces and the corresponding implementations are parts of different jars within the EAR. The package names of the Remote EJB Interfaces and their implementation can also differ. The partition is done to provide Remote EJB Interface definitions to other remote service consumer applications in the minimal way.

Kind Regards

@chicko12345 chicko12345 changed the title Remote EJB injection EAR deployment with Remote EJBs doesn't work Jul 17, 2024
@chicko12345 chicko12345 changed the title EAR deployment with Remote EJBs doesn't work Deployment of EAR with Remote EJBs doesn't work Jul 17, 2024
@avpinchuk
Copy link
Contributor

Hi, @chicko12345.

Could you please provide the stack traces from the server.log? And, if possible, more information on how to reproduce the problem.

Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants