As you know, a web container considered unmanaged environment and we have to consider this when we use Hibernate (no JTA). But what if I deployed my application on a full-fleged J2EE application server ? This application is web-based (no EJB components). I mean, can I use JTA transaction if I deployed my hibernate application on J2EE AS (a servlet container within J2EE server , considered a managened environment) ?
posted 11 years ago
Yes i believe you can do it but you have to change your configuration file. Here's an example given in the hibernate reference for a posgersql db
Of course that you must to define the datasource xml and deploy it in your application server, too.