users@glassfish.java.net

Re: Bug? <max-pool-size> seems to count only idle EJB instances

From: <glassfish_at_javadesktop.org>
Date: Tue, 01 Dec 2009 05:04:27 PST

Thanks for your suggestion, now I understand.

I don't think it will solve my problem, because with this solution I will have several independent programs (or threads, whatever) executing different code in the *same* *physical* instance of the EJB at the same time. To avoid that, I would have to add "synchronized ( ) { ... }" statements on every public business method, something which is strictly forbidden in JEE as I understand it?

I will have to re-think and redesign my solution. Too bad I did not anticipate resource/pool handling to be this bad.

Come to think of it, if database resource pooling is handled in the same manner, all the effort I have put into sizing my databases and database pools are really void. I have absolutely no guarantees whatsoever that my application servers will not decide to create more database connections than the database can handle / are sized to.

This is potentially a very big problem.

I think it is a bug.
[Message sent by forum member 'jablo' ]

http://forums.java.net/jive/thread.jspa?messageID=374048