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 517381
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T07:49:41+00:00 2026-05-13T07:49:41+00:00

I imagine this is simple – but I can’t find the right combination of

  • 0

I imagine this is simple – but I can’t find the right combination of search terms to get an answer. If I have a multi-module application, how do I get the beans in module A available to the beans in module B.

The project setup looks a little like this:

project.ear/module-a.jar/resources/beans.xml
project.ear/module-a.jar/java/foo/bar.class
project.ear/module-b.war/java/foo/barFactory.class

The beans.xml isn’t accessible by either classpath, or filesystem. Is there a way to do this? Or should I be doing everything differently?

  • 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-05-13T07:49:41+00:00Added an answer on May 13, 2026 at 7:49 am

    I think there is an easier solution than these 3 skaffman mentioned above.

    1. Put in a module-b.war/WEB-INF/web.xml these lines:

      <context-param>

      <param-name>contextConfigLocation</param-name>

      <param-value>

      classpath*:/resources/beans.xml

      </param-value>

      </context-param>

      This enables loading every /resources/beans.xml from any piece of classpath (i.e. any jar on classpath) which is enough for you.

    2. You should load a module-a.jar as a part of a module-b.war (module-a.jar resides in module-b.war/WEB-INF/lib location).

    I have very similar granularity in my project: business-logic.jar with its beans’ configuration and frontend.war which uses beans configured in previous one via ref=”someBean”. It works.

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

Sidebar

Related Questions

I imagine this must have a simple answer, but I am struggling: I want
I imagine this is pretty dead-simple, but somehow I haven’t been able to get
I imagine this is pretty simple, but can't figure it out. I'm trying to
I imagine this has a rather simple answer <% for user in @users %>
I'm only just learning javascript so I imagine this is relatively simple but it's
I think I'm overlooking something simple here, I can't imagine this is impossible to
Let's imagine this simple, I have a div (myDiv) inside a form which includes
Yes, the title is confusing, but I will keep this simple. Imagine a photo
I imagine this is not a very specific programming question. But have you tried
I imagine this question has been asked and answered, but I cannot find it.

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.