TechnoBuzz

A Techno Blog, mainly about Java

Springathon

Testing in Spring 3.0 much better. Use @Setup or @Test , @RunWith  @ContextConfiguration annotations.

Mocks or Stubs ?

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

Transactions

ACID: Atomic, Consistent, Isolated, Durable

ACEGI – former name for spring security ~ every other letter (missing B,D,F,H)

Advertisements

July 1, 2010 - Posted by | Spring

No comments yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: