Win a copy of Rust Web Development this week in the Other Languages forum!
  • 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:
  • Tim Cooke
  • Campbell Ritchie
  • Ron McLeod
  • Liutauras Vilda
  • Jeanne Boyarsky
Sheriffs:
  • Junilu Lacar
  • Rob Spoor
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Tim Moores
  • Jesse Silverman
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Piet Souris
  • Frits Walraven

ApplicationContext from ejb layer

 
Ranch Hand
Posts: 57
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Folks, I've been after this answer for a few days: I've seen many others asking the same question but the answers always lead back to web.xml. Let me explain:

We have an implementation of the business tier as follows:
- Ibatis 2.x with Spring 3.x to provide the DAO services
- Business objects use the DAO's to provide business services (such as addNewAdCampaign(), getAllAds() , etc..)
- Stateless EJB3 beans wrap the business objects and provide a facade to the calling systems
- Calling systems use JNDI to locate the EJB's and invoke the EJB's methods. The calling systems can be on another machine, on a different app server


The question is how to bootstrap Spring's applicationcontext.xml at the business layer without using servlet (configured in the web.xml) and without doing it programmatically and share an instance of the application context to all the EJB's and DAO's

Does this make sense what I am getting at? We are providing a business service layer, without servlets, but need to have Spring load so that Ibatis can use it. Currently we are forced to use a servlet to bootstrap the ApplicationContext (configured in web.xml), but we want to eliminate the servlet

The app server is Geronimo - is this a question for the app server people?

Any and all comments are appreciated - perhaps this is not the standard way of doing it.

Thank you very much.

Billy




 
Author
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Why do you want to eliminate the servlet?

What about a context listener? (Also web.xml.) Are there any other lifecycle events that can be configured inside a server.xml or equivalent?
 
You showed up just in time for the waffles! And this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
reply
    Bookmark Topic Watch Topic
  • New Topic