1

I have to maintain an app that create often resources and use them a very short time. So, most of the (precious user) time is spent in creating resources rather than actually using them.

I'd like to put those resources into a pool for grabbing them faster. I'm looking for a Java API that would permit me to do resource pooling (ie generic object pooling). I don't want to reinvent the wheel.

I have found Apache Commons Pool for doing so in a Java application quite easily (as I have read the sample code so far).

After googling, it seems hard to find any other except the well known C3PO, Proxool etc. Those latest do Connection pooling !

Do you know other APIs on the market that address the same need ?

Requirements :

  • Production ready
  • Well documented
  • Lastest release should not be more than two years old
  • Open/Close Source accepted
  • Free/Paid Licence accepted
  • Available in a Maven repository
Stephan
  • 41,764
  • 65
  • 238
  • 329
  • What are you looking for which is not present in Apache's library? – Johan Sjöberg Oct 22 '12 at 15:07
  • According to the websitem ACP 1.6 is ~4 months old ... not over 2 years old. – Stephen C Oct 22 '12 at 15:07
  • I did a Google search for "java pool library" and I think I saw 4 different generic pooling libraries in the first page of search results. Please don't expect us to do your research for you. – Stephen C Oct 22 '12 at 15:12
  • 1
    http://programming.huyduong.com/poolit/ – bmlynarczyk Oct 22 '12 at 15:17
  • 1
    Have used ACP a few times in the past and it has always worked great for me. Setting up a JMX service allows you to tweak some of the pool parameters on the fly to get an ideal configuration for your needs. – Eric B. Oct 22 '12 at 15:20
  • @StephenC They are all Connection or Thred pool... I've already made this same search though. – Stephan Oct 22 '12 at 15:20
  • I suspect you need a very light weight resource pool. As such you could make a custom pool which is tailored to your needs to make it as light weight as possible. If you don't do this, you risk making the pool more heavy weight than creating new objects on demand. – Peter Lawrey Oct 22 '12 at 15:25
  • Are you sure you really want a pool? It sounds to me like you are actually looking for a cache. In which case [ehcache](http://ehcache.org/) may be what you are looking for. Start with just the core. – OldCurmudgeon Oct 22 '12 at 15:27
  • @OldCurmudgeon My resources need to be released after a given timeout. – Stephan Oct 22 '12 at 15:30
  • @Stephan - ehcache can do that. – OldCurmudgeon Oct 22 '12 at 15:51
  • @OldCurmudgeon I need a pool because my code won't create and delete resources. – Stephan Oct 22 '12 at 23:23

1 Answers1

1

So far, I come up with those two libraries.

Stephan
  • 41,764
  • 65
  • 238
  • 329