Results 1 to 2 of 2

Thread: AOP and transaction

  1. #1
    Join Date
    Oct 2004
    Location
    Moscow
    Posts
    32

    Default AOP and transaction

    I'm writing an article about Spring. I have two question about AOP:

    1. Is it correct to say - Spring AOP includes declarative transaction and interceptors Is declarative transaction AOP feature?
    Spring uses dynamic proxy for transaction management but dynamic proxy is no AOP.

    2. How can create object pooling? Is is Spring AOP capability?

  2. #2
    Join Date
    Aug 2004
    Location
    Amsterdam, Netherlands
    Posts
    450

    Default

    Spring's declarative transaction management is built on top of AOP and its transaction management infrastructure (PlatformTransactionManager)

    Dynamic proxies != AOP.

    instead:

    dynamic proxies is a technology with which you implement AOP. Note that you can also use CGLIB instead of JDK dynamic proxies, which adds the possibility to proxy a class without interfaces.

    Pooling is supported through Spring's PoolTargetSource (CommonsPoolTargetSource).

    A ProxyFactoryBean needs a target (reference to the target itself) or a TargetSource, of which PoolTargetSource is a subclass.

    Have a look at the PoolTargetSource's JavaDoc
    Alef Arendsen
    SpringSource
    http://www.springsource.com

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •