Mostrar mensagens com a etiqueta JPA. Mostrar todas as mensagens
Mostrar mensagens com a etiqueta JPA. Mostrar todas as mensagens

03 novembro 2015

Book - High-Performance Java Persistence



About the book

This book is a journey into Java data access performance tuning. From connection management, to batch updates, fetch sizes and concurrency control mechanisms, it unravels the inner workings of the most common Java data access frameworks.
The first part aims to reduce the gap between application developers and database administrators. For this reason, it covers both JDBC and the database fundamentals that are of paramount importance when reducing transaction response times.
The second part demonstrates how you can take advantage of JPA and Hibernate without compromising application performance.
The third part is dedicated to jOOQ and its powerful type-safe querying capabilities, like window functions or common table expressions.

More information in:



20 fevereiro 2014

Web Article - Spring 3 and JPA with Hibernate

This article shows how to set up Spring with JPA, using Hibernate as a persistence provider.

The JPA Spring Configuration with Java
@Configuration
@EnableTransactionManagement
public class PersistenceJPAConfig{
 
   @Bean
   public LocalContainerEntityManagerFactoryBean entityManagerFactoryBean() {
      LocalContainerEntityManagerFactoryBean em = new LocalContainerEntityManagerFactoryBean();
      em.setDataSource(dataSource());
      em.setPackagesToScan(new String[] { "org.baeldung.persistence.model" });
 
      JpaVendorAdapter vendorAdapter = new HibernateJpaVendorAdapter();
      em.setJpaVendorAdapter(vendorAdapter);
      em.setJpaProperties(additionalProperties());
 
      return em;
   }
 
   @Bean
   public DataSource dataSource(){
      DriverManagerDataSource dataSource = new DriverManagerDataSource();
      dataSource.setDriverClassName("com.mysql.jdbc.Driver");
      dataSource.setUrl("jdbc:mysql://localhost:3306/spring_jpa");
      dataSource.setUsername( "tutorialuser" );
      dataSource.setPassword( "tutorialmy5ql" );
      return dataSource;
   }
 
   @Bean
   public PlatformTransactionManager transactionManager(EntityManagerFactory emf){
      JpaTransactionManager transactionManager = new JpaTransactionManager();
      transactionManager.setEntityManagerFactory(emf);
 
      return transactionManager;
   }
 
   @Bean
   public PersistenceExceptionTranslationPostProcessor exceptionTranslation(){
      return new PersistenceExceptionTranslationPostProcessor();
   }
 
   Properties additionalProperties() {
      return new Properties() {
         {  // Hibernate Specific: 
            setProperty("hibernate.hbm2ddl.auto", "create-drop");
            setProperty("hibernate.dialect", "org.hibernate.dialect.MySQL5Dialect");
         }
      };
   }
}
The JPA Spring Configuration with XML

 
   
      
      
      
         
      
      
         
            create-drop
            org.hibernate.dialect.MySQL5Dialect
         
      
   
 
   
      
      
      
      
   
 
   
      
   
   
 
   
 

This Spring JPA Tutorial can be found in the github project – this is an Eclipse based project, so it should be easy to import and run as it is.
Source and full article in Baeldung.com


17 novembro 2013

Web Tutorials

Web Tutorials

JAVA
Simple Java Database Swing Application
How to Send Email from Java Program with Example
Java ResourceBundle Example

Creating Maven Projects
Hibernate 3 with Maven 2 and MySQL 5 Example (XML Mapping and Annotation)
How to create a EJB 3.x project using Maven in Eclipse – Part 1
Setup of Dynamic Web Project using Maven
Create Web Application Project with Maven Example

JMS
Spring JMS Example

Java EE7 and Maven
Java EE7 and Maven project for newbies - part1 part2 part3 part4 part5 part6 part7 part8
Spring JPA Data + Hibernate + MySQL + MAVEN
Spring MVC Hello World Example
Spring MVC File Upload Example
Spring MVC beginner tutorial with Spring Tool Suite IDE
Upload Files to Database with Spring MVC and Hibernate

Logging 
Logback
Logback Configuration Example

WELD - Java Contexts and Dependency Injection for the Java EE platform (CDI)
DI (Dependency Injection) / CDI – Basics
Writing JSR-352 style jobs with Spring Batch Part 2: Dependency injection

Spring Data MongoDB
Spring Data MongoDB with Java config

JPA
JPA Tutorial: Setting Up JPA in a Java SE Environment
JPA Tutorial: Mapping Entities – Part 1 - Part 2 - Part 3

Hibernate
Hibernate annotations example
Hibernate tutorial with Eclipse

Persistence
The DAO with JPA and Spring
How to maintain history of tables in Hibernate

Android Tutorials
Android Development Tutorial

13 agosto 2013

Free Java EE 6 Video Tutorial

Free online tutorial about JPA, EJB 3, JSF, JMS, JAX-RS and CDI. The tutorial starts from the very basics and teaches Java EE, API by API/feature by feature, through a series of progressive code examples that build on the one before it. The tutorial uses GlassFish, NetBeans and MySQL.

15 julho 2013

Java EE 7 - Articles

A large collection of articles about Java EE 7 and its sub-specs, such as JSF 2.2, JPA 2.1, JMS 2.0, CDI 1.1, etc. The full articles here https://javaee7.zeef.com/.

28 junho 2013

Java EE 7's JSF 2.2, Interceptors 1.2, and JPA 2.1 Intro Videos

Java EE 7 Launch Webinar sessions.

Here's the JSF 2.2 session:


Here's the Interceptors 1.1 session:


Here's the JPA 2.1 session:



01 junho 2013

Setup of Dynamic Web Project using Maven

Good article that show how to create a Dynamic Web Project using Maven.
Full article here.

In same blog i found other interesting article about
Spring JPA Data + Hibernate + MySQL + MAVEN that show how we can develop a web-applications with the help of Spring MVC.

22 abril 2013

How to Create a Java EE 6 Application with JSF 2, EJB 3.1, JPA, and NetBeans IDE 6.8

"The architecture of the application is shown in the above diagram, where it is organized into various tiers: Presentation, Business, Data Access and Data, where each has an important role to play and is segregated from one another."

Writed by Christopher Lam in DZone