Spring notes(六) - DAO and ORMapping support

Spring provides all kinds of DAO layers: JdbcDaoSupport: you can get JdbcTemplate. HibernateDaoSupport:you can get hibernateTemplate and SessionFactory JdoDaoSupport: you can get jdoTemplate and PersistenceManagerFactory JpaDaoSupport: you can get jpaTemplate and EntityManagerFactory SqlMapDaoSupport: you can get sqlMapDaoTemplate and SqlMapClient So, you can extend these XxxDaoSupport to expose CRUD APIs. In spring applicationContext.xml, you should inject [...]

By javafuns on March 18, 2008 at 23:35 · Views: 1,515 · Permalink · RSS · 2 Comments
Categorized in: Design Patterns, Java · Tagged with: , ,

Spring notes(五) - transaction

Spring transaction mechanism supports: programming transaction declaring transaction I. Programming transaction: At first, you should define a transactionManager which is the subclass derived from PlatformTransactionManager. DataSourceTransactionManager: inject datasource instance to it. JtaTransactionManager: no need to inject anything HibernateTransactionManager: inject sessionFactory instance to it JdoTransactionManager: inject persistenceManagerFactory instance to it Then, inject these transactionManagers to JdbcTemplate, [...]

By javafuns on March 18, 2008 at 22:54 · Views: 718 · Permalink · RSS · Leave a comment
Categorized in: Java · Tagged with: , ,

Spring notes(四) – AOP

AOP in springframework…

By javafuns on March 10, 2008 at 22:08 · Views: 675 · Permalink · RSS · Leave a comment
Categorized in: Java · Tagged with: , ,

Spring notes(三) - Resource

Resource interface defines the accessor to all various resources, such as file, http resource, ftp resource, class, etc. Built-in implementations: UrlResource ClassPathResource FileSystemResource ServletContextResource InputStreamResource ByteArrayResource

By javafuns on March 9, 2008 at 20:53 · Views: 1,012 · Permalink · RSS · Leave a comment
Categorized in: Java · Tagged with: , ,

Spring notes(二) – Ioc container

IOC container, in spring framework is BeanFactory, contains the following functions: controls the lifecycle (creation, init, destroy) controls the scope (like singleton, prototype, request, session, applicationcontext, new in spring) maintains beans’ dependence BeanFactory is the base of the other modules in springframework. Collection type for bean’s property: list set map props Lazy init for bean:  [...]

By javafuns on March 9, 2008 at 20:27 · Views: 728 · Permalink · RSS · Leave a comment
Categorized in: Java, Scripts · Tagged with: , , ,

Spring notes(一) – Overview

Spring contains following modules: Core: the core(beanfactory) of springframework providing bean management Context: based on BeanFactory, but supports more functions, such as i18n, event-broadcasting, resource-loading, mail, validation, etc. DAO: series of interfaces that you can choose to implement DAOs. ORM: corresponding classes for integrating many ORM utilities to springframework. Web/Web MVC AOP: AOP function you [...]

By javafuns on March 9, 2008 at 10:22 · Views: 786 · Permalink · RSS · Leave a comment
Categorized in: Java · Tagged with: , , ,
  • Highest Rated

  • My PicasaPhotos

    b4ece2733f512e0f8701b0f8.jpg

    IMG_0538.JPG

    IMG_0599.JPG

  • RSS My del.icio.us

  • My RSS