Announcement Announcement Module
No announcement yet.
Design/Architec Question about replacing EJB with Struts Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • Design/Architec Question about replacing EJB with Struts


    I would like to know opinion of poeple that have done this work before. I need some design guide line before starting the job.

    I was given the opportunity to work on an Web Struts 1.0/EJB 1.0 application under Webphere 4.0.6. I have work for some months with Spring on previous project (JDBCTemplates, Hibernate, etc) and I think I might use Spring to help me making this application more testable, more deployable and better design.

    The pattern currently use in this web site is this:

    A Struts Action
    call an EJB "Delegate"
    call an EJB Manager Bean (doing the job)
    call some Entity Beans

    EJB is overkill for this kind of application.

    So first I decide to get ride of all EJB. I will try to use Hibernate instead of Entity Beans (at last resort Spring JDBCTemplate).

    I would like to replace Delegates and Manager Beans by Spring Pojo.

    I have a simple (Design) question : what is the best way to load the Spring beans inside the Struts Action? Is there a simple pattern to load the Spring context once and then use the Factory to load all Beans? I dont want to write a "SpringContextFactory" that would be a singleton to load the beans afterwhile. There is probably something already existing in Spring?



  • #2
    I repost this post with good title. Sorry. Please delete.