DataSource « Glassfish « JPA Q&A

1. Unable to acquire data source using GlassFish v3.1

In a nutshell, I'm using WebDriver to automate testing of my Web Application and, for some reason that I just can't figure out, the tests run smoothly when I use GlassFish ...

2. GlassFish v3.1, MSSQL, Hibernate and DataSource

Following configuration works fine : Driver used : sqljdbc_3.0_JDBC4.jar (GlassFish restart required when the driver is copied to "GLASSFISH_HOME/lib") Contents of microsoft_sqlserver2005_datasource.xml ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ /lib/dtds/sun-resources_1_3.dtd*">

3. Specifying datasource during deployment of a JPA based application

Sahoo wrote: > No, AFAIK, there is no solution to your problem. As per JPA spec, > GlassFish reads the DataSource value from persistence.xml. Obviously the > JPA spec authors didn't think of your use case while writing the spec. > But, I do agree you have a genuine issue. > > Thanks, > Sahoo > > wrote: > >> ...

4. Integrating existing customized Datasource and Connection objects in JPA

My requirment is like i would not specify jpa provider in my persistence.xml file. After deploying, the container will pick the default jpa provider. For example, if it is JBOSS, it will pick hibernate as default jpa provider, or if it is WebSphere then it will pick openjpa as default provider. So it depends on App Server that we use.