JBoss Community

Re: EJB3 Session Bean Pool

created by Robert Geisler in EJB3 - View the full discussion

hello carlo,

 

i finished implementing my "LooseMinPool" : )

you may find the source on sourcepod: http://www.sourcepod.com/rptzcu29-4656 .

 

core pool functionality:

  • uses an array to store released instances:
    if a instance is requested (get()), the last element of the array will be returned (and removed from the array).
    on release() the freed instance will be put back into the array again as the last element.
  • the pool is cleared frequently (configured by timeout parameter):
    on timeout all the pooled instances are checked for their last access and instances that were not used since last timeout, are removed.

 

i tested the pool during the last days and it seems to work (meaning i did not recognized any fundamental errors or performance issues yet ; )).

 

maybe you could take a look at the code and inform me in case i did something stupid? O: )

thank you for your attention!

 

regards

robert

Reply to this message by going to Community

Start a new discussion in EJB3 at Community