Neward T.
Table of contents :
brief contents……Page 5
contents……Page 7
foreword……Page 13
preface……Page 15
acknowledgments……Page 19
about this book……Page 21
goals of this book……Page 27
about the author……Page 29
about the cover illustration……Page 31
1.1.1 What is enterprise development?……Page 33
1.1.2 Developing the enterprise application……Page 36
1.1.3 Reinventing the wheel……Page 39
1.2 Three zeroes……Page 40
1.2.1 Zero development……Page 41
1.2.2 Zero deployment……Page 43
1.2.3 Zero administration……Page 44
1.3.2 Alternate views……Page 46
1.4 Why Java?……Page 47
1.4.1 Criticisms of Java as a server-side language……Page 49
1.5 Summary……Page 57
1.6 Additional reading……Page 58
ClassLoaders……Page 59
2.1.1 Run-time dynamic loading……Page 60
2.1.2 Reflection……Page 63
2.2.1 Java .class file format……Page 69
2.2.2 Using ClassLoader……Page 71
2.2.3 java.lang.ClassLoader……Page 73
2.2.4 Java name spaces……Page 80
2.3.2 java.net.URLClassLoader……Page 81
2.3.5 Bootstrap ClassLoader……Page 89
2.4 Summary……Page 90
2.5 Additional reading……Page 91
3.1 Extending ClassLoader……Page 93
3.1.1 FileSystemClassLoader……Page 94
3.1.2 HashtableClassLoader……Page 98
3.1.3 CompilerClassLoader……Page 99
3.1.4 StrategyClassLoader and ClassLoaderStrategy……Page 103
3.1.5 CompositeClassLoader……Page 107
3.1.6 Other ClassLoader tricks……Page 111
3.2 On-the-fly code upgrades……Page 112
3.3.1 Goals……Page 117
3.3.2 Service……Page 118
3.3.3 Server……Page 120
3.3.4 ServerManager……Page 122
3.4 Summary……Page 124
Extensions……Page 125
4.1.1 Installed extensions……Page 126
4.1.2 Building an installed extension……Page 127
4.1.3 Download extensions……Page 128
4.1.4 Building a download extension……Page 130
4.2.1 Distributed libraries through download extensions……Page 132
4.2.2 Java EXEs; relation to C++ static linking……Page 133
4.3 Packaging extensions……Page 134
4.3.1 The build-time vs. run-time dilemma……Page 135
4.4 The plug-in……Page 136
4.4.1 The plug-in concept……Page 137
4.4.2 Enter plug-ins……Page 139
4.4.3 Marking a .jar file as a plug-in……Page 142
4.4.4 PluginClassLoader……Page 143
4.4.5 Example: PluginApp……Page 150
4.4.6 Uses for plug-ins……Page 156
4.5 Summary……Page 157
Threads……Page 158
5.1.1 Concurrent processing……Page 159
5.1.2 Scalability per machine……Page 160
5.1.3 Encapsulation……Page 161
5.2 Java threads……Page 162
5.2.1 java.lang.Thread and java.lang.Runnable……Page 163
5.2.2 Starting threads……Page 169
5.2.3 Stopping threads……Page 171
5.2.4 Daemon threads……Page 174
5.2.5 Threads and ClassLoaders……Page 175
5.2.6 java.lang.ThreadGroup……Page 176
5.3 Thread implementations in Java……Page 178
5.3.3 Hybrids……Page 179
5.5 Additional reading……Page 180
Threading issues……Page 181
6.1 Synchronization……Page 182
6.1.1 Thread-local storage……Page 184
6.2 Exception-handling with multiple threads……Page 185
6.3.1 Client-Dispatcher-Server……Page 190
6.3.2 Fire-and-forget……Page 191
6.3.4 SpinLoop……Page 192
6.3.5 Polling (PeriodicThread)……Page 193
6.3.6 DelayedFire (ScheduledThread)……Page 195
6.3.7 Futures……Page 196
6.4 GJAS……Page 198
6.4.1 Adding thread support to GJAS……Page 199
6.6 Additional reading……Page 205
Control……Page 206
7.1.1 Local implementation……Page 207
7.1.2 Example: HelloService……Page 218
7.2 Testing the LocalServer implementation……Page 219
7.3 ExecService……Page 221
7.4 HelloAgainService……Page 225
7.4.1 ThreadServer……Page 228
7.4.2 Example: ConsoleControlService……Page 233
Remote control……Page 240
8.1 RMI implementation……Page 241
8.1.1 Analysis……Page 249
8.2 Other implementations……Page 250
8.3 Necessary improvements……Page 251
8.4 Additional reading……Page 256
9.1 Java models……Page 257
9.1.1 Interface: ConfigProperty and ConfigProperties……Page 258
9.1.2 Usage……Page 265
9.1.3 Configuration front ends……Page 267
9.2 Summary……Page 268
10.1 Simple socket services……Page 269
10.1.1 SocketClient……Page 270
10.1.2 EchoService……Page 275
10.1.3 TimeService……Page 277
10.1.4 Analysis……Page 278
10.2.1 SocketServer……Page 279
10.2.2 Example: Echo2Service……Page 286
10.3 Connection and ConnectionManager……Page 287
10.3.1 Example: EchoConnection……Page 294
10.3.2 Example: HTTPConnection……Page 295
10.3.3 Servlets……Page 304
10.4.1 SocketClassLoader and SocketClassService……Page 305
10.4.2 Concept: RedirectorService……Page 311
10.4.3 Concept: FilterService……Page 312
10.5 Summary……Page 313
10.6 Additional reading……Page 314
11.1 Relationship to sockets……Page 315
11.1.1 CodeServlet: A filtering servlet……Page 317
11.1.2 HeaderFooter: a redirecting servlet……Page 319
11.1.3 Server-side scripting capabilities……Page 321
11.1.4 Servlets: Not just about HTML anymore……Page 322
11.2 Servlets and the n-tier application……Page 324
11.3 Servlets as a poor man’s RMI……Page 325
11.3.1 Example: RemoteStorageServlet……Page 327
11.3.2 Concept: poor man’s RMI……Page 329
11.5 Additional reading……Page 330
Persistence……Page 332
12.1 Java Serialization……Page 333
12.1.1 Serialization to other places……Page 334
12.1.2 Security and Serialization……Page 335
12.1.3 Customized Serialization……Page 338
12.1.4 Serialization and evolution……Page 341
12.1.5 Replacement……Page 345
12.2.1 Remote storage of objects……Page 349
12.2.2 Example: RemoteStorageService and RemoteStorageClient……Page 350
12.2.3 Remote construction of objects……Page 355
12.2.4 Example: RemoteObjectFactory……Page 357
12.3 JDBC……Page 362
12.3.1 Transient data, state data, data that isn’t data……Page 364
12.3.2 Example: JDBCClassLoader……Page 366
12.4 Summary……Page 370
12.5 Additional reading……Page 371
13.1 Modeling data……Page 372
13.1.2 One-tier systems……Page 373
13.1.4 n-tier systems……Page 374
13.1.5 Benefits of an n-tier model……Page 375
13.1.7 Example: employee directory……Page 378
13.1.8 Business objects layer interface layer……Page 380
13.2.2 Example: OrgTree……Page 398
13.3 Summary……Page 402
13.4 Additional reading……Page 403
14.1 Example: HashtableModel……Page 404
14.1.1 Overview……Page 405
14.1.2 HashtablePerson, HashtableEmployee, HashtableManager……Page 406
14.1.3 HashtableModel: Creating objects……Page 407
14.1.4 HashtableModel: Finding objects……Page 410
14.1.6 Conclusion……Page 411
14.2 Example: RDBMSModel……Page 412
14.2.1 RDBMSModel: Storing Business Objects in an RDBMS……Page 413
14.2.2 Overview……Page 414
14.2.3 RDBMSPerson, RDBMSEmployee, RDBMSManager……Page 416
14.2.4 RDBMSModel: Creating objects……Page 423
14.2.5 RDBMSModel: Finding objects……Page 426
14.2.6 RDBMSModel: Removing objects……Page 427
14.2.7 Conclusion……Page 429
14.3 Summary……Page 432
14.4 Additional reading……Page 433
15.1 Why distribute?……Page 434
15.1.1 Communication……Page 435
15.1.2 Performance……Page 436
15.1.3 Economics (clustering/fault-tolerance)……Page 437
15.2.1 Stateful vs. stateless……Page 438
15.3 Technologies……Page 442
15.3.1 Raw access: Sockets……Page 443
15.3.2 Java RPC: remote method invocation……Page 444
15.3.3 Analysis……Page 449
15.3.4 RMI/JRMP……Page 451
15.3.5 Object Request Brokers: CORBA……Page 460
15.3.6 Object Request Brokers: Distributed Component Object Model……Page 464
15.3.7 Message-Oriented Middleware: JMS……Page 465
15.3.8 Objects across the wire: Mobile objects……Page 467
15.3.9 Objects across the wire: shared objects……Page 473
15.4 Employee middleware models……Page 480
15.4.1 RMI implementation……Page 483
15.4.2 JSDTModel: Shared-object implementation……Page 484
15.4.3 Analysis……Page 492
15.5 Additional reading……Page 493
Java Native Interface……Page 495
16.1 Java Native Interface……Page 496
16.1.1 Native code on the server……Page 497
16.2.1 Java calling native……Page 504
16.2.2 Native calling Java……Page 510
16.2.3 JNI invocation……Page 516
16.2.4 JNI changes in JDK 1.2……Page 524
16.3.2 CORBA……Page 526
16.4.1 Making GJAS an NT service……Page 527
16.4.2 Using NT IPC mechanisms: Named pipe……Page 528
16.5.1 Debugging support……Page 538
16.5.2 JVMDI……Page 539
16.7 Additional reading……Page 540
17.1 Importance grows……Page 542
17.1.1 Liveness……Page 543
17.1.2 Notification……Page 555
17.2 Summary……Page 565
epilogue……Page 567
Where to go from here?……Page 574
Read all about CORBA……Page 576
Summary……Page 577
C……Page 579
D……Page 580
E……Page 581
H……Page 582
J……Page 583
M……Page 584
P……Page 585
S……Page 586
Z……Page 588
Reviews
There are no reviews yet.