> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED]]On Behalf Of
> Ferguson, Doug
> Sent: Thursday, September 06, 2001 12:20 PM
> To: '[EMAIL PROTECTED]'
> Subject: RE: [JBoss-dev] TRANSACTIONS
>
>
> >>>
> >>>
> >>> 1) Does jboss not throw and exception when a bean is reentrant?
> >>>
> > Can you explaing this more? What is your version of JBoss?
> >
> The spec says that a nonReentrant bean should throw and exception when it
> tries to reentry
> I think jBoss is blocking. We see the same thing on 2.2.2 and 2.4
>
2 locks are performed, first a transaction lock, which is why you are seeing
the blocking above, then it does a method-lock. That is, if the bean is
currently executing the method, all other threads wait until the method-lock
is released. Maybe this is not the correct spec behaviour.
> >>> 2) Does jboss not discard the transaction when NotSupported is used.
> >>> I see the code for tm.suspend(). But the log message still shows
> >>> the blocking message.
> >>>
> >Again, entity beans that become part of a transaction are locked and will
> >not be released no matter what until the transaction commits or
> rollsback.
> >
> I thought the transaction was suspended for NotSupported thus no need to
> lock.
> But I the code seems to work as you described above.
>
Yes, the transaction is suspended, but Entity Beans are not unlocked until
the transaction commits.
> >>> 3) I've got deadlock city!!! I will be sending a more informative
> >>> email when
> >>> we get a test case.
> >>> We think it is a jboss transaction bug.
> >>>
> >Please make sure your code is not making bad assumptions. I"ll
> be glad to
> >help you out to sort this out.
> >
> We are looking into it more. I think our work around is to make any of our
> "read-only" entity
> beans RequiresNew. Seems to cure the blocking thing. I think the ultimate
> problem is that we
> have entity bean referencing other entities.
>
RequiresNew is exactly what we did for our read-only entity beans. In 3.0,
you can plug-in your own locking policies.(and 2.4.1 when it is released).
There is a MethodOnlyLock that you can put in for read-only beans, but I
eventually want to extend this so that read-only beans never become part of
the transaction.
Bill
_______________________________________________
Jboss-development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development