<ul><li>Building on the success of Java Pitfalls (0-471-36174-7), this book provides more specific programming solutions to fifty difficult Java programming problems<li>Shows experienced programmers how to identify and avoid weaknesses in Java and related J2EE technologies that can cause programs to
More Java Pitfalls: 50 New Time-Saving Solutions and Workarounds
β Scribed by Michael C. Daconta, Kevin T. Smith, Donald Avondolio, W. Clay Richardson
- Publisher
- Wiley
- Year
- 2003
- Tongue
- English
- Leaves
- 476
- Edition
- 1
- Category
- Library
No coin nor oath required. For personal study only.
β¦ Synopsis
- Building on the success of Java Pitfalls (0-471-36174-7), this book provides more specific programming solutions to fifty difficult Java programming problems * Shows experienced programmers how to identify and avoid weaknesses in Java and related J2EE technologies that can cause programs to go haywire * Explores advanced topics including networking, XML and Java programming, and the Java Virtual Machine
β¦ Table of Contents
@Team LiB......Page 0
Cover......Page 1
Contents......Page 8
Introduction......Page 12
Acknowledgments......Page 18
PART
One The Client Tier......Page 22
Item 1: When Runtime.exec() Wonβt......Page 25
Item 2: NIO Performance and Pitfalls......Page 38
Canonical File Copy......Page 41
Little-Endian Byte Operations......Page 42
Non-Blocking Server IO......Page 47
Item 3: I Prefer Not to Use Properties......Page 55
Item 4: When Information Hiding Hides Too Much......Page 60
Item 5: Avoiding Granularity
Pitfalls in java.util.logging......Page 65
Item 6: When Implementations of
Standard APIs Collide......Page 74
How to Use Assertions......Page 80
Item 8: The Wrong Way to Search a DOM......Page 87
Item 9: The Saving-a-DOM Dilemma......Page 94
Item 10: Mouse Button Portability......Page 101
Item 11: Apache Ant and Lifecycle Management......Page 109
Item 12: JUnit: Unit Testing Made Simple......Page 121
Item 13: The Failure to Execute......Page 129
Deploying Java Applications......Page 130
The Java Extension Mechanism......Page 131
Sealed Packages......Page 132
Item 14: What Do You Collect?......Page 133
Item 15: Avoiding Singleton Pitfalls......Page 138
When Multiple Singletons in Your VM Happen......Page 140
When Singletons are Used as Global Variables,
or Become Non-Singletons......Page 141
Item 16: When setSize() Wonβt Work......Page 143
Connecting via HTTP with the java.net Classes......Page 147
An Alternative Open Source HTTP Client......Page 158
Item 18: Effective String Tokenizing......Page 161
Item 19: JLayered Pane Pitfalls......Page 167
Item 20: When File.renameTo() Wonβt......Page 172
Item 21: Use Iteration over Enumeration......Page 178
Item 22: J2ME Performance and Pitfalls......Page 183
PART
Two The Web Tier......Page 220
Item 23: Cache, Itβs Money......Page 221
Request/Response Paradigm......Page 229
Maintaining State......Page 230
JSP the Old Way......Page 231
JSP Development with Beans (Model 1 Architecture)......Page 235
Item 25: When Servlet HttpSessions Collide......Page 241
Item 26: When Applets Go Bad......Page 248
Item 27: Transactional LDAPβDonβt
Make that Commitment......Page 256
Item 28: Problems with Filters......Page 265
Item 29: Some Direction about
JSP Reuse and Content Delivery......Page 276
Item 30: Form Validation Using Regular Expressions......Page 282
Item 31: Instance Variables in Servlets......Page 290
Item 32: Design Flaws with Creating Database
Connections within Servlets......Page 300
Item 33: Attempting to Use Both Output
Mechanisms in Servlets......Page 312
Item 34: The Mysterious File Protocol......Page 318
Item 35: Reading Files from Servlets......Page 323
Web Application Deployment Descriptors......Page 329
Item 36: Too Many Submits......Page 333
Preventing Multiple Submits......Page 335
Handling Multiple Submits......Page 337
PART
Three The Enterprise Tier......Page 348
Item 37: J2EE Architecture Considerations......Page 350
Item 38: Design Strategies for Eliminating
Network Bottleneck Pitfalls......Page 356
General Design Considerations......Page 357
EJB Design Considerations......Page 361
Item 39: Iβll Take the Local......Page 362
Item 40: Image Obsession......Page 369
Item 41: The Problem with Multiple
Concurrent Result Sets......Page 374
A Simple Scenario......Page 380
A βClient Controlβ Approach......Page 381
The Singleton Approach......Page 383
Database Autogeneration Approaches......Page 384
Other Approaches......Page 385
Item 43: The Stateful Stateless Session Bean......Page 386
Entity Bean......Page 387
Stateless Session Bean......Page 389
Item 44: The Unprepared PreparedStatement......Page 393
Item 45: Take a Dip in the Resource Pool......Page 399
Item 46: JDO and Data Persistence......Page 406
Item 47: Whereβs the WSDL? Pitfalls of
Using JAXR with UDDI......Page 419
Whereβs the WSDL?......Page 425
Item 48: Performance Pitfalls in
JAX-RPC Application Clients......Page 438
Example Web Service......Page 439
A Simple Client That Uses Precompiled Stub Classes......Page 441
A Client That Uses Dynamic Proxies for Access......Page 442
Two Clients Using the Dynamic Invocation Interface (DII)......Page 444
Performance Results......Page 448
Conclusion......Page 449
Item 49: Get Your Beans Off My Filesystem!......Page 450
Item 50: When Transactions Go Awry, or Consistent
State in Stateful Session EJBs......Page 454
The Memento Pattern......Page 459
Index......Page 464
π SIMILAR VOLUMES
Highlighting 50 of Java's imperfections, this sequel to Java Pitfalls helps programmers avoid weaknesses in the language and its related technologies that can cause programs to go haywire. Four programmers contribute detailed code-level solutions for each topic, including mouse button portability, w
A lifesaver for any Java programmer-proven workarounds and time-saving solutions Although using the Java language provides a substantial boost to a programmer's productivity, it still has its share of subtleties andweaknesses. This book is designed to save you time and frustration by carefully guidi
* Teaches how to work smart and avoid the many pitfalls of managing Solaris systems * Covers the latest release of Solaris, Solaris 9, as well as earlier versions * Written by experts with years of Solaris experience * Packed with practical, hands-on solutions to tough problems, showing how
If you are working with Struts, Ant, or automated unit testing into your development process,then this is a book for you.This book looks at the popular Jakarta applications asJUnit/Cactus, Struts, and Ant, and shows the most common pitfalls when using these applications. The book givesa chapter to A
<ul> <li>Teaches how to work smart and avoid the many pitfalls of managing Solaris systems</li> <li>Covers the latest release of Solaris, Solaris 9, as well as earlier versions</li> <li>Written by experts with years of Solaris experience</li> <li>Packed with practical, hands-on solutions to tough pr