Bitter Ejb

個数:
  • ポイントキャンペーン

Bitter Ejb

  • ウェブストア価格 ¥7,597(本体¥6,907)
  • Manning Pubns Co(2003/06発売)
  • 外貨定価 US$ 44.95
  • ウェブストア限定 全点ポイント5倍キャンペーン(6/24~6/28)
  • ポイント 345pt
  • 提携先の海外書籍取次会社に在庫がございます。通常3週間で発送いたします。
    重要ご説明事項
    1. 納期遅延や、ご入手不能となる場合が若干ございます。
    2. 複数冊ご注文の場合、分割発送となる場合がございます。
    3. 美品のご指定は承りかねます。
  • 【重要:入荷遅延について】
    ウクライナ情勢悪化・新型コロナウィルス感染拡大により、洋書・洋古書の入荷が不安定になっています。詳しくはこちらをご確認ください。
    海外からのお取り寄せの場合、弊社サイト内で表示している標準的な納期よりもお届けまでに日数がかかる見込みでございます。
    申し訳ございませんが、あらかじめご了承くださいますようお願い申し上げます。
  • ◆画像の表紙や帯等は実物とは異なる場合があります。
  • 製本 Paperback:紙装版/ペーパーバック版/ページ数 350 p.
  • 言語 ENG
  • 商品コード 9781930110953
  • DDC分類 005.133

Full Description


In Bitter EJB, Bruce Tate and his co-authors continue the entertaining and engaging writing style of relating true-life adventure sport experiences to antipattern themes established in Bruce's first book, the best selling Bitter Java. This more advanced book explores antipatterns, or common traps, within the context of EJB technology. EJB is experiencing the mixture of practical success and controversy that accompanies a new and quickly-changing framework. Bitter EJB takes the swirling EJB controversies head-on. It offers a practical approach to design: how to become a better programmer by studying problems and solutions to the most important problems surrounding the technology. The flip side of design patterns, antipatterns, are a fun and interesting way to take EJB expertise to the next level. The book covers many different aspects of EJB, from transactions to persistence to messaging, as well as performance and testing.Bitter EJB will teach programmers to do the following: * Identify EJB persistence strategies * Choose Entity bean alternatives * Use EJB message driven beans * Know when to apply or avoid stateful session beans * Create efficient build strategies with XDoclet, Ant and JUnit * Automate performance tuning

Table of Contents

preface                                            xv
acknowledgments xviii
about this book xxii
Part 1 The Basics 1 (80)
Bitter choices 3 (18)
A storm of controversy 5 (1)
A history of EJB antipatterns 6 (3)
March 1998: EJB 1.0 7 (1)
November 1999: EJB 1.1 7 (1)
August 2001: EJB 2.0 8 (1)
A case study: Benchmarking PetStore 9 (3)
Antipattern: The Golden Hammer 12 (7)
Choosing unwisely 13 (2)
Solution: Evaluate carefully 15 (4)
Summary: Looking ahead 19 (1)
Antipatterns in this chapter 20 (1)
The bitter cost 21 (31)
Sparking controversy 22 (8)
The value of EJB 23 (1)
EJB-appropriate applications 23 (2)
Using a litmus test 25 (1)
Passing the test 26 (1)
Weighing complexity 27 (1)
Evaluating your talent 28 (2)
Antipattern: A Sledgehammer for a Fly 30 (11)
Adding complexity 32 (1)
Solution: Simplify 33 (3)
Consider the cost of managing many files 36 (3)
Grading the finer points 39 (2)
Entity beans are a horse of a different 41 (2)
color
The black sheep of the bean family 42 (1)
Entity beans: Take two 43 (2)
Local interfaces 44 (1)
Container-managed relationships 45 (1)
Entity beans---a closer look 45 (5)
Employee management 45 (5)
Summary 50 (1)
Antipatterns in this chapter 51 (1)
Bitter interfaces 52 (29)
Building a good interface 53 (4)
Breaking down remote invocation 54 (1)
performance
Passing by reference vs. value 55 (2)
Designing the application tier 57 (3)
Looking back on entity beans 59 (1)
Questioning EJB local interfaces 59 (1)
Antipattern: Local & Remote Interfaces 60 (6)
Simultaneously
Combined interfaces muddle exception 61 (1)
management
Combined interfaces hurt performance 62 (1)
Mini-antipattern: Ubiquitous 63 (1)
Distribution
Mini-antipattern: Transparent 63 (1)
Distribution
Solution: Achieving equilibrium 64 (1)
Knowing when to distribute 65 (1)
Antipattern: Customers in the Kitchen 66 (7)
Nudging the diners toward the door 68 (2)
Solution: Funnel the customers through 70 (1)
a waiter
Using Data Transfer Objects 71 (2)
Antipattern: Custom DTOs 73 (4)
Solution: Refactor to preserve 75 (2)
flexibility
Summary 77 (1)
Antipatterns in this chapter 78 (3)
Part 2 Sessions and Messages 81 (130)
Bitter sessions 83 (43)
Threading and synchronization 85 (7)
Antipattern: Tangled Threads 86 (1)
Solution: Standardization to the rescue 87 (1)
Coping with hung threads 88 (2)
Searching for a solution 90 (2)
Handling exceptions 92 (7)
Mini-antipattern: Logic in Exception 92 (1)
Implementations
Solution: Refactor logic out of 93 (1)
exceptions
Antipattern: Swallowing Exceptions 94 (1)
Solution: A simple exception handling 95 (2)
strategy
Antipattern: Killer System Exceptions 97 (1)
Solution: Throw the correct exception 98 (1)
type
Iterating large datasets 99 (12)
Antipattern: Database Connection Hog 101 (2)
Solution: Manage connections with 103 (1)
surgical precision
Antipattern: Eager Iterator 103 (3)
Solution: Test, test, test 106 (1)
Caching results 107 (1)
Exporting results 108 (1)
Determining the size of a result set 109 (1)
Iterating shuffled data 110 (1)
Interoperating efficiently 111 (9)
Using IIOP 112 (1)
Antipattern: Narrow Servlet Bridges 113 (1)
Solution: A generic servlet bridge 113 (7)
Summary 120 (1)
Antipatterns in this chapter 121 (5)
Bitter session states 126 (36)
Making a case for session state 128 (1)
A pivotal antipattern: Conversational 129 (5)
Baggage
The burden of state 130 (1)
Lightening the load 131 (1)
Solution 1: Strive for statelessness 132 (2)
Solution 2: Leverage session state when 134 (1)
beneficial
Managing sessions with stateful session 134 (6)
beans
Shopping using a stateful session bean 135 (1)
Looking under the hood 136 (4)
Managing sessions with servlets 140 (3)
Keeping it simple with HttpSession 140 (1)
Shopping using a servlet 141 (1)
Scaling up servlet sessions 142 (1)
Antipattern: Golden Hammers of Session 143 (8)
State
Storing sessions on the client 144 (1)
Storing sessions on the server using 145 (2)
servlets
Storing sessions on the server using 147 (1)
stateful EJB
Storing sessions in a database 148 (1)
Revisiting the shopping cart 149 (2)
Overall solution: Pick the right tool 151 (1)
for the job
Mini-antipattern: Stateful Session Beans 151 (1)
as Shared Data Caches
Antipattern: Session Hodgepodge 152 (3)
Solution: Be explicit and conservative 154 (1)
Mini-antipattern: Session Thrashing 155 (1)
Mini-antipattern: Rotting Session Garbage 155 (1)
Summary: Taming the beast 156 (1)
Antipatterns in this chapter 157 (5)
Bitter messages 162 (49)
A brief overview of JMS 163 (2)
An early antipattern: Fat Messages 165 (4)
One size doesn't fit all 167 (1)
Solution 1: Put messages on a diet 167 (1)
Solution 2: Use references 168 (1)
Mini-antipattern: Skinny Messages 169 (2)
Solution: Use state to allow lazy 170 (1)
loading
Seeds of an order processing system 171 (6)
Defining the system 171 (1)
Designing messages 172 (1)
Choosing messaging models 173 (1)
Responding to change 173 (2)
Building the OrderRequest producer 175 (2)
Antipattern: XML as the Silver Bullet 177 (2)
Solution: Use XML messages judiciously 177 (2)
Antipattern: Packrat 179 (3)
Putting a price on persistence 179 (2)
Paying for durable subscriptions 181 (1)
Solution: Save only what's important 181 (1)
Mini-antipattern: Immediate Reply 182 (2)
Requested
Using message-driven beans (MDBs) 184 (4)
Pooling with MDBs 184 (1)
Building the OrderRequest consumer 185 (3)
Antipattern: Monolithic Consumer 188 (3)
Listening to the test 188 (1)
Solution: Delegate to modular components 189 (2)
Antipattern: Hot Potato 191 (3)
Solution: Acknowledge the message, not 193 (1)
its result
Antipattern: Slow Eater 194 (1)
Solution: Eat faster, if you can 194 (1)
Antipattern: Eavesdropping 195 (4)
Solution: Use message selectors 196 (1)
Declaring message selectors 197 (1)
Going beyond message selectors 198 (1)
Antipattern: Performance Afterthoughts 199 (2)
Solution: Measure early and often 199 (2)
Summary: Getting the message 201 (1)
Antipatterns in this chapter 202 (9)
Part 3 EJB Persistence 211 (74)
Bitter entities 213 (32)
Understanding entity bean antipatterns 214 (1)
Understanding the entity bean 214 (1)
antipattern landscape
Antipattern: Face Off 215 (7)
Network round-tripping chokes 216 (1)
applications
Losing transactional integrity 217 (2)
Solution: A Session Facade 219 (1)
Using a facade for transactional 220 (1)
integrity
Using local interfaces 220 (2)
Antipattern: Ham Sandwich; Hold the Ham 222 (6)
The choice between BMP and CMP 223 (2)
Solution: Choose CMP when possible 225 (3)
Antipattern: Application Joins 228 (2)
Solution: Delegate joins to the database 228 (1)
Common examples of application joins 229 (1)
Antipattern: Application Filters 230 (3)
Understanding the types of application 230 (3)
filters
Antipattern: Rusty Keys 233 (2)
Solution: shorten your primary key 234 (1)
Antipattern: Revolving Doors 235 (4)
Solution 1: Refactor to avoid 237 (1)
re-entrancy
Solution 2: Disable the container's 238 (1)
re-entrancy checking
Solution 3: Lobby the EJB specification 238 (1)
team
Summary 239 (1)
Antipatterns in this chapter 240 (5)
Bitter alternatives 245 (40)
Understanding entity bean alternatives 246 (3)
Using EJB persistence 249 (11)
Implementing CMP 250 (3)
Adding the DTO and facade 253 (4)
Including deployment details 257 (2)
Rolling your own with BMP entity beans 259 (1)
Simplify with JDBC 260 (7)
Implementing a simple JDBC model 261 (2)
Implementing the JDBC Facade 263 (2)
Deploying a Session Facade for JDBC 265 (2)
Using object persistence frameworks 267 (8)
Surveying the object persistence 267 (2)
landscape
Understanding JDO 269 (1)
Implementing a simple model with JDO 270 (2)
Implementing the JDO model's facade 272 (1)
Deploying the solution 273 (1)
Comparing the options 274 (1)
Antipattern: Persistent Problems 275 (7)
Generic entity bean weaknesses 276 (1)
Inheritance and polymorphism 276 (3)
Query language flexibility is often 279 (2)
critical
DTOs require non-EJB solutions for 281 (1)
local entities
Container-bound persistence 282 (1)
Solution: Do not ``inherit'' a 282 (1)
persistence architecture---choose it
Summary 283 (1)
Antipatterns in this chapter 284 (1)
Part 4 Broader Topics 285 (71)
Bitter tunes 287 (37)
Measures of success 289 (2)
Response time 289 (1)
Throughput 290 (1)
Antipattern: Premature Optimization 291 (5)
Tuning EJB applications blindfolded 292 (1)
Solution 1: Plan, but don't act (yet) 293 (1)
Solution 2: Write well-factored, 294 (2)
modular code
Antipattern: Performance Afterthoughts 296 (2)
Solution: Plan early and often 296 (2)
Grist for the tuning mill 298 (5)
Putting an EJB to the test 299 (1)
Passing the test 300 (1)
Specifying response time as a measure 301 (1)
of success
Seeing light at the end of the tuning 302 (1)
tunnel
Antipattern: Thrash-tuning 303 (2)
Solution: Use a performance testing 304 (1)
methodology
Mini-antipattern: Manual Performance 305 (2)
Testing
Solution: Automate performance testing 306 (1)
Automated performance testing with 307 (8)
JUnitPerf
JUnitPerf overview 307 (1)
Testing response time 308 (1)
Tweaking code 309 (1)
Specifying scalability as a measure of 310 (1)
success
Testing response time under load 310 (2)
Using a connection pool to increase 312 (2)
throughput
Testing throughput 314 (1)
Modeling performance 315 (2)
Mini-antipattern: Stage Fright 317 (1)
Solution: Practice on stage 317 (1)
Summary: Tuning with confidence 318 (1)
Antipatterns in this chapter 319 (5)
Bitter builds 324 (24)
Wrapping big packages without bows 326 (6)
Understanding an example EJB 326 (2)
Organizing your directory structure 328 (1)
Filling the EJB JAR 329 (1)
Loading classes 330 (2)
Antipattern: System Loaded Application 332 (1)
Classes
Solution: Follow the J2EE guidelines 332 (1)
Antipattern: EJB Code Duplication 332 (5)
Solution: Autogenerate the EJB classes 333 (1)
Solution: Autogenerate the manifest 334 (2)
Solution: Autogenerate the EAR 336 (1)
descriptor
Antipattern: Build Guru 337 (2)
Solution: Use Ant for heavy lifting 338 (1)
Antipattern: Running with Scissors 339 (2)
Solution: Test with impunity 339 (2)
Antipattern: Integration Hell 341 (1)
Solution: Integrate early, often, and 341 (1)
automatically
Summary 342 (1)
Antipatterns in this chapter 343 (5)
A bittersweet future 348 (8)
Marking our place in history 349 (2)
Early mistakes 349 (2)
Plotting the next moves 351 (4)
Into the future 351 (2)
Fix persistence 353 (1)
Fix the deployment strategy 354 (1)
Putting the economic house in order 354 (1)
Antipatterns and next moves 355 (1)
A Bitter tales 356 (20)
A Java development free fall 357 (3)
Antipatterns in life 359 (1)
Using design patterns accentuates the 360 (2)
positive
Design patterns online 361 (1)
UML provides a language for patterns 362 (1)
Antipatterns teach from the negative 362 (4)
Some well-known antipatterns 363 (1)
Antipatterns in practice 364 (1)
Antipatterns resources 365 (1)
Antipattern ideas are not new 366 (4)
Learning from the industry 367 (1)
Detective work 368 (2)
Refactoring antipatterns 370 (1)
Why Bitter Java? 370 (4)
The Bitter Java approach 371 (1)
Bitter Java tools 371 (1)
The Bitter Java organization 372 (1)
The Bitter Java audience 373 (1)
Looking ahead 374 (2)
B Bitter basics 376 (25)
Developing in the EJB architecture 378 (6)
Getting acquainted with the cast, the 378 (3)
bean triad
Know your host, the EJB container 381 (3)
Crafting enterprise beans 384 (17)
Defining the client interfaces 385 (5)
Implementing the business logic 390 (7)
Playing it safe with transactions 397 (1)
Configuring the bean 397 (2)
Packaging it 399 (1)
Invoking your beans from a client 400 (1)
bibliography 401 (2)
index 403