diff --git a/spring-framework-reference/src/aop.xml b/spring-framework-reference/src/aop.xml index 20499a289b7..566dddfc00a 100644 --- a/spring-framework-reference/src/aop.xml +++ b/spring-framework-reference/src/aop.xml @@ -468,8 +468,8 @@ private void anyOldTransfer() {}// the pointcut signatureIllegalArgumentException being thrown. The set of pointcut designators supported by Spring AOP may be - extended in future releases both to support more of the AspectJ - pointcut designators. + extended in future releases to support more of the AspectJ pointcut + designators. diff --git a/spring-framework-reference/src/beans.xml b/spring-framework-reference/src/beans.xml index d407476e2a6..fb4c78ccd2d 100644 --- a/spring-framework-reference/src/beans.xml +++ b/spring-framework-reference/src/beans.xml @@ -592,8 +592,8 @@ List userList service.getUsernameList(); always adequate, however. It is sometimes desirable to introduce an alias for a bean that is defined elsewhere. This is commonly the case in large systems where configuration is split amongst each subsystem, - each subsystem having its own set of object defintions. In XML-based - configuration metadata, you can use of the + each subsystem having its own set of object definitions. In XML-based + configuration metadata, you can use the <alias/> element to accomplish this. <alias name="fromName" alias="toName"/> @@ -1994,14 +1994,14 @@ support=support@example.co.uk during development, without negating the option of switching to explicit wiring when the code base becomes more stable. - - See - When using XML-based configuration metadata, you specify - autowire mode for a bean definition with the autowire - attribute of the <bean/> element. The - autowiring functionality has five modes. You specify autowiring - per bean and thus can choose which ones to - autowire. + + When using XML-based configuration metadataSee + , you + specify autowire mode for a bean definition with the + autowire attribute of the + <bean/> element. The autowiring functionality has + five modes. You specify autowiring per bean and thus + can choose which ones to autowire. Autowiring modes @@ -4544,9 +4544,9 @@ dataSource.url=jdbc:mysql:mydbAn alternative to XML setups is provided by annotation-based configuration which rely on the bytecode metadata for wiring up components - instead on angle-bracket declarations. Instead of using XML to describe a + instead of angle-bracket declarations. Instead of using XML to describe a bean wiring, the developer moves the configuration into the component - class itself by using annotations on relevant class, method or field + class itself by using annotations on the relevant class, method, or field declaration. As mentioned in , using a BeanPostProcessor in conjunction with diff --git a/spring-framework-reference/src/dynamic-languages.xml b/spring-framework-reference/src/dynamic-languages.xml index afa1b219252..6a4a2152ad7 100644 --- a/spring-framework-reference/src/dynamic-languages.xml +++ b/spring-framework-reference/src/dynamic-languages.xml @@ -223,7 +223,7 @@ http://www.springframework.org/schema/lang http://www.springframework.org/schema The final step involves defining dynamic-language-backed bean definitions, - one for each bean that you want to configure (this is no different to + one for each bean that you want to configure (this is no different from normal JavaBean configuration). However, instead of specifying the fully qualified classname of the class that is to be instantiated and configured by the container, you use the <lang:language/> diff --git a/spring-framework-reference/src/ejb.xml b/spring-framework-reference/src/ejb.xml index 53109facc9c..3b765414c3c 100644 --- a/spring-framework-reference/src/ejb.xml +++ b/spring-framework-reference/src/ejb.xml @@ -279,7 +279,8 @@ public void setMyComponent(MyComponent myComponent) { Consider an example Stateless Session bean which actually delegates - the implementation to a plain java service object. We have the business interface: + the implementation to a plain java service object. We have the business + interface: unloadBeanFactory() and - loadBeanFactory from ejbPassivate - and ejbActivate, respectively, to unload and reload the + loadBeanFactory() from ejbPassivate() + and ejbActivate(), respectively, to unload and reload the BeanFactory on passivation and activation, since it can not be saved by the EJB container. - The default behavior of the ContextJndiBeanFactoryLocator - classes which is to load an ApplicationContext for the - use of the EJB is adequate for some situations. However, it is problematic when - the ApplicationContext is loading a number - of beans, or the initialization of those beans is time consuming or memory - intensive (such as a Hibernate SessionFactory initialization, for - example), since every EJB will have their own copy. In this case, the user - may want to override the default ContextJndiBeanFactoryLocator - usage and use another BeanFactoryLocator variant, such as the - ContextSingletonBeanFactoryLocator which can load and use a - shared container to be used by multiple EJBs or other clients. Doing this is relatively - simple, by adding code similar to this to the EJB: + The default behavior of the + ContextJndiBeanFactoryLocator class is to load an + ApplicationContext for use by an EJB, and is + adequate for some situations. However, it is problematic when the + ApplicationContext is loading a number of beans, + or the initialization of those beans is time consuming or memory + intensive (such as a Hibernate SessionFactory + initialization, for example), since every EJB will have their own copy. + In this case, the user may want to override the default + ContextJndiBeanFactoryLocator usage and use + another BeanFactoryLocator variant, such as the + ContextSingletonBeanFactoryLocator which can load + and use a shared container to be used by multiple EJBs or other clients. + Doing this is relatively simple, by adding code similar to this to the + EJB: - Any a custom translation implemented by a subclass. Normally + Any custom translation implemented by a subclass. Normally the provided concrete SQLErrorCodeSQLExceptionTranslator is used so this rule does not apply. It only applies if you have actually @@ -1715,7 +1715,7 @@ END;The in_id parameter contains the The SimpleJdbcCall is declared in a similar manner to the SimpleJdbcInsert. You should instantiate and configure the class in the initialization method of your - data access layer. Compared to the StoredProcdedure class, you don't + data access layer. Compared to the StoredProcedure class, you don't have to create a subclass and you don't have to declare parameters that can be looked up in the database metadata. Following is an example of a SimpleJdbcCall configuration using the above stored @@ -2134,7 +2134,7 @@ public Customer getCustomer(Long id) { The method in this example retrieves the customer with the id that is passed in as the only parameter. Since we only want one object returned we simply call the convenience method findObject - with the id as parameter. If we instead had a query the returned a list + with the id as parameter. If we had instead a query that returned a list of objects and took additional parameters then we would use one of the execute methods that takes an array of parameter values passed in as varargs. @@ -2476,9 +2476,9 @@ public class TitlesAfterDateStoredProcedure extends StoredProcedure { of these approaches use an implementation of the LobHandler interface for the actual management of the LOB data. The LobHandler provides access to a - LobCreatorclass, - through the getLobCreator method, used for - creating new LOB objects to be inserted. + LobCreator class, through the + getLobCreator method, used for creating new LOB + objects to be inserted.The LobCreator/LobHandler provides the following support for LOB input and output: @@ -2577,14 +2577,14 @@ clobReader.close(); Using the method - setBlobAsBinartStream, pass in the contents + setBlobAsBinaryStream, pass in the contents of the BLOB. Now it's time to read the LOB data from the database. Again, you - use a JdbcTempate with the same instance variable + use a JdbcTemplate with the same instance variable lobHandler and a reference to a DefaultLobHandler. @@ -2892,7 +2892,7 @@ public class DataAccessUnitTestTemplate { If you want to initialize a database and you can provide a reference to a DataSource bean, use the - initialize-datasource tag in the + initialize-database tag in the spring-jdbc namespace:<jdbc:initialize-database data-source="dataSource"> @@ -2916,11 +2916,12 @@ public class DataAccessUnitTestTemplate { the tables first and then inserts the data - the first step will fail if the tables already exist. - However, to get more control the creation and deletion of existing - data the XML namespace provides a couple more options. The first is flag - to switch the initialization on and off. This can be set according to - the environment (e.g. to pull a boolean value from system properties or - an environment bean), e.g.<jdbc:initialize-database data-source="dataSource" + However, to get more control over the creation and deletion of + existing data, the XML namespace provides a couple more options. The + first is flag to switch the initialization on and off. This can be set + according to the environment (e.g. to pull a boolean value from system + properties or an environment bean), e.g. + <jdbc:initialize-database data-source="dataSource" enabled="#{systemProperties.INITIALIZE_DATABASE}"> <jdbc:script location="..."/> </jdbc:initialize-database> diff --git a/spring-framework-reference/src/jms.xml b/spring-framework-reference/src/jms.xml index 1e38064874d..83d60dcc22f 100644 --- a/spring-framework-reference/src/jms.xml +++ b/spring-framework-reference/src/jms.xml @@ -403,14 +403,14 @@ public class JmsQueueSender { to create a text message from the supplied Session object. The JmsTemplate is constructed by passing a reference to a ConnectionFactory. As an alternative, - a zero argument constructor and connectionFactory / + a zero argument constructor and connectionFactory is provided and can be used for constructing the instance in JavaBean style (using a BeanFactory or plain Java code). Alternatively, consider deriving from Spring's JmsGatewaySupport convenience base class, which provides pre-built bean properties for JMS configuration. The method send(String destinationName, MessageCreator - creator) lets you send to a message using the string name of + creator) lets you send a message using the string name of the destination. If these names are registered in JNDI, you should set the destinationResolver property of the template to an instance of JndiDestinationResolver. @@ -444,7 +444,7 @@ public class JmsQueueSender { The sandbox currently includes a MapMessageConverter which uses reflection to convert between a JavaBean and a MapMessage. - Other popular implementations choices you might implement yourself are + Other popular implementation choices you might implement yourself are Converters that use an existing XML marshalling package, such as JAXB, Castor, XMLBeans, or XStream, to create a TextMessage representing the @@ -500,7 +500,7 @@ public class JmsQueueSender { ProducerCallback expose the JMS Session and Session / - MessageProducer pair respectfully. The + MessageProducer pair respectively. The execute() methods on JmsTemplate execute these callback methods. @@ -589,7 +589,7 @@ public class ExampleListener implements MessageListener { The SessionAwareMessageListener interface is a Spring-specific interface that provides a similar - contract the JMS MessageListener + contract to the JMS MessageListener interface, but also provides the message handling method with access to the JMS Session from which the Message was received. diff --git a/spring-framework-reference/src/jmx.xml b/spring-framework-reference/src/jmx.xml index 45504701c49..af1b741ba05 100644 --- a/spring-framework-reference/src/jmx.xml +++ b/spring-framework-reference/src/jmx.xml @@ -519,7 +519,7 @@ public class AnnotationTestBean implements IJmxTestBean { add(int, int), when using the MetadataMBeanInfoAssembler. - The configuration below shouws how you configure the + The configuration below shows how you configure the MBeanExporter to use the MetadataMBeanInfoAssembler: diff --git a/spring-framework-reference/src/mail.xml b/spring-framework-reference/src/mail.xml index 45165523207..63caf0695f6 100644 --- a/spring-framework-reference/src/mail.xml +++ b/spring-framework-reference/src/mail.xml @@ -210,7 +210,7 @@ sender.send(message);]]>
Sending attachments and inline resources Multipart email messages allow for both attachments and inline resources. - Examples of inline resources would be be images or a stylesheet you want to use + Examples of inline resources would be images or a stylesheet you want to use in your message, but that you don't want displayed as an attachment.
Attachments @@ -268,7 +268,7 @@ sender.send(message);]]>
Creating email content using a templating library - The code in the previous examples explicitly has been creating the + The code in the previous examples explicitly created the content of the email message, using methods calls such as message.setText(..). This is fine for simple cases, and it is okay in the context of the aforementioned diff --git a/spring-framework-reference/src/metadata.xml b/spring-framework-reference/src/metadata.xml index a9bcd5622ad..6ce4407adf3 100644 --- a/spring-framework-reference/src/metadata.xml +++ b/spring-framework-reference/src/metadata.xml @@ -38,7 +38,7 @@ public class PetStoreImpl implements PetStoreFacade, OrderService { - Spring uses Java 5 annotations thoughout the framework and across a + Spring uses Java 5 annotations throughout the framework and across a wide range of features such as DI, MVC, and AOP and supports standardized annotations such as @PreDestroy and @PostConstruct specified by JSR-250, and @Inject specified by JSR-330. This chapter describes the @Required annotation diff --git a/spring-framework-reference/src/mvc.xml b/spring-framework-reference/src/mvc.xml index a06485d015d..0d09924fb45 100644 --- a/spring-framework-reference/src/mvc.xml +++ b/spring-framework-reference/src/mvc.xml @@ -820,7 +820,7 @@ public String findOwner(@PathVariable String ow The matching of method parameter names to URI Template variable names can only be done if your code is compiled with debugging - enabled. If you do have not debugging enabled, you must specify the + enabled. If you do not have debugging enabled, you must specify the name of the URI Template variable name in the @PathVariable annotation in order to bind the resolved value of the variable name to a method parameter. For example: @@ -1176,8 +1176,9 @@ public String processSubmit(@ModelAttribute("pet") Pet pet A HttpEntity<?> or ResponseEntity<?> object - to access to the Servlet reponse HTTP headers and contents. The entity body will - be converted to the response stream using + to provide access to the Servlet reponse HTTP headers and + contents. The entity body will be converted to the response + stream using HttpMessageConverters. See . @@ -2241,7 +2242,7 @@ public class TimeBasedAccessInterceptor extends HandlerInterceptorAdapter { representation of the current resource regardless of the logical view name. The Accept header may include wildcards, for example text/*, in which case a View whose - Context-Type was text/xml is a compatible match. + Content-Type was text/xml is a compatible match. To support the resolution of a view based on a file extension, use the ContentNegotiatingViewResolver bean property @@ -2760,7 +2761,7 @@ public class FileUpoadController { web.xml. However, they provide a more flexible way to handle exceptions. They provide information about which handler was executing when the exception was thrown. Furthermore, a programmatic way - of handling exception gives you more options for responding + of handling exceptions gives you more options for responding appropriately before the request is forwarded to another URL (the same end result as when you use the servlet specific exception mappings). diff --git a/spring-framework-reference/src/orm.xml b/spring-framework-reference/src/orm.xml index cb5d5cc830e..59430dc8904 100644 --- a/spring-framework-reference/src/orm.xml +++ b/spring-framework-reference/src/orm.xml @@ -1367,7 +1367,7 @@ TR: REVISED, PLS REVIEW.-->The factory bean uses the JPA configuration and is appropriate for environments where fine-grained customization is required. The LocalContainerEntityManagerFactoryBean creates - a PersistenceUnitInfo instancebased + a PersistenceUnitInfo instance based on the persistence.xml file, the supplied dataSourceLookup strategy, and the specified loadTimeWeaver. It is thus possible to work with @@ -1467,7 +1467,7 @@ TR: OK AS IS. The requirement is to provide the classloader for the runtime envi applied only per class loader and not per VM. - Refer to the section in the AOP chapter for more insight regarding the + Refer to in the AOP chapter for more insight regarding the LoadTimeWeaver implementations and their setup, either generic or customized to various platforms (such as Tomcat, WebLogic, OC4J, GlassFish, Resin and JBoss). diff --git a/spring-framework-reference/src/oxm.xml b/spring-framework-reference/src/oxm.xml index 03712629740..1e285766718 100644 --- a/spring-framework-reference/src/oxm.xml +++ b/spring-framework-reference/src/oxm.xml @@ -573,7 +573,7 @@ public class Application { The JibxMarshaller class implements both the Marshaller and Unmarshaller interface. - To operate, it requires the name of the class to marshall in, which you can set using the + To operate, it requires the name of the class to marshal in, which you can set using the targetClass property. Optionally, you can set the binding name using the bindingName property. In the next sample, we bind the Flights class: diff --git a/spring-framework-reference/src/remoting.xml b/spring-framework-reference/src/remoting.xml index 6565e6f3cdb..b99108971c9 100644 --- a/spring-framework-reference/src/remoting.xml +++ b/spring-framework-reference/src/remoting.xml @@ -394,8 +394,8 @@ public class AccountServiceImpl implements AccountService { Exposing the service object Setting up the HTTP invoker infrastructure for a service object - much resembles the way you would do using Hessian or Burlap. Just as - Hessian support provides the + resembles closely the way you would do the same using Hessian or Burlap. + Just as Hessian support provides the HessianServiceExporter, Spring's HttpInvoker support provides the org.springframework.remoting.httpinvoker.HttpInvokerServiceExporter. @@ -1280,7 +1280,7 @@ public class Client { RestTemplate's behavior is customized by providing callback methods and configuring the HttpMessageConverter used to marshal - objects into the HTTP request body and to unmarshall any response back + objects into the HTTP request body and to unmarshal any response back into an object. As it is common to use XML as a message format, Spring provides a MarshallingHttpMessageConverter that uses the Object-to-XML framework that is part of the diff --git a/spring-framework-reference/src/scheduling.xml b/spring-framework-reference/src/scheduling.xml index 9042f924b25..fe24813ce35 100644 --- a/spring-framework-reference/src/scheduling.xml +++ b/spring-framework-reference/src/scheduling.xml @@ -726,7 +726,7 @@ public class ExampleJob extends QuartzJobBean { Wiring up jobs using triggers and the <classname>SchedulerFactoryBean</classname> We've created job details and jobs. We've also reviewed the convenience bean - that allows to you invoke a method on a specific object. Of course, we still need + that allows you to invoke a method on a specific object. Of course, we still need to schedule the jobs themselves. This is done using triggers and a SchedulerFactoryBean. Several triggers are available within Quartz. Spring offers two subclassed triggers with convenient defaults: @@ -870,4 +870,4 @@ public class ExampleJob extends QuartzJobBean {
- \ No newline at end of file + diff --git a/spring-framework-reference/src/transaction.xml b/spring-framework-reference/src/transaction.xml index edcdcd4d009..e47994145fd 100644 --- a/spring-framework-reference/src/transaction.xml +++ b/spring-framework-reference/src/transaction.xml @@ -354,10 +354,9 @@ TR:REVISED, PLS REVIEW--> <property name="password" value="${jdbc.password}" /> </bean>
- The related The - PlatformTransactionManager bean definition will then have - a reference to the DataSource definition. - It will look like this: + The related PlatformTransactionManager + bean definition will then have a reference to the + DataSource definition. It will look like this:<bean id="txManager" class="org.springframework.jdbc.datasource.DataSourceTransactionManager"> <property name="dataSource" ref="dataSource"/> @@ -629,7 +628,7 @@ TR: REVISED, PLS REVIEW - rewrote this to hoefully make it more clear--> The Spring Framework enables you to customize transactional behavior, by using AOP. For example, you can insert custom behavior in the case of transaction rollback. You can also add arbitrary advice, - along with the transactional advice. With EJB CMT, cannot influence + along with the transactional advice. With EJB CMT, you cannot influence the container's transaction management except with setRollbackOnly(). @@ -1858,7 +1857,7 @@ TR: REVISED, PLS REVIEW - changed it back; it's not just settings, the section d When the propagation setting is PROPAGATION_REQUIRED, a logical transaction scope is created for each - method that to which the setting is applied. Each such logical + method upon which the setting is applied. Each such logical transaction scope can determine rollback-only status individually, with an outer transaction scope being logically independent from the inner transaction scope. Of course, in case of standard @@ -2137,7 +2136,7 @@ TR: REVISED, PLS REVIEW. changed to 'desired'; seems clear that the desired orde the aspect. The simplest way to configure the transaction management aspect is to use the <tx:annotation-driven/> element and specify the mode attribute to - asepctj as described in aspectj as described in . Because we're focusing here on applications running outside of a Spring container, we'll show you how to do it programmatically. diff --git a/spring-framework-reference/src/view.xml b/spring-framework-reference/src/view.xml index 88230a53844..71504182449 100644 --- a/spring-framework-reference/src/view.xml +++ b/spring-framework-reference/src/view.xml @@ -29,7 +29,7 @@ Setting up your application to use JSTL is a common source of error, - mainly cause by confusion over the different servlet spec., JSP and JSTL + mainly caused by confusion over the different servlet spec., JSP and JSTL version numbers, what they mean and how to declare the taglibs correctly. The article @@ -760,7 +760,7 @@ productList.url=/WEB-INF/jsp/productlist.jspA key principle of REST is the use of the Uniform Interface. This means that all resources (URLs) can be manipulated using the same - four HTTP methods: GET, PUT, POST, and DELETE. For each methods, the + four HTTP methods: GET, PUT, POST, and DELETE. For each method, the HTTP specification defines the exact semantics. For instance, a GET should always be a safe operation, meaning that is has no side effects, and a PUT or DELETE should be idempotent, meaning that you @@ -986,7 +986,7 @@ findOwnersForm.url=/WEB-INF/jsp/findOwners.jsp Velocity and FreeMarker are two templating - languages that can both be used as view technologies within Spring MVC + languages that can be used as view technologies within Spring MVC applications. The languages are quite similar and serve similar needs and so are considered together in this section. For semantic and syntactic differences between the two languages, see the velocity-1.x.x.jar or freemarker-2.x.jar in order to work with Velocity or FreeMarker respectively and commons-collections.jar needs also to be - available for Velocity. Typically they are included in the + class="libraryfile">commons-collections.jar is required for + Velocity. Typically they are included in the WEB-INF/lib folder where they are guaranteed to be found by a Java EE server and added to the classpath for your application. It is of course assumed that you already have the response content as XML. The object to be marshalled can be set explicitly using MarhsallingView's modelKey bean property. Alternatively, the view will - iterate over all model properties and marhsall only those types that are + iterate over all model properties and marshal only those types that are supported by the Marshaller. For more information on the functionality in the org.springframework.oxm package refer to the diff --git a/spring-framework-reference/src/web-integration.xml b/spring-framework-reference/src/web-integration.xml index 61ed9ca4e2b..4338d8573d4 100644 --- a/spring-framework-reference/src/web-integration.xml +++ b/spring-framework-reference/src/web-integration.xml @@ -627,7 +627,7 @@ and components very simple, and delegate as much logic as possible out to HiveMind [or Spring, or whatever] services. Listener methods should - ideally do little more than marshall together the correct information + ideally do little more than marshal together the correct information and pass it over to a service.