This is much to broad a topic to address in a forum response. I'd suggest reading Java Persistence with Hibernate, there is a ton of information that will help you make an educated decision. In general, you should configure a container managed DataSource (-ds.xml in JBoss, <Resource> / <ResourceParams> in Tomcat or DBCP in Spring) and use declarative Transaction management. EJB3 makes all this pretty painless, as does Spring (the latter requires more configuration).
HTH,
Chris
_________________ Chris Bredesen Senior Software Maintenance Engineer, JBoss
|