[ Pobierz całość w formacie PDF ]

Generic Attribute Access pattern,
38 39
method signatures (see Business D
Interface pattern) data
compiling source code, 157 58 presenting in tables (see JDBC for
Composite Entity Bean pattern, 199 200 Reading pattern)
concurrency redundant translation, 66
domain layer, 132 relational, transferring (see Data
optimistic (see optimistic Transfer RowSet pattern)
concurrency) stale, identifying (see Version
Session Façade pattern, 6 Number pattern)
configuring transferring between layers (see
session beans for JDOs, 190 inter-tier data transfer)
See also customizing transferring in bulk (see bulk data
Container-Managed Persistence (CMP). transfer)
See CMP transferring relational data (see Data
Container-Managed Transactions (CMT), Transfer RowSet pattern)
191 92 See also transactions
cost of operations Data Access Command Bean pattern
Data Transfer HashMap pattern, accessing persistent stores, 81 82
59, 61 advanced JDBC features, 86
Generic Attribute Access pattern, 38 BaseReadCommand.java, code
maintenance costs, 38 listing, 213 14
network overhead, 6 BaseUpdateCommand.java, code
Session Façade pattern, 6 listing, 214 15
coupling code listings, 213 18
client to EJB, 98 99 command inheritance, 84 85
client to object model, 54 cons, 86
client to server, 59 60 data source independence, 85 86
Session Façade pattern, 6, 11 decoupling client from EJB, 81 86,
See also decoupling client from EJB 183
Index 247
definition, 69 costs, 59, 61
InsertEmployeeCommand.java, code data transfer object layers, 59
listing, 215 16 definition, 46
interface consistency, 86 description, 59 62
and JDBC for Reading pattern, 86 and the development process, 140
persistence layers, 85, 131 and DTOs, 59
pros, 85 86 maintainability, 61
QueryEmployeeByName.java, code mapping data objects to clients, 61
listing, 217 18 primitives, wrapping, 62
See also EJB Command pattern pros, 61
Data Access Object pattern, 79, 131 strong typing, 61
database operations See also EJB Command pattern;
consistency checking (see Version Generic Attribute Access pattern
Number pattern) Data Transfer Object Factory. See
generating primary keys (see DTOFactory
Sequence Blocks pattern; Stored data transfer object layers, 59
Procedures for Autogenerated Data Transfer Object pattern
Keys pattern; UUID for EJB bulk data transfer and update, 52
pattern) creating, 28, 49
initializing during development, customizing, 56 58
165 67 and Data Transfer HashMap pattern,
inserting data with stored 59
procedures, 118 20 decoupling data from objects (see
passing ResultSet data (see Data Data Transfer HashMap pattern)
Transfer RowSet pattern) definition, 45
database operations, direct access description, 47 50
cons, 81 and the development process, 138 39
pros, 130 development strategy, 201
stored procedures, 183 domain layer, 133
See also JDBC for Reading pattern and ejbCreate method, 204
database operations, relational databases granularity, 49
autogenerated keys (see Stored graphing, 30
Procedures for Autogenerated vs. RowSets, 65
Keys pattern) and XML, 204
direct access (see JDBC for Reading See also DTOFactory; Session Façade
pattern) pattern
database transactions. See data; data transfer objects
transactions aggregate, 53
data objects, mapping to clients, 61 changing, 26
Data Transfer HashMap pattern creating, 49
attribute key values, maintaining, 61 data transfer patterns. See Custom Data
casting requirements, 62 Transfer Object pattern; Data Transfer
client coupling to server, 59 60 HashMap pattern; Data Transfer Object
compile-time checking, 61 pattern; Data Transfer RowSet pattern;
cons, 59 62 Domain Data Transfer Object pattern
248 Index
Data Transfer RowSet pattern entity beans, overhead, 182
automation, 66 server resources, 19
column names, 66 Session Façade pattern, effects of,
common query interface, 66 18 19
cons, 64, 66 67 development process, strategies
definition, 46 Aggregate entity bean pattern,
and the development process, 140 199 200
disconnected RowSets, 64 Coarse-Grained entity bean pattern,
domain model, 66 199 200
vs. DTOs, 65 Composite Entity Bean pattern,
and JDBC for Reading pattern, 63 67 199 200
object orientation, 66 Data Transfer Object pattern, 201
performance, 64 delegation schemes, 200
pros, 66 dependent objects, 199
query results, compile-time deprecated patterns, 199 200, 201
checking, 67 ejbCreate method, DTOs, 204
redundant data translation, 66 ejbCreate method, parameters, 203 4
transferring relational data, 63 67 getting/setting bulk data, 201
updates from applications, 67 getXXX/setXXX methods, 200
data typing Java singletons, 201 2
strong, 38 39, 61 local interfaces, 200
weakly-typed input parameters, 16 message-driven beans, type
decoupling client from EJB checking, 202 3
DTO-related logic, 26 29 naming conventions, 200
errors caused by, 40 rolling back transactions, 203
interface definition, 40 setRollBack(), 203
See also Business Delegate pattern; updates, scheduled vs. real-time,
coupling; Data Access Command 201 2
Bean pattern; Data Transfer value objects, 201
HashMap pattern; EJB Command XML as a DTO mechanism, 204
pattern development process, walkthrough
delegating method calls, 100 administering the development [ Pobierz całość w formacie PDF ]

  • zanotowane.pl
  • doc.pisz.pl
  • pdf.pisz.pl
  • blogostan.opx.pl