Announcement Announcement Module
No announcement yet.
Loding applicationContext Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • Loding applicationContext

    Can someone tell me how applicationContext works and how I can load applicationContext-*.xml files from applicationContext.xml?

    They are in EJB-jar\spring directory.

    Somebody help me out.

    Thank you

  • #2
    Solution in a different approach

    Problem > write ant targets to create a ear with web stuff and ear without web stuff and to load the applicationContexts respectively. My EJB part had 2 to 3 services to be started/run on the EJB server, so separate app contexts for it, web tier app context was to fire the web services.
    Idea is to deploy war in Tomcat and then make it talk to JBoss for the EJB stuff.
    Solution > create a dummy war file in the ear which will have DD to load app contexts.
    And about creating ant targets, create required number of DDs with appropriate contexts in it. . Say, web.xml(for Tomcat war) and web-ejb.xml(for war of ear). You can specify which file is your DD for a particular target.
    Ex: <war warfile="${}" webxml="${webapp.dir}/WEB-INF/web-ejb.xml">

    Hope this article helps another beginner.

    Last edited by sridharrreddy; Jun 14th, 2007, 03:37 AM.


    • #3
      Try to bind the BeanFactory to JNDI and use the Spring EJB provided abstract classes.