EJB design: JSP<------> XML<------------> EJB<---------->Database

  1. I need some standard way for communicating jsp and ejb
    with xml.

    The scenario is where 80 jsp's communicating to 25 ejb's.
          Request xml

    All 80 jsp's will communicate with ejb thro' xml and
    within ejb communnication i will use java varables.

    Do u have pattenrs,tecniques etc to achive this.
  2. I think a better approach (rather than have the JSPs interact directly with the EJBs) is to use a Front Controller servlet (http://www.martinfowler.com/isa/frontController.html).

    This servlet (through the use of associated command objects - BTW struts is a good framework for doing this) would interact with one more session ejb facades to return the xml which would be stored in java beans (which in turn would be stored in the request context).

    The servlet would then forward control to the JSP which would read the data from the beans......However, if you are returning your data in XML format then I'd suggest dispensing with JSPs altogether and using XSL stylsheets.

    With regards to the interaction between the EJBs and the database you have a choice of using entity beans (preferably CMP) or data access objects.

  3. ..one other thing - a comprehensive collection of patterns for building such systems can be found at http://www.martinfowler.com/isa and also on the sun web site at http://developer.java.sun.com/developer/restricted/patterns/J2EEPatternsAtAGlance.html.

  4. I think the XMLConvertor is most likely to front controlor,
    or maybe i can reference to the SOAP document, it would give u some ideas.
  5. Sorry, u can.