0 Replies Latest reply on Jun 9, 2007 8:31 PM by Fijai Cairo

    Single EJB w/ many actions or Multiple EJBs one for each act

    Fijai Cairo Newbie

      Hello,
      I'm new to the world of EJBs and 3 tier development in general. I would appreciate any advice on designing a solution for the following scenario.

      An application that lets users make requests for user account info, transaction history, order status, messages, etc.

      Most of the data resides in another system and is retrieved by sending an xml request over http. The xml response is then transformed and presented to the end user.

      I feel this can be accomplished in 2 different ways.
      The 1st approach that springs to mind is to create an EJB/POJO for each request type and have them share a single EJB that handles the http communications.

      The 2nd approach is to have a single EJB with an action for each request type and another EJB that handles the http communications.

      My preference for the 1st approach is really based on my perception that it is cleaner and it makes more sense in a multi developer environment.
      However, I can't help but have the feeling that in an EJB context, it may be more efficient to go with the 2nd approach. My thinking is that, maintaining a pool of a single EJB type would be more efficient than maintaining one with different types.