• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Migrating from JEE: external WARs in EAR

 
Sheriff
Posts: 22783
131
Eclipse IDE Spring VI Editor Chrome Java Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
At work we have a set of JEE projects that we need to migrate to Spring Boot. Unfortunately it can't be a "big bang" but we have to do them one at a time. I've already figured out quite a lot, but there is one thing I haven't found a solution for yet.

We have two EAR projects that include two shared WAR projects. Inside these WAR projects we have some JSPs that use expressions that use an application scoped bean that is defined in another WAR or EJB JAR inside the same EAR. The two EAR projects provide different values inside the bean. A basic layout:

- EAR
 - WAR / EJB JAR that provides a @ApplicationScoped bean.
 - first shared WAR that uses the above bean in JSPs.
 - second shared WAR that uses the above bean in JSPs.
 - other stuff.

In JEE this works just fine, but I have no idea how I should do this in Spring Boot. I have thought about just deploying the shared WARs in the embedded Tomcat container, but that would mean they would not have access to the application scoped bean.


Can anybody help me with a solution for this problem? Keep in mind that we need to support the old and new solution at the same time for at least a few weeks because we can't migrate the 4 projects in one go.
 
reply
    Bookmark Topic Watch Topic
  • New Topic