A single object instance shares thru out the application ?

Discussions

EJB design: A single object instance shares thru out the application ?

  1. I am keeping a abc java class in application scope in an jsp . So, abc class object will be one thru out the applicaion and handle the inputs coming from different clients. Now, we are going for weblogic server and using ejbs. I know little bit about the entity and session(stateless and stateful) beans.

    abc class is not handling any database transactions. It should hold all the clients input information and pass info
    from one client to another based on requests.

    Is it possible in ejbs having a single object instance and shares thru out the application.
  2. The only way to "really" do a singleton is an entity bean... but this is probably not a good choice as it can be _very_ slow (because if you change it often it is written/read to/from the database very often).
    Bottom line: needing a singleton in EJB is a bad idea. Not very helpful, I know.

    regards

    Messi