Hello Bryan,

> In the scenario in which I describe below, I just got another
> deadlock error from within a "read-only" method. The transaction
> exception details are:
> 
> Name: javax.transaction.TransactionRolledbackException
> Message: Transaction marked for rollback, possibly a timeout; 
>   nested exception is: (omitted...)
> 
> I thought that in the below scenario, there are no transactions
> at work -- so how could it result in a deadlock, or be rolled
> back? Help would be appreciated,

Difficult to guess from what you tell us. Do you use select for
update, so that the DB causes deadlocks? Are there other
resources you try to access concurrenty? Is it possible that some
bean does lengthy operations (or hangs) while others try to
access the same bean instance? With non reentrant beans (default)
no two clients can enter the same instance concurrently even outside 
of a transaction.

Are there any log messages before the
TransactionRolledbackException in the server.log that might
indicate whats going on?

> Your state charts of I's and dashes are awesome!

Actually I tried to draw Sequence Diagrams, I find them helpful
sometimes.

> What I've done is mark all my Entity beans as "Supports", rather
> than "Requires".
> 
> Furthermore, at the session bean level, my read-only methods are
> marked as "Never", while my read/write methods are marked as
> "Requires".
> 
> In this way I get good read-only performance for my read methods,
> and data integrity for my read/write methods.
> 
> I am aware that marking my entity beans as "Supports" ventures
> into "unspecified" behavior, but in the above scenario, it
> appears to work in a good way.
> 
> If I am making a poor assumption here then I would appreciate
> your further comments.

I think, you do it, as I would have done it, as long as you are
aware of the dirty/invalid data status and do not try to modify
anything based on it.

regards
Georg
 ___   ___
| + | |__    Georg Rehfeld      Woltmanstr. 12     20097 Hamburg
|_|_\ |___   [EMAIL PROTECTED]           +49 (40) 23 53 27 10



_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to