1 Reply Latest reply on Nov 19, 2002 12:42 AM by sieroka

    reentrant checking not working right


      JBoss 3.0.3 and 3.0.4

      If I have a non-transacted entity bean (eg. replace the default 'Required' to something like 'Supports' or 'NotSupported'), and I call that entity bean from 2 threads simultaneously, I get reentrant exceptions.

      Should this be? I'm not calling reentrant methods in my business logic, but rather have 2 threads making changes to the database.
      So the data might become unpredictable, so what, I asked for it, I specifically said, no transactions, so let the data overlap.

      When I mark the entity bean as 'reentrant' (in ejb-jar.xml I think), then I get a different error, almost in the same place.
      It then complains that it's seeing a connection that isn't closed (or marked finished or sorts).

      My guess is that what could fix it is to insert code in JBoss, that ends up running it through a synchronized call, to so that multithreading isn't treated the same way as calling methods in circles.

        • 1. Re: reentrant checking not working right

          It's even worse. I want to run queries outside of transactions, and when I do a bunch of reads, I get the same error. I don't really want to rewrite all the finders in our application with direct Sql queries.

          Does anyone know a way around this. I'll go as far as modifying some java files and repackaging the jboss 3.0.4 jar file.