Index

 
Symbols
 
#springBind 326, 331
#springBindEscaped 327
*, regular expression 110
+, regular expression 109
., regular expression 109
.NET 195, 226
\ , regular expression 110
_target 297
 
Numerics
 
80–20 rule 144
 
A
 
AbstractCommandController
example of 287
for forms 290
in Controller hierarchy 283
when to use 285
wiring 288
AbstractController
example of 285
for forms 290
implementing 286
in Controller hierarchy 283
when to use 285
wiring 287
AbstractExcelView
buildExcelDocument 339
content type 340
decoupling from model 340
described 338
example of 338
AbstractFormController
in Controller hierarchy 283
when to use 285
AbstractJmsMessageDrivenBean 232
AbstractMessageDrivenBean 232
AbstractPdfView 310, 341
example of 341
AbstractStatefulSessionBean 232
AbstractStatelessSessionBean 232
AbstractWizardFormController
_cancel 298
_finish 298
_target 297
example of 295
getInitialPage() 297
getTargetPage() 297
in Controller hierarchy 283
motivations 295
pages 296
processCancel() 298
processFinish() 296–297
validatePage() 299
validating 299
when to use 285
AcceptAnyCasProxy, defined 387
access decision manager, explained 370
AccessDecisionManager
decide() 389
defined 389
implementations of 389
supports() 389
AccessDecisionVoter
defined 390
See also RoleVoter
Acegi authentication-processing filter 401
Acegi Security System 31
authentication entry point 400
enforcing security 397
fundamentals of 369
overview of 368
security interceptor 369
servlet filters 393
ACID 176
Action, Struts class 38
ActionForm, compared to MVC command 289
ActionSupport
benefits 349
defined 349
drawbacks 349
example of 349
advice
types 97
wiring 100
advisor 107, 127
AffirmativeBased 390
after advice 101
afterPropertiesSet() 58
afterReturning() 101
AfterReturningAdvice 98, 101–102
compared to MethodInterceptor 103
example of 102
afterThrowing() 104
annotations 11
Ant
<javac> 200
with Jakarta Commons Attributes 199
AOP 4, 9, 57
and declarative transactions 183
aspects as a blanket 26
cross-cutting concerns 25
declarative transactions 32
for reuse 93
frameworks 95
illustrated 95
in the enterprise 30
orthogonal services 28
proxying classes 96
separation of concerns 25
special syntax 96
Spring module 10
Spring?s implementation 95
terms 93
AOP Alliance 10
benefits of 97
defined 97
MethodInterceptor 104
AopContext 122
Apache OJB. See OJB
applets 4
application server 241
ApplicationContext 44, 46, 90
bean lifecycle 49
getBean() 47
getMessage() 85
implementations of 44, 46
lazy loading 47
publishEvent 87
publishing events 46
singleton beans 47
ApplicationContextAware 50, 87, 89
drawback of using 88, 90
setApplicationContext() 89
ApplicationContextAwareProcessor 76
See also ApplicationContextAware
ApplicationContextFactory 46
ApplicationEvent 85–86
ApplicationListener 85–87, 361
onApplicationEvent() 86
ApuKwikEMart 98
around advice 102
aspect
as Java class 95
defined 93
AspectJ 96
field joinpoints 97
Aspect-Oriented Programming. See AOP
asynchronous operation 256
atomic 176
attributes 195
AttributesTransactionAttributeSource
Jakarta Commons Attributes 197
wiring 196
Auditable 115
AuditableMixin 116
AuthByAuthenticationProvider
defined 372
See also ProviderManager
authentication
entry point diagrammed 401
using database 373
authentication manager 370
authentication processing filter
diagrammed 401
AuthenticationDao 375
See also DaoAuthenticationProvider
AuthenticationManager 371
See also ProviderManager
AuthenticationProcessingFilter 401
AuthenticationProcessingFilterEntryPoint 400
wiring 403
AuthenticationProvider
authenticate() 373
implementations of 372
autodetect, autowiring type 70
autoproxing 124
autowiring 69
autodetect 70–71
by deafult 72
byName 70–71
byType 70–71
constructor 70–71
handling ambiguities 71
motivations 72
using with caution 72
with explicit wiring 72
with HibernateTemplate 162
Avalon 38
AWT, compared to JSF 357
 
B
 
Babel Fish 234
Bad Thing 134
BaseCommandController
in Controller hierarchy 283
when to use 285
BaseEngine, replacing 353
BasePage, example of 355
Basic authentication
BasicProcessingFilter 402
BasicProcessingFilterEntryPoint 402
defined 401
BasicDataSource 138
BasicProcessingFilter 401
wiring 402
BasicProcessingFilterEntryPoint 400
wiring 402
batch updates 148
BatchPreparedStatementSetter 148
Batman 142
BEA WebLogic 274
bean 54, 61
<constructor-arg> subelement 65
defining 55
destroy-method attribute 57
init-method attribute 57
parent attribute 202
post-processing 74
<property> subelement 59, 61
singleton attribute 56
bean attribute 202
bean inheritance 202
bean lifecycle 47
<bean> 54–57, 59, 61, 65, 202
BeanCounter example 77
BeanFactory 10, 44, 90
addBeanPostProcessor() 76
bean lifecycle 47
creating 45
dependency injection 45
getBean 15
getBean() 45
implementations of 44
BeanFactoryAware 48, 87, 89
drawback of using 88, 90
setBeanFactory() 89
BeanFactoryPostProcessor 76
implementations of 77
postProcessBeanFactory() 77
registering 77
BeanNameAutoProxyCreator 124–125
BeanNameAware 47, 87
drawback of using 88
setBeanName() 88
use of 89
BeanNameHandlerMapping, defined 279
BeanNameUrlHandlerMapping
as default HandlerMapping 277
drawbacks 280
example of 280
when to define 280
with Struts 351
BeanNameViewResolver
compared to ResourceBundleViewResolver 311
compared to XmlFileViewResolver 311
defined 308
wiring 310
BeanPostProcessor 48, 74
DefaultAdvisorAutoProxyCreator 127
example of 74
implementations of 76
postProcessAfterInitialization() 74
postProcessBeforeInitialization() 74
registering 76
<beans> 54, 72
<default-autowire> attribute 72
before advice 99
before() 99
BeforeAdvice 98
bike riding 156
BindStatus 315
blue pill 87
Burlap 209, 218, 220
choosing 219
compared to SOAP 218
compared to XML-RPC 218
exporting in Spring 223
BurlapProxyFactoryBean 219
BurlapServiceExporter 223
byName, autowiring type 70
ByteMessage 265
byType, autowiring type 70
 
C
 
caching 156
CallableStatementCallback, example of 152
callback 182
CAS
benefits of 386
CasAuthenticationProvider 373
CasProcessingFilterEntryPoint 405
history 385
proxy services 387
reference 385
workflow 385
CasAuthenticationProvider
defined 372, 386
wiring 386
CasByAuthenticationProvider. See ProviderManager
cascading 156
CasProcessingFilter 401
CasProcessingFilterEntryPoint 400
wiring 405
CasProxyTicketValidator 386
Caucho Burlap. See Burlap
Caucho Hessian. See Hessian
Caucho Technology 218
Central Authentication Service. See CAS
CGLIB 122
JAR file 96
to create AOP proxy 96
checking luggage 139
Class, wiring with ClassEditor 80
ClassEditor 80
ClassFilter 106, 113
ClassFilter.TRUE 106
ClassPathXmlApplicationContext 46
compared to FileSystemXmlApplicationContext 47
creating 47
defined 54
CleanupFailureDataAccessException 136
CMT 177, 206
compared to NameMatchTransactionAttributeSource 194
transaction propogation 186
collections, wiring 61
command controller 287
CommonsAttributes 282
described 197
wiring 197
See also DefaultTransactionAttribute; RuleBasedTransactionAttribute
CommonsPathMapHandlerMapping
defined 280
wiring 281
compile-time weaving 94
ComponentControllerSupport, example of 336
ComposablePointcut 113
Connection 141
commit() 179
obtaining with Spring 137
rollback() 179
with PreparedStatementCreator 146
with transactions 179
connection pool 138
ConsensusBased 390
consistent 176
constructor injection 64–65
advantages 65, 68
ambiguous arguments 66
compared to setter injection 68
disadvantages 69
example of 52
motivations to use 54
UnsatisfiedDependencyException 67
when to use 69
constructor, autowiring type 70
<constructor-arg>
<bean> subelement 65
choosing order vs type 68
index attribute 67
order arguments 67
resolving by type 67
typeattribute 67
consumer, message 256
container-managed transactions. See CMT
content type 340
ContextClosedEvent 85
ContextLoaderListener 274
configuring context locations 274
configuring in web.xml 274
when to use 274
with Acegi 397
with JSF 360
with Tapestry 354
with WebWork 363
ContextLoaderPlugIn
configuring 348
when delegating 350
ContextLoaderServlet 274
configuring context locations 274
configuring in web.xml 274
when to use 274
with Acegi 397
with Tapestry 354
with WebWork 363
ContextRefreshedEvent 85
ControlFlowPointcut 111–112
Controller 225
compared to HttpServlet 276
compared to Struts Action 276
described 276
hierarchy 283–284
implementing 283
in request lifecycle 271
when to use 285
wiring 276
CORBA 212
corrupt data 134
CosMailSenderImpl 245
coupling
example of 20
static coupling 19
See also decoupling
credit card 209
cron 253
CronTriggerBean 252–253, 255
example of BeanNameAware 88
time elements 253
cross-cutting concerns
defined 92
illustrated 92
modularizing 93
Cruise, Tom 127
CustomDateEditor 80
CustomEditorConfigurer 77, 82, 90
registerCustomEditor() 82
 
D
 
DAO
accessing with interfaces 134
advantages of 134
callback 140
defined 134
template 140
unit testing 134
DaoAuthenticationProvider
authenticationDao 375
caching 381
compared to PasswordDaoAuthenticationProvider 374
defined 372
diagram of 374
encrypting passords 379
passwordEncoder 380
userCache 381
wiring 374
See also ProviderManager
DaoCasAuthoritiesPopulator, wiring 388
data access object. See DAO
DataAccessException
as unchecked exception 136
benefits of 135
hierarchy 136
DataAccessResourceFailureException 136
database driver 149
database operation object 152
compared to JdbcTemplate 154
compiling 153
when to use 154
database, for authentication 373
DataFieldMaxValueIncrementer
defined 155
DataIntegrityViolationException 136
DataRetrievalFailureException 136
DataSource
creating connection pool 138
in JNDI 137
JNDI lookup 241
transactions 178
with DataSourceTransactionManager 179
with JdbcTemplate 144
with LocalPersistenceManagerFactoryBean 164
with LocalSessionFactoryBean 160
with MappingSqlQuery 154
with OJB 169
DataSourceTransactionManager
defined 178
when to use 178
wiring 178
Date, wiring with CustomDateEditor 80
DeadlockLoserDataAccessException 136
declarative transactions 7, 177
example of 32
decoupling, with interfaces 19
See also coupling
default autowire 72
DefaultAdvisorAutoProxyCreator 124, 126, 128, 205
for transactions 203
defaultDestination 260
DefaultIntroductionAdvisor 119
DefaultTransactionAttribute
example of 190, 198
wiring 190
DelegatingActionProxy
benefits of 351
configuring 351
drawbacks 351
Spring configuration file 351
DelegatingIntroductionInterceptor 117–118
DelegatingRequestProcessor
described 352
shortcut 352
DelegatingTilesRequestProcessor 352
delegation, for reuse 92
dependency injection 45
compared to JNDI 243
defined 16
in JSF 359
deserialization 47, 120
Destination 260
destroy 49
destroy(), DisposableBean method 58
destroy-method, <bean> attribute 57
benefits of 58
example of 57
destruction 57
dirty read 186
DispatcherServlet 221, 225
as front controller 271
configuring in web.xml 272
in request lifecycle 271
naming 272
DisposableBean 49, 58
when to use 58
distributed transactions, Spring support 177
doclet tags 197
class level 198
method level 198
parsing 199
DriverManagerDataSource 139, 244
duplicate code 24
durable 176
dynamic pointcut 94, 106, 111, 113
performance considerations 113
dynamic proxies 122
 
E
 
eager fetching 156
ehcache 381
EhCacheBasedUserCache 381
EJB 8, 206, 232
accessing with Spring 226
as a specification 34
CMT 177
compared to JDO 164
compared to Spring 33
complexities 6, 35
declarative security 31
declarative transactions 31, 183
deployment descriptor 4–5
developing with 5
distributed components 4
EJBHome 7
Entity Beans 36
feature comparisons 34
home interface 5, 227, 229
integration 10
JNDI lookup 7
local interface 5, 228
proxying 228
remote interface 228
remote transactions 35
remoting 208–209, 211
rollback behavior 193
security 4
services 6
specification 4
Spring support classes 232
transaction propogation 186
transaction support 177
EjbServiceExporter 232
e-mail
sending with Spring 244
Spring support 241
template message 245
encryption, salt source 380
Enterprise JavaBeans. See EJB
entity beans 36
compared to JDBC 141
error messages, JSP 316
Errors 292
event handling 85
event publishing 86
exception handling in DAO templates 140
Expert One-on-One, J2EE Design and Development 8
 
F
 
façade pattern 178, 232
FacesServlet, servlet filters 362
FacesSpringVariableResolver
described 359
features 360
wiring 360
factory pattern 45
File wiring with FileEditor 80
FileEditor 80
FileSystemXmlApplicationContext 46
compared to ClassPathXmlApplicationContext 47
creating 46
defined 54
FilterSecurityInterceptor 398
See also SecurityEnforcementFilter
FilterToBeanProxy 395
bean reference 396
configuring 395–396
explained 395
in general use 397
in web.xml 399
targetClass 396
firewall
with Burlap 223
with Hessian 223
with RMI 217
flexible design 134
Ford, Henry 320
foreach 322
form validation 292
forms
cancelling 298
handling 289
multiple pages 294
Fowler, Martin 16
Patterns of Enterprise Application Architecture 176
FreeMarker 10, 307, 320
compared to JSP 320
compared to Velocity 327
configuring properties 329
exposing model 330
features 327
macros 331
resolving views 330
Spring integration 329
template example 328
template path 329
web site 329
with InternalResourceViewResolver 308
FreeMarkerConfigurer
compared to VelocityConfigurer 329
freemarkerSettings 329
template_update_delay 329
templateLoaderPath 329–330
wiring 329
FreeMarkerViewResolver
exposeMacroHelpers 331
exposeRequestAttributes 330
exposeSessionAttributes 330
wiring 330
FrequentCustomerAdvice 109
Friends 368
front controller 271
Fudd, Elmer 74
 
G
 
GET 290
global 353
GoldbergRube 270
Good Thing 134
 
H
 
HandlerMapping
described 279
implementations of 279
in request lifecycle 271
ordering 282
using multiple implementations 282
handling events 85
heavyweight containers 6
Hello World 12
GreetingService 12
GreetingServiceImpl 13
XML configuration 13
Hessian 209, 218, 220
choosing 219
compared to RMI 218
Controller 221
exporting with Spring 220
writing a service 220
HessianProxyFactoryBean 219
HessianServiceExporter 221
compared to RmiServiceExporter 221
HessianServlet 220
Hibernate 11, 40, 120, 134
caching 157
compared to Entity Beans 36
compared to iBATIS SQL Maps 166
compared to JDBC 141
configuring 158
distributed caching 157
eager fetching 157
features 157
lazy loading 157
mapping files 158, 160–161
properties 160
Spring abstraction layer 241
Spring transaction support 177
transactions 178–180
Hibernate in Action 157
HibernateCallback
as inner class 162
defined 162
using implicitly 162
HibernateDaoSupport, example of 163
HibernateException 135
HibernateTemplate
autowiring 162
convenience methods 162
find() 163
load() 162
queries 163
update() 163
wiring 161
with HibernateCallback 162
with HibernateDaoSupport 163
HibernateTransactionManager 33
defined 178
wiring 179
Hitchhikers Guide to the Galaxy, The 234
HiveMind 38
HQL 163
HTTP
Basic authentication 401
challenges of using 270
GET 290
POST 290
HTTP invoker 208, 224
exposing services 225
limitation 226
HTTP tunneling 218
HttpInvokerProxyFactoryBean 224
HttpInvokerServiceExporter 225
HttpServlet 111
compared to Controller 276
HttpSession, CAS tickets 388
hubris 244
Hunter, Jason 245
Husted, Ted 39
Hypersonic, generating sequences 155
 
I
 
I18N 10, 12, 46
configuring with MessageSource 83
iBATIS SQL Maps 11, 40
compared to Hibernate 166
configuring 167
mapping file 167
web site 166
IBM WebSphere 274
IDL 218
impatience 244
implementsInterface() 115, 117
IncorrectUpdateSemanticsDataAccessException 136
index, <constructor-arg> attribute 67
inheritance, for reuse 92
initialization 57
InitializingBean 58
DAO support classes 141
when to use 58
init-method, <bean> attribute 57
InMemoryDaoImpl
limitations of 376
passwords 376
roles 376
userMap 375
usernames 376
when to use 375
wiring 375
See also AuthenticationDao
inner beans 61
int, querying for 151
interceptor. See around advice
interceptorNames 122–123
interface21 8
InternalPathMethodNameResolver 303
InternalResourceViewResolver
as default ViewResolver 277
compared to VelocityViewResolver 323
defined 307
viewClass 310, 335
wiring 277, 309
with Jakarta Tiles 334
internationalization. See I18N
intersection() 113
introduction 97, 115
compared to other advice types 105
considerations 120
defined 94
IntroductionAdvisor 119
IntroductionInterceptor 117, 119
IntroductionMethodInterceptor 115
example of 116
InvalidDataAccessApiUsageException 137
InvalidDataAccessResourceUsageException 137
Inversion of Control. See IoC
invoke() 115, 117
IoC 4
Constructor Injection 37
in enterprise applications 23
Setter Injection 37
to create associations 44
to manage components 44
types of 37
isMatch() 107
isolated 176
isolation levels 186
consequences of 187
dirty read 186
in Spring 187
non-repeatable read 187
phantom read 187
transaction property descriptor 192
isRuntime() 106, 113
iText 341
 
J
 
J2EE 5
J2EE Web-Services 234
JaasAuthenticationProvider 373
defined 372
See also ProviderManager
Jakarta Commons Attributes 196–197, 199
background 197
configuring Ant 199
configuring Maven 200
doclet tags 197
precompiler 199
Jakarta Commons DBCP 138
Jakarta Commons Validator 39
Jakarta POI 339
Jakarta Struts
Action 276
ActionForm 288
compared to Spring MVC 38, 283
coupling with Spring 349
DispatchAction 303
history of 347
plugin 348
proxy action 351
Spring-aware Action 348
Jakarta Tiles 320, 332
as part of Struts 332
definition file 333
personalization 335
template example 332
Java 2 Enterprise Edition. See J2EE
Java Data Objects. See JDO
Java Message Service. See JMS
Java Naming and Directory Interface. See JNDI
Java Transaction API. See JTA
JavaBeans 44, 55, 122
collaborating with 16
creating with new 47
deserializing 47
in user interfaces 4
loosely coupled 7
specification 4
with Jakarta Commons Attributes 197
JavaMail 245
JavaMailSenderImpl 245
JavaOne 357
JavaServer Faces in Action 357
JavaServer Faces. See JSF
JAX-RPC 209, 211, 233
JaxRpcPortProxyFactoryBean 236–237
JbdcTemplate 145
JBoss, field joinpoints 97
JDBC 134
advantages 141
as objects 152
batch updates 148
boilerplate code 11, 143–144
compared to entity beans 141
compared to Hibernate 141
compared to JDO 141
compared to ORM 156
creating robust code 144
database driver 149
error handling 144
exception handing 136
generating primary keys 155
handling exceptions 142
inserting data 142
performance tuning 141
problems with 142
resource leaks 144
resource management 144
retrieving data 143
shortcomings 156
Spring abstraction layer 241
Spring module 10–11
Spring transaction support 177
transactions 178
type safety 148
types 148
updating data 142
JdbcDaoImpl
customizing 378
customizing queries 377
database tables 376
queries 376
wiring 376, 378
See also AuthenticationDao
JdbcDaoSupport 141
JdbcTemplate
batch updates 148
compared to database operation objects 154
convenience methods 147, 151
debugging 147
described 144
example of 145
execute() 147–148
inserting data 147
logging SQL 146
querying for simple types 151
stored procedures 152
using implicitly 153
using JBDC types 148
wiring 145
with callbacks 145
JDO 11, 40, 134
compared to EJB 164
compared to Entity Beans 36
compared to JDBC 141
exception hierarchy 136
specification 164
Spring transaction support 177
supported in OJB 169
transactions 178, 180
JdoCallback
as inner class 166
defined 165
example of 165
JdoTemplate
convenience methods 166
wiring 165
with JdoCallback 165
JdoTransactionManager
defined 178
wiring 180
JMS 256
callback 258
setting timeout 262
Spring support 241
JMSConnectionFactory 260
JMSException 257
JmsTemplate 258, 261
compared to JmsTemplate102 261
convertAndSend() 265
pubSubDomain 261
receive() 261
receiveAndConvert() 265
receiveTimeout 262
send() 259
using 258
wiring 259
JNDI 137, 227
DataSource lookup 241
in reverse 8
JMSConnectionFactory 260
lookup in EJB 7
retrieving DataSource 241
Spring support 241
support for 10
with JTA 241
JndiObjectFactoryBean 243
for JMSConnectionFactory 260
wiring a DataSource 138
wiring a MailSession 245
Job 251
JobDetail 255
Johnson, Rod 8
joinpoint 115
advice 93
defined 93
joinpoint models 95
on field modification 95
on method invocation 95
JSF
compared to AWT 357
compared to Swing 357
configuration file 358
dependency injection 359
event handling 361
example page 357
history of 357
managed bean 358–359
<managed-property> 360
setter injection 359
specification 357
Spring integration 357
tags 358
<variable-resolver> 359–360
wiring beans 360
JSP
${} 322
binding forms 315
error messages 316
for HTML 320
for XML 320
limitations 320
tags 314
with InternalResourceViewResolver 308
JSR-109 236
JSR-175 196
JSTL, with Tiles 335
JstlView
wiring 310
with InternalResourceViewResolver 310
JTA 178
Spring transaction manager 178
with EJB 177
JtaTransactionManager
defined 178
transactionManagerName 181
wiring 181
jwcid, example of 352
 
K
 
Knight of the Round Table
executing 22
HolyGrailQuest 17
KnightOfTheRoundTable 16, 27
KnightOfTheRoundTableTest 17
MinstelAdvice 28
Minstrel 27
Quest 21
Spring configuration file 22
weaving advice 29
KwikEMart example 98
ThankYouAdvice 102
WelcomeAdvice 99
KwikEMartExceptionAdvice 104
 
L
 
laziness 244
lazy loading 156
lazy-init, with EJB proxies 229
LDAP, for authenticating 382
LdapPasswordAuthenticationDao, configuring 383
Leave it to Beaver 368
lightweight containers
alternatives to Spring 36
defined 8
lightweight directory access protocol. See LDAP
<list> 62
load-time weaving 95
LocaleEditor 80
LocalPersistenceManagerFactoryBean 164
wiring 164
LocalSessionFactoryBean
DataSource 160
mappingDirectoryLocations 161
mappingResources 160
wiring 159
wiring JNDI DataSource 244
LocalStatelessSessionProxyFactoryBean 228–230
logging, as an aspect 93
loose coupling, benefits of 7
Lotus Notes 245
 
M
 
MaidService 108–110
MailSender
defined 244
implementations of 244
in use 246
wiring 245
MailSession 245
managed-property 360
Mann, Kito D. 357
<map> 63
MapMessage 258, 265
using 258
MappingSqlQuery
example of 154, 378
using 154
with JDbcDaoImpl 377
MatchAlwaysTransactionAttributeSource 190
configuring 190
defined 189
example of 189
when to use 190
matches()
ClassFilter 106
MethodMatcher 106, 113
Matrix, The 87
Maven, with Jakarta Commons Attributes 200
McClanahan, Craig
and JSF 357
Struts 347
Md5PasswordEncoder 379
Message 258, 262
casting to MapMessage 262
message queue 256
MessageConverter
example of 263
fromMessage() 264
toMessage() 264
wiring 264
See also SimpleMessageConverter
MessageCreator 259
messages
accessing with JSP tag 85
configuring with MessageSource 83
consuming 261
converting 263
sending 257
MessageSource 84
metadata 11, 128
autoproxying 128
with transactions 195
MethodBeforeAdvice 28, 99, 102
compared to MethodInterceptor 103
example of 99
wiring 100
MethodInterceptor 98, 102
compared to AfterReturningAdvice 103
compared to MethodBeforeAdvice 103
example of 103
IntroductionMethodInterceptor 115
MethodInvokingJobDetailFactoryBean 255
wiring 255
MethodInvokingTimerTaskFactoryBean 255
wiring 255
MethodMapTransactionAttributeSource 206
MethodMatcher 106, 113
Microsoft Office document in Java 339
MIME messages 245
Minority Report 127
mixin 115–116, 118
mocking 134
Model 2 web framework 38
ModelAndView
explained 286
in request lifecycle 272
Model-T Ford 320
Monson-Haefel, Richard 234
motivation 64
Mousetrap 270
movie credits 43
MultiActionController 301
example of 301
in Controller hierarchy 283
methodNameResolver 303
resolving URLs 302
when to use 285, 301
multiple inheritance 115
MVC framework
diagram of request 278
request lifecycle 271
MVC Spring module 10–11
MySQL, generating sequences 155
 
N
 
NamedCasProxyDecider, defined 387
NamedMethodMatcherPointcut 109
NameMatchAttributeSource 191
NameMatchMethodPointcut 107
wiring 108
NameMatchTransactionAttributeSource
compared to CMT 194
isolation level 192
properties 192
read-only 193
rollback rules 193
short cutting 194
using implicitly 195
wild cards 194
See also transaction property descriptor
NameMethodMatcherPointcut 124
compared to RegexpMethodPointcutAdvisor 110–111
NanoContainer 37
NestedRuntimeException 136
new keyword 47
non-repeatable read 187
<null> 64
NullUserCache 381
 
O
 
O/R mapping, Spring module 10–11
object definition source
Ant-like pattern matching 399
configuring 398
property editor 399
Object Graph Navigation Language. See OGNL
Object Request Broker. See ORB
Object/Relational Mapping. See ORM
ObJectRelationalBridge. See OJB
objects, creating associations 43
ODMG, support in OJB 169
OGNL, with Tapestry 356
OJB 40, 157
configuring 169
ConnectionFactoryClass 170
features 169
JDO support 169
ODMG support 169
OJB-repository.xml 169
Spring transaction support 177
transactions 178, 180
web site 169
wiring in Spring 170
OnePerCustomerInterceptor 103
online shopping application 43
OpenSymphony 248
WebWork 362
OptimisticLockingFailureException 137
Oracle OC4J 274
Oracle, generating sequences 155
ORB 212
Ordered 282
defined 283
with HandlerMappings 282
ORM
benefits 157
compared to JDBC 156
defined 157
features 156
Spring services 157
ORO 110
 
P
 
<page-specification> 356
</property-specification> 356
ParameterMethodNameResolver 303
compared to DispatchAction 303
paramName 303
wiring 303
parent, <bean> attribute 202
Pareto?s Principle 144
Parker, Peter 128
PasswordDaoAuthenticationProvider
compared to DaoAuthenticationProvider 374
defined 372
wiring 382
See also ProviderManager
PathMap 281
example of 282
Patterns of Enterprise Application Architecture 176
PDF, generating with Spring 340
PerformanceMonitorListener 361
PersistenceBroker, with PersistenceBrokerTransactionManager 181
PersistenceBrokerDaoSupport, example of 170
PersistenceBrokerTemplate
configuring 170
convenience methods 171
PersistenceBrokerTransactionManager 181
defined 178
wiring 180
PersistenceManagerFactory 164
compared to SessionFactory 164
configuring in Spring 164
defined 164
with JdoTransactionManager 180
phantom read 187
PhoneNumberEditor, example of PropertyEditor 82
PicoContainer 37
pi?a colada 208
plain old Java interface. See POJI
plain old Java object. See POJO
PlaintextPasswordEncoder 379
PlatformTransactionManager
implementations of 178
with TransactionInterceptor 204
with TransactionTemplate 183
pointcut 105
defined 94
dynamic 106
intersection 113
operations 113
static 106–107
union 113
PointcutAdvisor 107
point-to-point message 256
POJI 8
POJO 8, 44, 206, 216–217
declarative transactions 183, 191
pooling 57
Portable Document Format. See PDF
POST 290
PostgreSQL, generating sequences 155
PreparedStatement 147
PreparedStatement with PreparedStatementCreator 145
PreparedStatementCreator
defined 145
example of 146
using implicitly 147
with PreparedStatementSetter 147
PreparedStatementSetter
defined 147
example of 147
using implicitly 147
with PreparedStatementCreator 147
primary key, generating 155
primitives, configuring 59
proceed() 102–103, 115
programmatic transactions 177, 181
drawbacks 183
Programming Perl, 3rd Edition 244
propagation behavior 185
Properties
configuring with PropertyPlaceholderConfigurer 78
wiring 63
PropertiesMethodNameResolver 303
advantages of 304
mappings 304
wiring 304
property 59
<bean> subelement 59, 61
<list> subelement 62
<map> subelement 63
<props> subelement 63
<ref> subelement 60
<set> subelement 62
<value> subelement 59
PropertyEditor 80
PropertyEditorSupport
customizing 81
getAsText() 80
implementations of 80
setAsText() 80
subclassing 80
PropertyPlaceholderConfigurer 77, 90
example of 78
ProperyEditor, registering with CustomEditorConfigurer 82
<props> 63–64
prototype bean
configuring 56
motivation for 56
performance implications 57
ProviderManager
behavior 372
explained 371
providers 372
wiring 372
proxy 96
creating with ProxyFactoryBean 101
defined 94
proxying classes 96
proxy tickets 387
ProxyFactoryBean 30, 122, 124, 126
example of 101
for transactions 183
properties 122
See also TransactionProxyFactoryBean
proxyInterfaces 122–123
publishing events 46, 86
publish-subscribe 257
Python 218
 
Q
 
Quartz scheduler 248
defined 250
QuartzJobBean 251
compared to TimerTask 251
wiring 251
QueryInterceptor 110
 
R
 
read-mostly 156
read-only
explained 188
transaction property descriptor 193
red pill 87
<ref> 60
ReflectionSaltSource
defined 380
wiring 380
RegexpMethodPointcut 109
RegexpMethodPointcutAdvisor
compared to NameMethodMatcherPointcut 110–111
regular expressions 109–110
to validate 292
RejectProxyTickets
defined 387
wiring 388
Remote 215
remote procedure call. See RPC
remote proxy 210
RemoteAccessException 211
RemoteAuthenticationProvider
defined 372
See also ProviderManager
RemoteException 211, 213, 231
RequestHandledEvent 85, 361
RequestHandledFilter 362
Resin 218
ResolverSetupServletContextListener 365
ResourceBundle
naming properly 84
using with ResourceBundleMessageSource 84
ResourceBundleMessageSource 84
ResourceBundleResolver
defined 308
ResourceBundleViewResolver
advantages 311
basename 312
compared to BeanNameViewResolver 311
compared to XmlViewResolver 311
wiring 312
with AbstractExcelView 340
resources, loading with ApplicationContext 46
ResultReader 150
ResultSet
iterating 149
mapping with RowMapper 150
with RowCallbackHandler 149
rigid design 135
RMI 208–209, 212–215, 217
compared to Hessian 218
compiler 215
difficulties 217
drawbacks 212
exporting with Spring 216
lookup 213
programmatic 212
registry 215, 217
skeleton 215
stub 215, 217
rmic 215, 217
RmiProxyFactoryBean 213, 217, 219
RmiServiceExporter 217
compared to HessianServiceExporter 221
RoleVoter
customizing 391
wiring 391
rollback rules, transaction property descriptor 193
round tripping 156
RowCallbackHandler 150
defined 149
example of 149
RowMapper
defined 150
example of 150
reusing 151
RowMapperResultReader 150
example of 150
RPC 209, 211
RuleBasedTransactionAttribute 198
RunAsImplAuthenticationProvider
defined 372
See also ProviderManager
runtime pointcut, performance considerations 107
runtime weaving 95–96
 
S
 
salt 380
ScheduledTimerTask 249
compared to SimpleTriggerBean 252
delay property 250
wiring 249
SchedulerFactoryBean, wiring 254
scheduling, Spring support 241, 248
scriptlet code 320
security interceptor explained 369
SecurityEnforcementFilter, wiring 397
Seinfeld 368
Serializable, in remote calls 211
serialization with HTTP invoker 224
ServiceLocator 24
servlet filter
Acegi 393
FilterToBeanProxy 399
handling JSF events 362
Session, getting from SessionFactory 159
SessionFactory
compared to PersistenceManagerFactory 164
configuring 159
using 159
wiring 159
with HibernateDaoSupport 163
with HibernateTransactionManager 180
<set> 62
setApplicationContext() 50
setter injection 58
compared to constructor injection 68
example of 52
in JSF 359
when to use 69
ShaPasswordEncoder 379
Ship, Howard Lewis 353
Simple Object Access Protocol. See SOAP
simple type, configuring 59
SimpleControllerHandlerAdapter 307
SimpleFormController
doSubmitAction() 290
example of 290
formView 291
in Controller hierarchy 283
onSubmit() 291
shortcomings 294
successView 291
when to use 285
wiring 291
SimpleMailMessage 246
SimpleMappingExceptionResolver
exceptionMappings 317
wiring 317
SimpleMessageConverter 265
wiring 265
SimpleRemoteStatelessSessionProxyFactoryBean 229
SimpleTriggerBean 252
SimpleUrlHandlerMapping 222
defined 279
wiring 281
Simpsons, The 98
Single Sign-On. See SSO
SingleRemoteStatelessSessionProxyFactoryBean 231
singleton 120
singleton bean
configuring 56
preloading of 47
SMTP 245
SOAP 233
compared to Burlap 218
spreadsheet, creating with Spring 338
spring
bind 326, 331
      compared to #springBind 326, 331
      example of 331
      Velocity macros 326
bindEscaped, example of 331
Spring Cleaning 108, 110
Spring configuration file
<bean> 14
<beans> 14, 54
<constructor-arg> 14
<destroy-method> 49
example 22
<property> 14
<value> 14
Spring Framework
application context module 10
compared to EJB 33
container 9–10, 44
creator of 8
described 8
modules 9
origin of 8
philosophy 6
Spring MVC, alternatives 347
Spring Training application
CourseService 50
CourseServiceImpl 52
enforcePrerequisites() 54
StudentService 50
StudentServiceImpl 51
UML diagram 50
<@spring.bind> 326, 331
spring.tld 314
SpringActionFactory 363
configuring 363
downloading 363
#springBind 326, 331
<spring-bind> 315–316, 326, 331
compared to <@spring.bind> 331
configuring 315
example of 315–316, 326
properties 315
SpringTapestryEngine 354
configuring 355
defined 353
limitations 354
SQL
advantages of 141
drawbacks 157
logging with JdbcTemplate 146
types 148
SQL Maps. See iBATIS SQL Maps
SQLException 135
handling 136
SqlMapClient, wiring 167
SqlMapClientCallback
defined 168
example of 168
SqlMapClientTemplate 166
compared to SqlMapTemplate 166
convenience methods 168
wiring 168
SqlMapExecutor 168
SqlMapTemplate, compared to SqlMapClientTemplate 166
SqlProvider
defined 146
example of 146
SqlUpdate
compile() 153
declareParameter() 153
example of 153
using 153
Squishee 99
SSO, described 385
static pointcut 106–107
performance considerations 107
StaticMethodMatcherPointcut 107
stored procedures
accessing with Spring 152
motivations for 151
String
querying for 151
wiring with StringArrayPropertyEditor 81
StringArrayPropertyEditor 81
StringTrimmerEditor 81
Struts Action
bean naming 351
delegating 350
example of 347, 350
Spring-aware 348
See also ActionSupport; DelegatingActionProxy
Struts in Action 39, 332
sub-beaning 202
Sun Microsystems 4
Sun, JDO 164
sunbathing 208
surrogate key 155
Swing, compared to JSF 357
synchronous operation 256
SystemWideSaltSource
defined 380
wiring 380
 
T
 
Tapestry 39
BaseEngine 353
behavior 353
creator 353
engine 353
features 352
global 353–354
jwcid 352
<page-specification> 356
replacing BaseEngine 353
Spring integration 352
template 356
Tapestry in Action 353
_target 297
target 122
defined 94
teeter-totter 174, 270
template method 139
TestingAuthenticationProvider
defined 372
See also ProviderManager
TextMessage 265
ThankYouAdvice 102
ThrowawayController 305
compared to WebWork 305
described 305
example of 305
execute() 306
in Controller hierarchy 283
singleton 306
when to use 285
wiring 306
ThrowawayControllerHandlerAdapter
wiring 306
See also ThrowawayController
ThrowsAdvice 98, 104
Tiles. See Jakarta Tiles
<tiles:getAsString> 332
<tiles:insert> 332
TilesConfigurer
definitions 334
wiring 334
TilesView 335
Timer 248
limitation of 250
TimerFactoryBean
defined 249
wiring 249
TimerTask 248
compared to QuartzJobBean 251
run() 249
using 248
wiring 249
wiring to ScheduldTimerTask 249
topic, message 257
Transaction
commit() 180
rollback() 180
transaction attributes 185
with TransactionProxyFactoryBean 189
transaction property descriptor
diagramed 192
isolation level 192
read-only 193
rollback rules 193
TransactionAttribute
wiring 189
See also MatchAlwaysTransactionAttributeSource
TransactionAttributeSource 184
defined 189
TransactionAttributeSourceAdvisor 204
TransactionCallback, as inner class 182
TransactionDefinition 185
TransactionInterceptor, wiring 204
TransactionManager, with JtaTransactionManager 181
TransactionProxyFactoryBean 33
autoproxying 203
bean inheritence 202
bean naming 184
defined 183
metadata 196
setting transaction policy 189
transactionAttributes 194
transactionAttributeSource 184
transactionManager 184
wiring 183
transactions
ACID 176
atomic 176
consistent 176
declarative 177
defined 174
diagramed 175
durable 176
handling manually 30
importance of 175
in DAO templates 140
isolated 176
isolation levels 186
managing 174
money transfer example 174
movie ticket example 174
programmatic 177
propagation behavior 185
timeout 188
TransactionStatus 182
TransactionTemplate
defined 182
example of 182
setRollbackOnly() 182
transactionManager 183
wih TransactionStatus 182
wiring 182
Trigger 252
tunneling 218
type, <constructor-arg> attribute 67
TypeMismatchDataAccessException 137
 
U
 
UnanimousBased
defined 389–390
wiring 390
UncategorizedDataAccessException 137
unchecked exceptions, benefits of 135
UnicastRemoteObject 214
union 113
unit testing 134
DAOs 138
example of 17
importance of 17
J2EE applications 5, 7
mocking 19, 21
testing cycle 6
within a container 7
UnsatisfiedDependencyException 67
UserTransaction
commit() 181
rollback() 181
with JtaTransactionManager 181
 
V
 
validating with regular expressions 292
Validator
defined 292
example of 292
supports() 292
Value Object pattern 36
<value> 59
<property> subelement 59
variable-resolver 360
Velocity 10, 307, 320
advantages 321
compared to FreeMarker 327
compared to JSP 320
configuring properties 323
DateTool 325
escaping HTML 327
example template 321
exposing model 324–325
features 321
formatting 324
integrating with Spring 321
NumberTool 325
popularity 321
resolving views 323
Spring macros 326
web site 322
with InternalResourceViewResolver 308
See also VTL
Velocity Template Language. See VTL
VelocityConfigurer
compared to FreeMarkerConfigurer 329
described 323
resourceLoaderPath 323
velocityProperties 323
wiring 322
VelocityViewResolver
dateToolAttribute 324
exposeRequestAttributes 325
exposeSessionAttributes 325
exposeSpringMacroHelpers 327
exposing model 325
formatting 324
in use 324
numberToolAttribute 324
wiring 323
version control 17
View
as part of ModelAndView 286
in request lifecycle 272
ViewResolver
implementations of 307
in request lifecycle 272
VTL 322
#foreach 322
compared to JSP 322
 
W
 
weaving 94
web forms
handling 289
multiple pages 294
web frameworks 38
web services 208–209, 218
web.xml
configuring DispatcherServlet 272
configuring JSF with Spring 360
configuring Tapestry 354
mapping URLs 272
with WebWork 2 365
WebApplicationContext, with Struts 349
WebApplicationContextUtils, with Tapestry 354
WebWork 39
compared to Spring MVC 283
compared to ThrowawayController 305
Spring integration 362
See also WebWork 1; WebWork 2
WebWork 1
compared to WebWork 2 364
CVS 363
SpringActionFactory 363
WebWork 2
compared to WebWork 1 364
xwork.xml 364
See also XWork
WebWork Action
defined 363
example of 363
WelcomeAdvice 99
wiring 101
whack-a-mole bugs 19
wildcard, NameMatchMethodPointcut 108
wireless devices 223
wiring 22, 43, 50
bean inner beans 61
bean references 60
collections 61
defined 50
List 62
Map 63
possible sources 54
primitives 59
Properties 63
Set 62
simple types 59
WSDL 218, 235
 
X
 
XA. See distributed transactions
XDoclet 5
XML configuration file, <bean> 54
XmlBeanFactory 45
creating 45
defined 54
example 22
XmlFileViewResolver
compared to BeanNameViewResolver 311
location 311
views.xml 311
wiring 311
XML-RPC, compared to Burlap 218
XmlViewResolver
compared to ResourceBundleViewResolver 311
defined 308
XmlWebApplicationContext 46
defined 54
XWork 364
XWork Action 364
 
Y
 
Yale Central Authentication Service. See CAS