OK, I think we're talking about the same sort of thing. This looks good.

Bill Burke wrote:

> Sorry my pseudo code was sooo confusing.
> 
> Here's something better
> 
>       synchronized(ctx)
>       {
>           while (ctx.isLocked()) {
>               ctx.wait(5000);
>             if (ctx.isLocked()) {
>                   log.log("LOCKING-WAITING");
>             }
>             else
>             {
>                   ctx.lock();
>                 break;
>             }
>           }
>       }
> 
> // do stuff...
> 
>       synchronized(ctx)
>       {
>               ctx.unlock();
>               ctx.notify();
>       }
> 
> I think this, or something like it, will work....Important to note....I
> don't think you should catch InterruptedException because I'm not sure how
> Transaction Timeouts work.
> 
> Bill
> 
> 
> 


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

Reply via email to