Subject | Re: [Firebird-Java] Re: Concurrent updates - Retry not allowed without commit or rollback |
---|---|
Author | Nitin Shenoy |
Post date | 2003-09-23T08:50:06Z |
Roman,
Firebird not allowing a retry update after Update
Conflict without a commit is a real problem for the
application we are currently developing. We use
Container Managed Persistence Entity Beans and our
Application currently works very well with Oracle and
MySQL for concurrent updates.
Concurrent updates do not work with firebird because
Jaybird reports the GDSException it gets from
Firebird. I thought a simple fix to this would be to
trap this exception in a try-catch block in the
Jaybird code (either in GDSImpl or
FBPreparedStatement) and retry the update in a loop
until it succeeds. But, I cant do that because
Firebird just keeps repeating the same exception. I
have to necessarily commit or rollback and that does
not work in an EJB environment where the transaction
is global and a commit or rollback has implications
for other components in the transaction.
I searched the Firebird developer posts and could not
find anything that indicates why I need a
commit/rollback or whether there is a workaround to
it.
I am sure other folks who have tried CMP Entity Beans
have come up across this or a similar problem. I
wonder how folks have been using Firebird + Jaybird in
similar circumstances. Any thoughts?
Thanks,
Nitin
--- Roman Rokytskyy <rrokytskyy@...> wrote:
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com
Firebird not allowing a retry update after Update
Conflict without a commit is a real problem for the
application we are currently developing. We use
Container Managed Persistence Entity Beans and our
Application currently works very well with Oracle and
MySQL for concurrent updates.
Concurrent updates do not work with firebird because
Jaybird reports the GDSException it gets from
Firebird. I thought a simple fix to this would be to
trap this exception in a try-catch block in the
Jaybird code (either in GDSImpl or
FBPreparedStatement) and retry the update in a loop
until it succeeds. But, I cant do that because
Firebird just keeps repeating the same exception. I
have to necessarily commit or rollback and that does
not work in an EJB environment where the transaction
is global and a commit or rollback has implications
for other components in the transaction.
I searched the Firebird developer posts and could not
find anything that indicates why I need a
commit/rollback or whether there is a workaround to
it.
I am sure other folks who have tried CMP Entity Beans
have come up across this or a similar problem. I
wonder how folks have been using Firebird + Jaybird in
similar circumstances. Any thoughts?
Thanks,
Nitin
--- Roman Rokytskyy <rrokytskyy@...> wrote:
> > Any thoughts on how I can get a resolution on this__________________________________
> > topic? I can try posting this message with your
> reply
> > on the Firebird support list but I am afraid of
> being
> > redirected to this list.
>
> I remember something similar was discussed in the
> firebird-devel at
> lists.sf.net. However, I was not able to find it in
> the archives, so
> maybe that was in some other list. As far as I
> remember, it was marked
> "as designed", even other servers behave
> differently.
>
> I hope that Helen and/or Nickolay can remeber this
> discussion and give
> you more info.
>
> Roman
>
>
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com