I am using hibernate 3.0. I have created a datasource.... i want to enable the Pretest connection properties through hibernate.cfg.xml. Is it possbile..?? if yes, can someone help how to enable it..? which property i need to add in hibernate.cfg.xml to enable the pretest connection property?
I am not sure whether this is exactly your requirement or not . I am confused with 'Pretest connection'.
According to my understanding you have configured some datasource in hibernate.cfg.xml as below,
Now you want to test this configuration. For this you need to configured datasource on server. For example on jboss we can configure datasource details in some xml file as below
You need to find out same for Websphere .After these configuration when you will start the server and deploy application(which will contains hibernate.cfg.xml file) you can access database connection as below,
or you can get hibernate session as below,
subject: Enabling Connection pretest in hibernate.cfg.xml