girishmallampalli wrote:
then do you mean that
Configuration cfg = new Configuration()
setProperty("hibernate.connection.datasource", "java:comp/env/jdbc/test")
It depends on how you configure Hibernate. For example, with a classical config, it could just mean put the hibernate.connection.datasource tag in the hibernate.cfg.xml file.
But basically, yes, it's the same principle.
girishmallampalli wrote:
then do you mean that
the "java:comp/env/jdbc/test" will be my java class returning the connection.
Well... Not a class.
Actually, Hibernate will retrieve a java.sql.Datasource with this property. But you don't even need to know it since it's managed in Hibernate internals and works fine :-).