• 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 ...
  • Campbell Ritchie
  • Ron McLeod
  • Tim Cooke
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Paul Clapham
  • Rob Spoor
  • Junilu Lacar
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Piet Souris
  • Carey Brown

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.


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?
Consider Paul's rocket mass heater.
    Bookmark Topic Watch Topic
  • New Topic