Win a copy of Succeeding with AI this week in the Artificial Intelligence and Machine Learning 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Liutauras Vilda
  • Junilu Lacar
Sheriffs:
  • Tim Cooke
  • Jeanne Boyarsky
  • Knute Snortum
Saloon Keepers:
  • Stephan van Hulst
  • Tim Moores
  • Tim Holloway
  • Carey Brown
  • Piet Souris
Bartenders:
  • salvin francis
  • fred rosenberger
  • Frits Walraven

ApplicationContext from ejb layer

 
Ranch Hand
Posts: 57
  • Mark post as helpful
  • send pies
  • 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
  • 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?
 
Note to self: don't get into a fist fight with a cactus. Command this tiny ad to do it:
Two software engineers solve most of the world's problems in one K&R sized book
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
    Bookmark Topic Watch Topic
  • New Topic