Your SlideShare is downloading. ×
Best spring classes in navi mumbai,spring course-provider in navi-mumbai,spring training in navi-mumbai,spring classes in-navi-mumbai
Best spring classes in navi mumbai,spring course-provider in navi-mumbai,spring training in navi-mumbai,spring classes in-navi-mumbai
Best spring classes in navi mumbai,spring course-provider in navi-mumbai,spring training in navi-mumbai,spring classes in-navi-mumbai
Best spring classes in navi mumbai,spring course-provider in navi-mumbai,spring training in navi-mumbai,spring classes in-navi-mumbai
Best spring classes in navi mumbai,spring course-provider in navi-mumbai,spring training in navi-mumbai,spring classes in-navi-mumbai
Best spring classes in navi mumbai,spring course-provider in navi-mumbai,spring training in navi-mumbai,spring classes in-navi-mumbai
Best spring classes in navi mumbai,spring course-provider in navi-mumbai,spring training in navi-mumbai,spring classes in-navi-mumbai
Best spring classes in navi mumbai,spring course-provider in navi-mumbai,spring training in navi-mumbai,spring classes in-navi-mumbai
Best spring classes in navi mumbai,spring course-provider in navi-mumbai,spring training in navi-mumbai,spring classes in-navi-mumbai
Best spring classes in navi mumbai,spring course-provider in navi-mumbai,spring training in navi-mumbai,spring classes in-navi-mumbai
Best spring classes in navi mumbai,spring course-provider in navi-mumbai,spring training in navi-mumbai,spring classes in-navi-mumbai
Best spring classes in navi mumbai,spring course-provider in navi-mumbai,spring training in navi-mumbai,spring classes in-navi-mumbai
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×
Saving this for later? Get the SlideShare app to save on your phone or tablet. Read anywhere, anytime – even offline.
Text the download link to your phone
Standard text messaging rates apply

Best spring classes in navi mumbai,spring course-provider in navi-mumbai,spring training in navi-mumbai,spring classes in-navi-mumbai

70

Published on

best spring classes in-navi-mumbai,spring classes in navi-mumbai,spring course-provider in-navi-mumbai,best spring classes in navi-mumbai,best spring classes in-navi-mumbai,spring classes in …

best spring classes in-navi-mumbai,spring classes in navi-mumbai,spring course-provider in-navi-mumbai,best spring classes in navi-mumbai,best spring classes in-navi-mumbai,spring classes in navi-mumbai,spring course-provider in-navi-mumbai,best spring classes in navi-mumbai,best spring classes in-navi-mumbai,spring classes in navi-mumbai,spring course-provider in-navi-mumbai,best spring classes in navi-mumbai,

Published in: Education, Technology, Real Estate
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total Views
70
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
0
Comments
0
Likes
0
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
No notes for slide

Transcript

  • 1. SPRING FRAMEWORK
  • 2. Spring ORM
  • 3. ORM • Object/Relational Mapping tools require proper transaction integration – synchronization with transactions • cache callbacks on commit / rollback • required for transactional cache handling – scoping of ORM resources • • • • one Hibernate Session per transaction one TopLink UnitOfWork per transaction one JDO PersistenceManager per transaction required for proper transaction isolation
  • 4. ORM • ORM tools usually support two different transaction modes – native transactions through ORM API – participating in global JTA transactions – -> different programming model! • Spring supports consistent transaction demarcation across all environments – native transactions or global JTA – same transaction demarcation – same DAO implementation model
  • 5. ORM • Spring provides pre-built integration for all major ORM providers – – – – Hibernate 2.1 / 3.x TopLink 9.0.4 / 10.1.3 JDO 1.0 / 2.0 Apache OJB 1.0 • Set of integration classes per strategy – factories for ORM resources – native transaction managers – DAO implementation helpers
  • 6. ORM • Example: Hibernate – Spring's LocalSessionFactoryBean • setup of Hibernate SessionFactory – Spring's HibernateTransactionManager • native transactions against single database – Spring's HibernateTemplate • implicit management of Hibernate Sessions • or use SessionFactory.getCurrentSession() – Spring's OpenSessionInViewFilter • seamless lazy loading during view rendering
  • 7. ORM • Example: TopLink – Spring's LocalSessionFactoryBean • setup of TopLink SessionFactory / TopLink master Session – Spring's TopLinkTransactionManager • native transactions against single database – Spring's TopLinkTemplate • implicit management of TopLink Session / UnitOfWork • or use Session.getActiveSession() / Session.getActiveUnitOfWork()
  • 8. ORM • Newest kid on the block: JPA – Java Persistence API 1.0 • aka "EJB3 persistence" / "JSR-220 persistence" • part of the forthcoming J2EE 5.0 – optimized for application servers • explicit, strong integration with J2EE transactions • but also usable in a standalone fashion • Spring will support JPA persistence – as further ORM strategy, analogous to JDO – use Spring's transaction management with JPA-based DAOs
  • 9. • Spring provides generic transaction management for any kind of Java application – consistent programming model – consistent transaction demarcation – seamless switching between different transaction managers • Declarative transaction demarcation – XML-based proxy definitions – JDK 5.0 annotations – alternative: programmatic demarcation
  • 10. • Seamless switching between native transactions and JTA transactions – consistent programming model across different deployment scenarios – leverage J2EE server when available, while still being able to run outside of J2EE • Full declarative transactions even on Tomcat! – on the other end of the spectrum: WebLogic JTA extensions supported as well – choose deployment environment according to your service needs (scaling both up and down)
  • 11. • Explicit support for ORM tools – transaction synchronization • scoping of ORM resources – consistent transaction demarcation across native transactions and JTA transactions • with consistent ORM semantics • All major ORM providers supported – Hibernate, TopLink, JDO, JPA, etc – integration comes out-of-the-box! • maintained by Spring team
  • 12. Exercise 1.Make spring application to use Spring ORM

×