Re: [Axis2] Can someone explain the "logic" in AxisEngine.TransportNonBlockingInvocationWorker?
Hi Bill ; I found the issue so I will fix that and commit . Thanks Deepal >Hi Deepal, > >I understand why the class is there; I don't understand why the changes >in 415245 were made -- that's what I was asking for clarification about. >The 'done' block is completely irrelevant and makes the code harder to >read, unless there is something that I'm missing, which is why I was >asking. BTW, the result of your comment modification is inaccurate; the >class is used anytime someone sets the useSeparateListener option on an >OutIn operation, not just when two transports are in use. > >-Bill > > >On Wed, 2006-11-08 at 10:30 +0530, Deepal Jayasinghe wrote: > > >>Hi Bill ; >>I added a few comment line into the code. >> >> >> >>>In revision 415245, some code was added to the >>>AxisEngine.TransportNonBlockingInvocationWorker with the comment "- >>>minor modification" -- this code added a boolean, done, and a while loop >>>which tests that boolean. >>> >>> /** >>>* This class is the workhorse for a non-blocking invocation that uses a >>> two >>>* way transport. >>>*/ >>> private class TransportNonBlockingInvocationWorker implements Runnable { >>> private MessageContext msgctx; >>> private TransportSender sender; >>> private boolean done; >>> >>> public TransportNonBlockingInvocationWorker(MessageContext msgctx, >>> TransportSender sender) { >>> this.msgctx = msgctx; >>> this.sender = sender; >>> } >>> >>> public void run() { >>> try { >>> while (!done) { >>> sender.invoke(msgctx); >>> done = true; >>> } >>> } catch (Exception e) { >>> log.info(e.getMessage()); >>> } >>> } >>> } >>> >>>The ThreadPool is the the only one that has a handle to the >>>TransportNonBlockingInvocationWorker instance, and he can't tell what >>>the outcome was so this addition is rather confusing. >>> >>> >>> >>I am not clear what do you mean by this , thread is just to send the >>request. It will create AxisEngine and and send the message and wait >>till it get the transport ack. >> >> >> >>>Can someone >>>enlighten me as to its purpose since the commit message is utterly >>>useless and there are no other comments in the code? >>> >>> >>> >>> >>already done in the code. >> >> >>- >>To unsubscribe, e-mail: [EMAIL PROTECTED] >>For additional commands, e-mail: [EMAIL PROTECTED] >> >> > > >- >To unsubscribe, e-mail: [EMAIL PROTECTED] >For additional commands, e-mail: [EMAIL PROTECTED] > > > > > -- Thanks, Deepal "The highest tower is built one brick at a time" - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [Axis2] Can someone explain the "logic" in AxisEngine.TransportNonBlockingInvocationWorker?
Hi Deepal, I understand why the class is there; I don't understand why the changes in 415245 were made -- that's what I was asking for clarification about. The 'done' block is completely irrelevant and makes the code harder to read, unless there is something that I'm missing, which is why I was asking. BTW, the result of your comment modification is inaccurate; the class is used anytime someone sets the useSeparateListener option on an OutIn operation, not just when two transports are in use. -Bill On Wed, 2006-11-08 at 10:30 +0530, Deepal Jayasinghe wrote: > Hi Bill ; > I added a few comment line into the code. > > >In revision 415245, some code was added to the > >AxisEngine.TransportNonBlockingInvocationWorker with the comment "- > >minor modification" -- this code added a boolean, done, and a while loop > >which tests that boolean. > > > >/** > > * This class is the workhorse for a non-blocking invocation that uses a > > two > > * way transport. > > */ > >private class TransportNonBlockingInvocationWorker implements Runnable { > >private MessageContext msgctx; > >private TransportSender sender; > >private boolean done; > > > >public TransportNonBlockingInvocationWorker(MessageContext msgctx, > >TransportSender sender) { > >this.msgctx = msgctx; > >this.sender = sender; > >} > > > >public void run() { > >try { > >while (!done) { > >sender.invoke(msgctx); > >done = true; > >} > >} catch (Exception e) { > >log.info(e.getMessage()); > >} > >} > >} > > > >The ThreadPool is the the only one that has a handle to the > >TransportNonBlockingInvocationWorker instance, and he can't tell what > >the outcome was so this addition is rather confusing. > > > I am not clear what do you mean by this , thread is just to send the > request. It will create AxisEngine and and send the message and wait > till it get the transport ack. > > >Can someone > >enlighten me as to its purpose since the commit message is utterly > >useless and there are no other comments in the code? > > > > > already done in the code. > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [Axis2] Can someone explain the "logic" in AxisEngine.TransportNonBlockingInvocationWorker?
Hi Bill ; I added a few comment line into the code. >In revision 415245, some code was added to the >AxisEngine.TransportNonBlockingInvocationWorker with the comment "- >minor modification" -- this code added a boolean, done, and a while loop >which tests that boolean. > >/** > * This class is the workhorse for a non-blocking invocation that uses a > two > * way transport. > */ >private class TransportNonBlockingInvocationWorker implements Runnable { >private MessageContext msgctx; >private TransportSender sender; >private boolean done; > >public TransportNonBlockingInvocationWorker(MessageContext msgctx, >TransportSender sender) { >this.msgctx = msgctx; >this.sender = sender; >} > >public void run() { >try { >while (!done) { >sender.invoke(msgctx); >done = true; >} >} catch (Exception e) { >log.info(e.getMessage()); >} >} >} > >The ThreadPool is the the only one that has a handle to the >TransportNonBlockingInvocationWorker instance, and he can't tell what >the outcome was so this addition is rather confusing. > I am not clear what do you mean by this , thread is just to send the request. It will create AxisEngine and and send the message and wait till it get the transport ack. >Can someone >enlighten me as to its purpose since the commit message is utterly >useless and there are no other comments in the code? > > already done in the code. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]