Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8235025
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T18:39:58+00:00 2026-06-07T18:39:58+00:00

I have an EAR file containing multiple ejb-jar and war. In an ejb-jar, I

  • 0

I have an EAR file containing multiple ejb-jar and war. In an ejb-jar, I inject multiple implementations of an interface like this :

@Inject
@Any
private Instance<ConfigurationProviderLocal> providerEjb;

An implementation of this interface is defined in a war. This implementation deploys fine.

In the glassfish v3.1 log I see:

Infos: Portable JNDI names for EJB FormConfigurationProviderBean :
[java:global/com.dialog.edialog_eservices_ear_1.0.1-SNAPSHOT/checkout-form-1.0-SNAPSHOT
/FormConfigurationProviderBean,
java:global/com.dialog.edialog_eservices_ear_1.0.1-SNAPSHOT/checkout-form-1.0-SNAPSHOT
/FormConfigurationProviderBean!com.dialog.sbsm.talisker.core.config.api.ConfigurationProviderLocal]

But in the iteration of my implementations:

for (ConfigurationProviderLocal provider : providerEjb) {
            [...]
        }

The implementation FormConfigurationProviderBean is never iterated. I have no message in log that could explain this.

Also, when I deploy the war in stand alone (not inside ear, with dependencies embedded inside it), the injection work correctly.

Is CDI supported when implementation is defined inside a war? Is there a classloader issue?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-07T18:39:59+00:00Added an answer on June 7, 2026 at 6:39 pm

    This should work, provided that the setup is correct (which probably is the case).

    I had a similar issue in the JBoss World (on AS 6) where different artifacts in an EAR could not see each other. I solved it by re-configuring the JBoss classloading-mechanism, but this was plain (and proprietary) JBoss stuff.

    What I would do as a first debug step: Query the BeanManager about what beans are really around. This might give you a hint. A small CDI-extension which dumps the initial bean processing could be helpful as well.

    If it still looks like a CL-issue you might find configuration options for that in the Glassfish documentations. Probably worthwhile to check with the GlassFish developers if that is a known problem / issue…

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have multiple (8) WAR files and 1 EAR file that I want to
I have an .ear file which contains multiple war files. I am moving the
Let's say I have two ear file and one .jar file with an EJB
I have an ear file, containing a war file. The war contains a number
I have deployed an ejb in a war file(not an ear file). I have
I have an EAR file with a nested EJB project, a .war dynamic web
We have multiple war files packaged in an ear file. Some of the wars
I have application packed as an .ear file with ejb module inside. There is
I have an .ear file (an archive file like tar / zip) that has
I have an ear file that consists of a war file together with a

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.