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
- Missing wait/notify (was Re: [JBoss-dev] A... danch (Dan Christopherson)
- Re: Missing wait/notify (was Re: [JBos... danch (Dan Christopherson)
- RE: Missing wait/notify (was Re: [... Bill Burke
- Re: Missing wait/notify (was R... danch (Dan Christopherson)
- RE: Missing wait/notify (... Bill Burke
- Re: Missing wait/noti... danch (Dan Christopherson)
- Re: Missing wait/noti... K.V. Vinay Menon
- Re: Missing wait/noti... danch
- Re: Missing wait/noti... Georg Rehfeld
- RE: Missing wait/noti... Bill Burke
- Re: Missing wait/noti... danch
- Re: Missing wait/notify (was Re: [... Georg Rehfeld
- Re: Missing wait/notify (was R... danch (Dan Christopherson)
- RE: [JBoss-dev] Avoiding Locks for READ-ONLY Be... Jay Walters
- Re: [JBoss-dev] Avoiding Locks for READ-ON... K.V. Vinay Menon
- RE: [JBoss-dev] Avoiding Locks for READ-ONLY Be... Jack Saisi