Results 1 to 4 of 4

Thread: Where to place Application Context

  1. #1
    Join Date
    Jul 2005
    Location
    Hannover, Germany
    Posts
    3

    Default Where to place Application Context

    Hi,

    I'm developing an J2EE Application which will use by web clients standalone clients which will be located on different virtual maschines. The remoting will (for various reasons) be done by EJBs, using some of the spring tools as far as apropriate.

    On the service tier, I'm planning to use POJOs via Spring, for all business logic which cannot be accessed via remote calls. On the client tier I'm still asking, if I need Spring at all. Now I'm wondering where I should set up the application context on the BusinessTier. In case of a single virtual maschen I can setup an XMLWebApplicationContext, which I can initialize via servlet. But how can I create an ApplicationContext on the BusinessTier and where should I store it?

    Thanks
    Joerg

  2. #2
    Join Date
    Aug 2004
    Posts
    2,715

    Default

    You may place your application context file anywhere in your ejb-jar file. I usually place it in the root. When using the provided helper classes (as described here you can then specify the path to it in your ejb-jar.xml file (relative to ejb-jar root).

    As for the client. In my opinion the convenience access to EJBs provided by Spring is really worthwile.

    Regards,
    Andreas

  3. #3

    Default How do I load the applicationContexts?

    Could you write down a piece of code which could actually load the application contexts in the EJB-jar.
    I dont have war in my ear. How can I load them with out web.xml?

  4. #4
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    667

    Lightbulb See the doco

    There are some code snippets in the reference docs:

    http://static.springframework.org/sp...rence/ejb.html

    If you don't want to load an ApplicationContext for every single EJB (and you probably don't), you should read up on ContextSingletonBeanFactoryLocator like it says.

    HTH,

    Andrew
    Andrew Swan
    "Now is the EJB of our discontent made glorious Spring"

Similar Threads

  1. Loosing my SecureContext
    By sklakken in forum Security
    Replies: 3
    Last Post: Jul 21st, 2005, 01:44 PM
  2. Stack Overflow
    By rayho222 in forum Container
    Replies: 6
    Last Post: May 17th, 2005, 03:42 AM
  3. Replies: 6
    Last Post: May 8th, 2005, 11:09 AM
  4. Questioning the core component
    By Martin Kersten in forum Swing
    Replies: 6
    Last Post: Feb 21st, 2005, 03:45 AM
  5. Hierarchical application context in J2EE app
    By cmgharris in forum Container
    Replies: 2
    Last Post: Sep 13th, 2004, 04:13 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •