Marshalling : takes your custom objects and converts them to XML, JSON or other serialization formats.
Unmarshalling : creation of custom objects from XML
Create JSON response from Spring MVC 3 : “Spring MVC invokes a MappingJacksonHttpMessageConverter built on the Jackson JSON processor. This implementation is enabled automatically when you use the mvc:annotation-driven configuration element with Jackson present in your classpath”
@ResponseBody annotation is similar to
@RequestBody : ” This annotation can be put on a method and indicates that the return type should be written straight to the HTTP response body (and not placed in a Model, or interpreted as a view name).”
Spring MVC wth @ResponseBody : “Spring will automatically marshall the return value of an annotated method to XML, JSON, etc. ”
From SpringSource : “Underneath the covers, Spring MVC delegates to a HttpMessageConverter to perform the serialization. In this case, Spring MVC invokes a MappingJacksonHttpMessageConverter built on the Jackson JSON processor. This implementation is enabled automatically when you use the mvc:annotation-driven configuration element with Jackson present in your classpath.”
JMS ~ high load where you can add queue’s in front of it to handle weight
Asysnchronous , Message Oriented Middleware
JMS Message Type
Queue point to point messaging
Topic – publish /subscribe messaging
A Session is created from the Connection. Unit of work, transactional capability. Responsible for creation of various JMS message types.
Producer (put message on), Consumer (pull message off)
Destination – point to point or topic are examples
Spring has a JmsTemplate : delegates to collaborators to handle some of work
Message Converter – conver from objects to messages (SimpleMessageConverter)
DestinationResolver – resolve destination names (DynamicDestinationResolver or JNDIDestinationResolver)
Sending messages – one line methods or callback methods
producer call back or session callbacks
MessageDrivenBeans wait for the message. MessageConverters can be used on recption side.
JMS MessageListener aysnchronous reception
Spring has light light weight mechanism for listen for messages, as compared to EJB
SimpleMessageListenerContainer or DefaultMessageListenerContainer
Spring supports 2 phase commit
Testing in Spring 3.0 much better. Use @Setup or @Test , @RunWith @ContextConfiguration annotations.
What is AOP
- Capture functionality used throughout app in a single, reusable way, e.g. transaction, logging, security.
- Transaction management, logging, security are cross cutting concerns cutting across multiple objects.
- AOP is the implementation of these cross cutting concern.
Join point: a point in the execution of a program such as a method call or a field assignment. e.g., method1 in Class A and method2 in Class B are the join points that require transaction related advice.
Pointcut: An expression that selects one or more join points. Advice can be associated with a pointcut expression and runs at any join point method.
Advice: Code that is executed at a particular join point that has been selected by a Poincut. Different types of advices are “around,” “before” and “after” advice.
Aspect: A module that encapsulates pointcuts and advice. e.g., transaction, security, logging in this case.
Spring AOP uses aspectJ expression language: http://www.eclipse.org/aspectj
designator (* package.Class.method*(..))
@Before @AfterReturning @AfterThrowing @After @Around
ACID: Atomic, Consistent, Isolated, Durable
ACEGI – former name for spring security ~ every other letter (missing B,D,F,H)
I am taking the Core Spring Class by VMWARE with Chris Lacy (http://www.chrislacy.net/).
I will note some of the key information I see over the four days.
- Springsource Tool Suite
- Groovy with NFJS speaker Jeff Brown joining SpringSource
- Spring Roo an application quickstart
- Spring tc Server is an enterprise version of Tomcat
- Spring DM server an OSGI server built on eclipse
- Spring Source ERS server is an enterprise version of Http server
The Spring Experience schedule looks pretty good.
I couple months ago I heard the podcast with Gavin King about Seam. I came across this blog posting talking about Seam. I do see alot more people using EJBs than what was done in the past now that with JPA and IoC all in one. I do not see Spring going away though.
Link: POJO Mojo.
But, in the cases where state and/or behavior needs to be shared or coordinated between nodes, a Spring application can scale very nicely