Hibernate version 3.2
I am trying to use jndi based connection pooling for Websphere 6.1 application server and use the jndi url in hibernate config to access the database.
I configured these properties
<property name="hibernate.connection.datasource">jdbc/myapp</property>
<property name="hibernate.jndi.class">com.ibm.websphere.naming.WsnInitialContextFactory</property>
<property name="hibernate.transaction.factory_class">org.hibernate.transaction.CMTTransactionFactory</property>
<property name="hibernate.transaction.manager_lookup_class">org.hibernate.transaction.WebSphereExtendedJTATransactionLookup</property>
<property name="hibernate.jndi.url">iiop://localhost:2810/</property>
<property name="current_session_context_class">thread</property>
<property name="cache.provider_class">org.hibernate.cache.NoCacheProvider</property>
I configured datasource/jdbc provider in application deployment descriptor. I have two questions here...
1. If I do not provide connection.username and connection.password in hibernate.config.xml file, which I do not want to do, i am not able to get a database connection. I configured these in datasource properties to fetch values from JAAS.
http://www.hibernate.org/hib_docs/refer ... ation.html
Table 3.2 in that document says that both username and password are optional..
2. When I configure JDBC provider, I have to provide implementation class name as com.mysql.jdbc.Driver for it to work rather than com.mysql.jdbc.jdbc2.optional.MysqlConnectionPoolDataSource..
Thanks!!