Hibernate Books

All times are UTC - 5 hours [ DST ]



Post new topic Reply to topic  [ 2 posts ] 
Author Message
 Post subject: The best way to use Hibernate for a Java web application
PostPosted: Sun Aug 20, 2017 2:20 am 
Beginner
Beginner

Joined: Tue Aug 08, 2017 12:14 am
Posts: 20
Hi expert,

I'd like to clarify the followings :

1) Do I have to put @Column(name="nameAtDatabase") as per EJB standard.

2) I am using Servlet controller to getParameterName and one of the fields is getParameterValues and it reads the arrays, do I still use List<> on the owner side; the first table ?

3) Is EntityManagerFactory is required to "bootstrap JPA" if I am sine SessionFactory ?

4) Can I just use Tomcat 8 to run hibernate webapp or I have to install at least Tomcat EE?

Tks


Top
 Profile  
 
 Post subject: Re: Is @Column Name necessary if differ database field name etc
PostPosted: Sun Aug 20, 2017 2:32 am 
Hibernate Team
Hibernate Team

Joined: Thu Sep 11, 2014 2:50 am
Posts: 1432
1) Only if the DB column name differs from the entity attribute name you have to provide @Column.

2) You need to transform the data sent via HTTP and populate the JPA entities accordingly. This happens in the Web layer Controllers usually.

3) EntityManagerFactory is needed if you use the JPA interface. If you already use the Hibernate native API, then you don't need JPA since you can get access to all Hibernate functionalities via the native API.

4) You can use any web server or application server you want. Hibernate is just a library that can work even for batch processing tasks.

_________________
If you liked my answer, you are going to love my High-Performance Java Persistence book and my blog as well.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.