I have installed Hibernate Tools Eclipse plug-in for Eclipse Indigo as I want to use the ability to test my HQL queries and try running them against my database and parse the results 'live'.
In my hibernate.cfg.xml
file I have defined a JNDI connection as shown below:
<property name="connection.datasource">java:/comp/env/jdbc/acertDB</property>
Because I have a JNDI file I am using a context.xml
file which defines the connection and exists in my META-INF folder. The entire contents of this file are below.
<Context crossContext="true" docBase="acert" path="/acert" reloadable="false" useHttpOnly="true">
<ResourceLink global="jdbc/acertDB" name="jdbc/acertDB" type="javax.sql.DataSource" />
</Context>
I am using Tomcat to manage my database connections via the following entry.
My web application is functioning fine. Only configuring the connection for Hibernate Tools is my problem.
My question is how can I establish a connection with Hibernate Tools and not have to create an additional properties file that contains all of my connection info or put all of my connection info in hibernate.cfg.xml
?