Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 6

Hibernate Framework with JPA 2.

1 - Workshop Details:

Duration: 5 Days
This course is a upgrade on OR/M for developers from Core Java
platform or from non-java platform.
On completion of this course, developers will be able to understand:
What is JDBC, JDBC Wrapper and ORM tools
Why to use ORM tool?
What is the difference between Hibernate & JPA
The Hibernate architecture and how to do the configuration
How to use Service Registry for building session factory
How to Use Apache Maven for Resolving Hibernate
Dependencies
How Mapping is done using Annotations
Objective: What is the Object lifecycle
What are the different Hibernate Inheritance strategies
What are the different Hibernate Association strategies
Who to Query a database using HQL
What are the different types of queries
Transactions in Hibernate
Caching
Batch processing
Multitenancy
Listeners/Events and Interceptors

Participants Entry Must have thorough knowledge of Core Java and should be aware of
Profile: JDBC (Java Database Connectivity). Should have knowledge of
RDBMS concepts and SQL-Joins. Prior Knowledge of topics such as
JPA, Spring JDBC will be advantageous.

Training Methodology: The workshop will follow Synergetics methodology of


Concept Visualization
Active Experimentation
Application Development
The workshop will be 100% Hands-On with each participant having
access to system during the session.

Setup Requirements

Hardware and Participants as well as Trainers Machine are required to


Software have :
Requirements:
Hardware
Intel Core i3 2.2 GHz
CD Rom Drive
80 GB HDD
LCD Color Monitor
2 GB RAM
LAN Connectivity
Software
Windows XP or 7
Internet Explorer 10 or above/Chrome/Firefox
Java SDK 1.7.x
Tomcat 7.0/GlassFish 3.2.x/JBoss 7+
Hibernate 4.3.x All Jar
JDBC Driver for Oracle (ojdbc6.jar)
Oracle 10g or higher/SQL Server 2008 onwards
Eclipse 4.0.x onwards/Netbeans 7.4 or higher
Jboss tools from eclipse market place
The installable must match in bits of the machine.
A diskspace shared with participants and trainer should be
provided for trainer to share training stuff with participants.
Internet connection to fetch maven dependencies .
Training Lab Whiteboard 6 feet by 4 feet (minimum)
Requirements: Whiteboard markers Red, Blue, Green, Black
Video Projector (1024 X 768 resolutions)

Course Content

Day 1 Module 1: Quick overview of Object Relational Mapping,


Hibernate
JDBC and JDBC Wrapper
Gaps between RDBMS and OOPs paradigm
Why ORM? What concerns it addresses?
Comparison ORM with JDBC, Spring JDBC and JPA
Features of Hibernate
Hibernate Architecture
Configuration Tags and Significance
Hibernate Configuration Properties
Configuration, Session Factory and Session
Hiber 4: ServiceRegistry, StandardServiceRegistryBuilder

Module 2: Persistent Classes configuration in further


detail
Understanding object states
Transient, Persistent, Detached
Object transition
Understanding HBM tags
Basic OR Mapping
Mapping Declaration
Mapping using Annotations
Automatic Schema Generation using JPA 2.1
CRUD Operations
Persistence using Pojo
Accessing fields
Introducing constraints like not-null
Making column/class immutable

Module 3: Working on keys


Auto key generators
Handling concatenated keys
Hibernate Data types

Day 2 Module 4: Working with collections


Persistent Collections
Collection Mapping
o Set, Bag, List
o Lazy Initialization

Module 5: Filling gaps of Inheritance between OOPs and


RDBMS
Mapping table/s with Inheritance object structure
Table with discriminator
Table per concrete class
Table with sub-class joins

Module 6: Filling gaps of Association between OOPs and


RDBMS
Uni and Bidirectional Association
Mapping- 1-1, 1-M, M-M
The (n+1) problem
Day 3 Module 7: Querying Database
The from and where clauses
Aggregate Functions
Orderby, GroupBy, Having
Associations and Joins
Object Graph Navigation
Paging
Criteria Queries
Join Queries
Join using ON clause of JPA 2.1
JPQL enhancements in JPA 2.1
Criteria Bulk Updates and Deletes using JPA 2.1
Named Queries
Dynamically Defining Named Queries using JPA 2.1
Query By Example
Store Procedure Mapping using JPA 2.1

Module 8: Transactions In Hibernate


Understanding Database transactions
JDBC & JTA Transactions
Hibernate Transaction API
Using JTA for distributed transactions
Flushing the Session
Isolation Levels

Module 9: Pessimistic & Optimistic Locking


Using Pessimistic Locking
Optimistic Locking
Using Timestamp
Using Versioning

Day 4 Module 10: Hibernate Statistical support and Loggers


Hibernate interfaces for different statistics
Hibernate Statistic API
Configuring and enabling statistics
Understanding Log4J
Configuring Log 4J
Logging Hibernate messages into Logger

Module 12: Batch processing


Why need batch updates?
Performance issue with heavy updates in persistent objects
Executing updates directly in data base

Module 11: Caching In Hibernate


Hibernate Cache Architecture
First Level Cache
Second Level Cache
Concurrency Strategies
Cache Providers
Configuring second level cache with EHCACHE

Day 5 Module 14: Interceptors and Listeners/Events


Interception overview and scopes of interceptors
Creating and configuring interceptors
Why listeners? Listener support in Hibernate
Creating and configuring custom listeners
Applications of listeners
CDI Listeners in Entity classes using JPA 2.1

Module 13: Multi Tenancy in Hibernate


What is Multi-Tenancy
Multi-Tenancy Strategies
Strategies available in Hibernate 4

Spring Framework
Workshop Details:
Duration: 3 days
Understanding Spring Framework
Discovering Dependency Injection
Working with multiple Configuration files
How to deal with lazy or eager bean creation
Objective:
What are Spring beans, Bean life cycle
Working with Spring JDBC
How to Integrate with Hibernate and Struts

Participants Entry For developers experienced in java who wish to use Spring Framework
Profile: to build their applications.
Freshers who have good knowledge of java and working knowledge of
database.
Knowledge of Hibernate is an added advantage

Training Methodology: The workshop will follow Synergetics methodology of


Concept Visualization
Active Experimentation
Application Development
The workshop will be 100% Hands-On with each participant having
access to system during the session

Setup Requirements
Hardware and Participants as well as Trainers Machine are required to have :
Software Hardware
Requirements: Intel Core i3 2.2 GHz
CD Rom Drive
80 GB HDD
LCD Color Monitor
2 GB RAM
Internet Connectivity for Maven dependencies

Software
Windows XP or 7
Internet Explorer 10 or above/Chrome/Firefox
Eclipse Luna with STS plugins OR Spring Tool Suit latest.
JDK 1.7

The installables must match in bits architecture of the machine.


A diskspace shared with participants and trainer should be provided
for trainer to share training stuff with participants.
Internet connection to fetch maven dependencies .
Training Lab Whiteboard 6 feet by 4 feet (minimum)
Requirements: Whiteboard markers Red, Blue, Green, Black
Video Projector (1024 X 768 resolutions)

Course Content

Day 1 Module 1: Preface to Spring


Objects and their dependencies
Inversion of Control: Objects getting dependencies
Dependency Injection and its Types

Module 2: Introduction to Spring


IoC Container
XML Configuration and ApplicationContext
Constructor and setter injections
Working with Multiple Configuration files
Obtaining Beans in Application
* Mapping collection properties.
* Spring 4: Lazy and Eager bean creation.
* The 'context' namespace and using 'component-scan'
* @ Component and sub annotations.

Module 3: Beans
Bean Scopes
Lifecycle of Beans
Lifecycle annotations : @PostConstruct and @PreDestroy
Spring definition inheritance

Day 2 Module 4: DI in Spring


XML Based DI
Using Constructor and Setter Injections
Annotation Based Dependency Lookup
Injection using @Resource, @Inject and @Autowired,
@Qualifier
Spring 4: The @Primary annotation.

Module 5: More in Spring


BeanFactory Vs. ApplicationContext
The 'p' namespace
Using PropertyOverriderConfigurer
Using PropertyPlaceHolderConfigurer
Designing custom property editors

Module 6: Spring-AOP
What are Cross Cutting concerns
Why AOP
Spring AOP
Implementing @Around, @Before and @After
Understanding and writing point cuts
Ordering advices

Day 3 Module 7: Spring-JDBC Overview


Configuring Basic DataSource in Spring
Using JdbcTemplate

Module 8: Spring-Integration: Hibernate


Using Hibernate Configurations in Spring
Using Hibernate Properties in Spring
HibernateTemplate for CRUD operations

Module 9: Spring MVC and How is different from


Struts

Module 10: Spring-Integration: Struts

Module 11: Introduction to TDD and Writing Tests


using Junit

You might also like