Books
in black and white
Main menu
Share a book About us Home
Books
Biology Business Chemistry Computers Culture Economics Fiction Games Guide History Management Mathematical Medicine Mental Fitnes Physics Psychology Scince Sport Technics
Ads

More Java Pitfalls Share Reactor - Daconta M,C.

More Java Pitfalls Share Reactor

Author: Daconta M,C.
Publishers: Wiley publishing
Year of publication: 2003
Number of pages: 476
ISBN: 0-471-23751-5
Read: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166
Download: morejavapitfallssharereactor2003.pdf


TIMELY. PRACTICAL. RELIABLE.
More
TM
50 New Time-Saving Solutions and Workarounds
Michael C. Daconta Kevin T. Smith Donald Avondolio W. Clay Richardson
More Java™ Pitfalls
50 New Time-Saving Solutions and Workarounds
More Java™ Pitfalls
50 New Time-Saving Solutions and Workarounds
Michael C. Daconta Kevin T. Smith Donald Avondolio W. Clay Richardson
WILEY
Wiley Publishing, Inc.
Publisher: Joe Wikert
Executive Editor: Robert M. Elliott
Assistant Developmental Editor: Emilie Herman
Managing Editor: Micheline Frederick
New Media Editor: Angela Denny
Text Design & Composition: Wiley Composition Services This book is printed on acid-free paper. @
Copyright © 2003 by Michael C. Daconta, Kevin T. Smith, Donald Avondolio, and W. Clay Richardson. All rights reserved.
Published by Wiley Publishing, Inc., Indianapolis, Indiana Published simultaneously in Canada
No part of this publication may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, electronic, mechanical, photocopying, recording, scanning, or otherwise, except as permitted under Section 107 or 108 of the 1976 United States Copyright Act, without either the prior written permission of the Publisher, or authorization through payment of the appropriate per-copy fee to the Copyright Clearance Center, Inc., 222 Rosewood Drive, Danvers, MA 01923, (978) 750-8400, fax (978) 646-8700. Requests to the Publisher for permission should be addressed to the Legal Department, Wiley Publishing, Inc., 10475 Crosspoint Blvd., Indianapolis, IN 46256, (317) 572-3447, fax (317) 572-4447, E-mail: permcoordinator@wiley.com.
Limit of Liability/Disclaimer of Warranty: While the publisher and author have used their best efforts in preparing this book, they make no representations or warranties with respect to the accuracy or completeness of the contents of this book and specifically disclaim any implied warranties of merchantability or fitness for a particular purpose. No warranty may be created or extended by sales representatives or written sales materials. The advice and strategies contained herein may not be suitable for your situation. You should consult with a professional where appropriate. Neither the publisher nor author shall be liable for any loss of profit or any other commercial damages, including but not limited to special, incidental, consequential, or other damages.
Wiley, the Wiley Publishing logo and related trade dress are trademarks or registered trademarks of Wiley Publishing, Inc., in the United States and other countries, and may not be used without written permission. Java is a trademark or registered trademark of Sun Microsystems, Inc.. All other trademarks are the property of their respective owners. Wiley Publishing, Inc., is not associated with any product or vendor mentioned in this book.
For general information on our other products and services please contact our Customer Care Department within the United States at (800) 762-2974, outside the United States at (317) 572-3993 or fax (317) 572-4002.
Wiley also publishes its books in a variety of electronic formats. Some content that appears in print may not be available in electronic books.
Library of Congress Cataloging-in-Publication Data:
ISBN: 0-471-23751-5
Printed in the United States of America
10 9 8 7 6 5 4 3 2 1
This book is dedicated to the memory of Edsger W. Dijkstra who said,
"I mean, if 10 years from now, when you are doing something quick and dirty, you suddenly visualize that I am looking over your shoulders and say to yourself, 'Dijkstra would not have liked this', well that would be enough immortality for me."
We humbly disagree: 10 years of Dijkstra is just not long enough; may he happily haunt our consciousness for 1010 years. Such an increase is
more befitting his stature.
Contents
Introduction xi
Acknowledgments xvii
Part One The Client Tier 1
Item 1: When Runtime.exec() Won't 4
Item 2: NIO Performance and Pitfalls 17
Canonical File Copy 20
Little-Endian Byte Operations 21
Non-Blocking Server IO 26
Item 3: I Prefer Not to Use Properties 34
Item 4: When Information Hiding Hides Too Much 39
Item 5: Avoiding Granularity Pitfalls In java.util.logging 44
Item 6: When Implementations of Standard APIs Collide 53
Item 7: My Assertions are Not Gratuitous! 59
How to Use Assertions 59
Item 8: The Wrong Way to Search a DOM 66
Item 9: The Saving-a-DOM Dilemma 73
Item 10: Mouse Button Portability 80
Item 11: Apache Ant and Lifecycle Management 88
Item 12: JUnit: Unit Testing Made Simple 100
vii
viii Contents
Item 13: The Failure to Execute 108
Deploying Java Applications 109
The Java Extension Mechanism 110
Sealed Packages 111
Security 112
Item 14: What Do You Collect? 112
Item 15: Avoiding Singleton Pitfalls 117
When Multiple Singletons in Your VM Happen 119 When Singletons are Used as Global Variables, or Become
Non-Singletons 120
Item 16: When setSize() Won't Work 122
Item 17: When Posting to a URL Won't 126
< 1 > 2 3 4 5 6 7 .. 166 >> Next