I'm using Mylyn headlessly to post information to Bugzilla. When I do,
there's a small chance that I might cause a "mid-air collision", which is
what happens when two users attempt to edit the same bug at the same time.

When this happens, BugzillaTaskDataHandler#postTaskData will (I think)
return a CoreException. My question is, how do I detect that this
particular case has occured, and I should start over and retry (as opposed
to all the other error cases where I shouldn't retry)?

In the event of a mid-air collision, the CoreException will have a
Status associated with it. That Status will have a code equal to
RepositoryStatus.REPOSITORY_COLLISION.

Regards,

-Rob

Matthew Beermann wrote:
> I'm using Mylyn headlessly to post information to Bugzilla. When I do,
> there's a small chance that I might cause a "mid-air collision", which
> is what happens when two users attempt to edit the same bug at the same
> time.
>
> When this happens, BugzillaTaskDataHandler#postTaskData will (I think)
> return a CoreException. My question is, how do I detect that this
> particular case has occured, and I should start over and retry (as
> opposed to all the other error cases where I shouldn't retry)?
>

In the event of a mid-air collision, the CoreException will have a
Status associated with it. That Status will have a code equal to
RepositoryStatus.REPOSITORY_COLLISION.

Regards,

-Rob

Matthew Beermann wrote:
> I'm using Mylyn headlessly to post information to Bugzilla. When I do,
> there's a small chance that I might cause a "mid-air collision", which
> is what happens when two users attempt to edit the same bug at the same
> time.
>
> When this happens, BugzillaTaskDataHandler#postTaskData will (I think)
> return a CoreException. My question is, how do I detect that this
> particular case has occured, and I should start over and retry (as
> opposed to all the other error cases where I shouldn't retry)?
>