3 Replies Latest reply on Aug 6, 2004 2:32 AM by Elias Ross

    Data processing with Creation-Expensive Beans

    Alexander Deutinger Newbie


      I need a design hint for the following application scenario:

      I have to process data in near real time which arrives in short intevalls from various identical sources. Before the data can be processed by an object (Session or POJO) the object has to set-up its internal configuration data. The setup procedure for this configuration data is more epensive than the final data processing.

      What would be the best pattern to get this done?

      1) Simply using stateful beans seems to be no option because there are too many external data sources and the external data reciever must not wait for the data processing to finish.

      2) Ideal would be MDBs, but how can I make sure that they are properly reused and there are not too many new instances created, as this is quite expensive and memory consuming?

      Is there anyone with a bright idea or someone who has solved a similar situation?

      Best regards