Subject Re: [Firebird-Java] What means this exception ?
Author David Jencks
Mike Spille wrote a reasonably comprehensible and accurate introduction
to xa a few months ago on his blog. More thorough information is in
the fairly new book, Java Transaction Processing.


On Sep 15, 2004, at 4:43 AM, S. Radojcin wrote:

>
>
> David Jencks wrote:
>
> >If you are using jms
> >
> - yes, exactly. My situation is simple:
>
> 1. one MessageDrivenBean  (with 'class level'   @...
> type="Required" tag) simply creates  one entity EJB, then does
> transition by sending some XML message to the javax.jms.Queue
>
>    At this moment, everything is ok (I hope, but to tell you truth, I
> nohave idea what happens at this moment with transaction, one
> explanation will be helpful)
>

Limbo transaction later appears to mean that this transaction prepared
but did not commit. There ought to be something in the logs indicating
what happened. I'd expect this problem only if jboss crashed during
commit.

Hmm. Another possiblity might be that the jms message delivery is not
transacted? If the xml message the first mdb sends is sent outside the
mdb's transaction, it could be received before the first transaction
finishes committing. How exactly is the first mdb getting the jms
connection factory? Are you sure this connection factory is transacted?

david jencks

>   (P.S. in standardjboss.xml, for Standard CMP 2.x EntityBean, I have
>      <commit-option>A</commit-option>
>    without this, my finder method sometime cannot find existing entity
>   bean )
>
> 2. on the other side, second MDB (from the same .jar) which listens on
> the Queue, tries to find local interface of that entity EJB.
>      And FinderExcpetion because of limbo transaction happens.
>
> >you would get 2pc unless you modified the jaybird 
> >-ds.xml to specify local transaction.
> >
>
> - Do you mean 'ra.xml' file inside firebirdsql.rar ? There I can see
>     <transaction-support>XATransaction</transaction-support>
>
> If so, what should be in this tag, in order to specify local
> transaction ?
> I cannot see jaybird-ds.xml file nowhere ....(JBoss 3.0.8)
>
> >  Since jboss's tm doesn't do 
> >recovery if something broke during commit you could easily get a
> limbo 
> >tx.
> >
> >Might not apply to you, but that's one easy way to get limbo tx.
> >
> >david jencks
> >
> > 
> >
> >> - but, I don't  have a transaction that spans multiple databases
> at 
> >>all;
> >> nor two-phase commit; nor subtransactions;
> >> for conclusion - there is no conditions for limbo transaction, I 
> >>think.
> >>
> >> Still, this exception happens when I try to obtain local interface
> of 
> >>my
> >> entity EJB, by calling one of finder methods.
> >> Then, FinderExceptions throws, with this message:
> >>           ----------------
> >> javax.ejb.FinderException: Find failed:
> >> org.firebirdsql.jdbc.FBSQLException: GDS Exception. deadlock
> >> record from transaction 19474 is stuck in limbo
> >>   at
> >> 
>
> >>org.jboss.ejb.plugins.cmp.jdbc.JDBCAbstractQueryCommand.execute(JDBCA
> bs
> >>tractQueryCommand.java:148)
> >>   at
> >> 
>
> >>org.jboss.ejb.plugins.cmp.jdbc.JDBCFindEntityCommand.execute(JDBCFind
> En
> >>tityCommand.java:44)
> >>            .......................
> >>
> >>
> >> -So, why deadlock, and why limbo transaction, can anyone tell me ?
> >>
>
> > 
> >
>
>
>
>
>
>
>
>
>
> Yahoo! Groups Sponsor
>
> ADVERTISEMENT
> <lrec_companion_043004.gif>
> <l.gif>
>
> Yahoo! Groups Links
>
> • To visit your group on the web, go to:
> http://groups.yahoo.com/group/Firebird-Java/
>  
> • To unsubscribe from this group, send an email to:
> Firebird-Java-unsubscribe@yahoogroups.com
>  
> • Your use of Yahoo! Groups is subject to the Yahoo! Terms of
> Service.
>
>