The Author Online Book Forums are Moving

The Author Online Book Forums will soon redirect to Manning's liveBook and liveVideo. All book forum content will migrate to liveBook's discussion forum and all video forum content will migrate to liveVideo. Log in to liveBook or liveVideo with your Manning credentials to join the discussion!

Thank you for your engagement in the AoF over the years! We look forward to offering you a more enhanced forum experience.

import-bot (20211) [Avatar] Offline
#1
[Originally posted by kvgeorge1]

I have managed to obtain a copy of IMJ. I must say that you have done an
excellent job at describing and going through creating the various pieces for
IM. However, I have noticed a major descrepancy (sp?) in your code for the
source, and the code in the book at the end of Chpt 3. for OpenStreamHandler,
CloseStreamHandler and DeliveryHandler. The code in the book looks nothing
like the code in the zip file, and you use things in the book (specifically on
pg. 93) that you do not describe anywhere (i.e.
packet.setFrom(Server.SERVER_NAME)smilie.

The differences are not noted in the errata section of the web site. I am
assuming that the source in the zip is correct?
import-bot (20211) [Avatar] Offline
#2
Re: Chpt 3. Book Source
[Originally posted by iain.shigeoka]

> I have managed to obtain a copy of IMJ. I must say that you have done an
> excellent job at describing and going through creating the various pieces for

Thanks. I'm glad you enjoyed the book.

> IM. However, I have noticed a major descrepancy (sp?) in your code for the
> source, and the code in the book at the end of Chpt 3. for OpenStreamHandler,
> CloseStreamHandler and DeliveryHandler. The code in the book looks nothing
> like the code in the zip file, and you use things in the book (specifically on
> pg. 93) that you do not describe anywhere (i.e.
> packet.setFrom(Server.SERVER_NAME)smilie.

Yes. Unfortunately, it's impractical to print all of the source code to a
reasonably complex piece of software in a book (unless it's one of those
annotated source code books). I chose to leave out of the print listings
logging code, configuration, and most exception handling code that appears in
the full source available online. I'm hoping that this is fairly "boilerplate"
code that you can understand by just reading the source.

In addition, I have made some modifications to the online code to make it a
tad more robust by doing some compensation for rare cases. I don't think this
is too common though. If there is anything that doesn't make sense, just let
me know and I'll try and guide you further.

> The differences are not noted in the errata section of the web site. I am
> assuming that the source in the zip is correct?

Yes, the source in the zip is the complete and current source. I'm only
putting error notes into the errata. There are some enhancements to the online
code that just make the code a little better and that is not included in the
errata as these changes tend to add complexity.

If anything is confusing, just ask and I'll try to clear things up.

-iain