(I must've accidentally pressed some sequence of keys that mean "send
message".  Sorry about that. :)

The only way I've been able to avoid this concurrency problem has been to
set a transaction on the stateless session bean, or on the entity bean.  If
I put it on the SB, than only one client can get the data at a time.  (I've
tried changing "jboss.xml" to alter the locking behavior, but didn't have a
lot of luck with that.)  If I put it on the entity bean, well, seems like a
lot of overhead for a read-only method.  Besides that, in the past I've run
into deadlock issues when I haven't been very careful about transaction
use...

So, any suggestions?  If you have any ideas, I'd be happy to send you send
you my code.  (It's not generated with XDoclet, so I don't want to go
posting it all here.)  I'd be surprised if this really is a JBoss bug,
because I can't imagine something this critical slipping by everyone for so
long!  I really don't want to revert my app to use JBoss 2.2.2 again, so any
help is appreciated.

Thanks!
Mike

----- Original Message ----- 
From: "Michael Jara" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Sunday, August 03, 2003 7:38 PM
Subject: "Reentrant method call detected" on Concurrent Entity Access


> I've been wrestling with a problem for almost a week now, and I'm hoping
> someone may have some insight into this...
>
> In porting our application from JBoss 2.2.2 to JBoss 3.2.1, I've found
what
> seems to be a major concurrency bug in JBoss.  The app consists of a
session
> bean acting as a facade for a set of entity beans.  Running one client
> instance, the application works perfectly.  Running two or more clients at
> the same time, I get an EJBException for at least one of the clients
stating
> "Reentrant method call detected".  In an effort to troubleshoot this
> problem, created a small test application to replicate it...  Here are the
> details:
>
> Application Contents:
>
> - One simple CMP2.0 entity bean with local interfaces.
> - One stateless session bean.
> - EJB application client.
>
> App Functionality:
>
> 1. Client creates an instance of the stateless session bean.
> 2. Client calls a "getAll" method on the stateless session bean.
> 3. SSB performs a "findAll" on the entity bean.
> 4. SSB iterates through the finder's collection and extracts a value
object
> from each entity.
> 5. SSB returns an array of these value objects to the client.
>
> EJB / JBoss Config:
>
> - SSB has no transactions ("NotSupported").
> - Entity "Supports" transactions (though none are used.)
> - Read-ahead strategy "none" (set in "jbosscmp-jdbc.xml").
> - JBoss "default" configuration, no mucking with "standardjboss.xml" or
> "jboss.xml".  (This means pessimistic locking, I believe.)
>
> What happens:
>
> 1. I start by adding 500 instances of the entity.
> 2. Run two clients in separate threads at the same time... (Running them
in
> one VM makes the problem about 90% repeatable.  Running them in separate
> processes is less repeatable, presumably due to timing, but I've seen the
> problem that way too.)
> 3. One client fails.  Relevant portions of server log (annotated):
>

... snip ...



-------------------------------------------------------
This SF.Net email sponsored by: Free pre-built ASP.NET sites including
Data Reports, E-commerce, Portals, and Forums are available now.
Download today and enter to win an XBOX or Visual Studio .NET.
http://aspnet.click-url.com/go/psa00100003ave/direct;at.aspnet_072303_01/01
_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to