This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
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,
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com
subject: Enabling Connection pretest in hibernate.cfg.xml