2 Replies Latest reply on Jun 28, 2004 5:49 PM by john_anderson_ii

    Which Bean fits this scenario?

    john_anderson_ii

      Hello all,

      I'm fairly new to EJBs that aren't CMP related, and I have particular scenario I could use a little help with. I would like to write a bean that would pull a list of numbers from a datasource, then hold that list of numbers in memory, and allow CMP Bean Facades read/write access to these numbers. Now, ideally I would like this bean to initialize at application deployment, or at first use, and stay initialized retaining these values for all clients (browsers) to use untill the application is undeployed.

      The list of numbers that are to be pulled has the potention to become quite large, and it would be a serious performance drain to have to load these numbers from the datasource everytime a new client was instantiated.

      Is this too much to ask? It sounds almost like a stateful session bean, except, if I'm not mistaken, each instance of the session bean holds a state for a single client, so if another client needed access to that instantce how could I hook them up? If this is not possible, are there any alternative suggestions?