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 13:42:59 PST

Hi

I cannot reproduce your results. That is, I converted my implementation to using your singleton-like pattern, and I get extremely garbled results. My results are:

I start two threads accessing an EJB that accesses the singlton-like EJB through the local interface and using your getInstance pattern.

Immediately glassfish creates 2 instances of my singleton-EJB, and immediately destroyd one of them.

After that it is clear that only one instance is used (so far so good), but it is used simultaneously by both threads, resulting in confusion because each thread sends commands to the application, they appear at the command line application randomly and it is also random what output is received back and to which thread. hah. very amusing log files, but not very usable :-)

Thanks
[Message sent by forum member 'jablo' ]

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