Where to place concurrent parameters in session beans?


EJB design: Where to place concurrent parameters in session beans?

  1. We need to hand over optional parameters (for the client state) from the Web GUI to the Business Services.
    Each method of our business services already has one or more objects passed on as parameters.

    What would be the best solution to do this:
    Should we add the client state parameters to the business methods?

    Or should we keep the client state parameters in the session context?

    What would be the advantages and disadvantages of each solution? Any other ideas on how to solve this?


    Threaded Messages (1)

  2. Reply[ Go to top ]


    In case, if you're planning to stick with Web GUI front-end in future and do not plan to have any other clients to your business logic (such as a Swing GUI or .NET or CORBA-talking GUI) - keeping state data in sessions will be a great work to go. If you've multiple types of clients, you can keep your state data in stateful session bean (think up of a unique session ID generation mechanism in that case: ie for Web application you can pass an original session ID, but for any other front-ends you should invent your own session ID algorythm capable of generating unique IDs). But remember, that only one client can access specific instance of session bean per time, so, the access to your session-tracking bean should be synchronized and that could lead to major business logic slowdown.