I'm using, happily, Hibernate 3.0.5 with WebSphere 6 and everything works great! ... well, except:
The Issue:
My configure file looks like
<session-factory name="java:hibernate/SessionFactory">
<property name="connection.datasource">jdbc/myDBDev</property>
... ...
while I saw folks in this forum using something like
<property name="connection.datasource">java:comp/env/jdbc/sos</property>
(
http://forum.hibernate.org/viewtopic.php?t=947683 )
Using the ENC (environment naming context) would be ideal as otherwise I have to change the configure file for each environment (DEV, TEST, UAT, PROD).
So my question:
a) how to map the ENC (java:comp/env/jdbc/sos) to JDBC provider data source (jdbc/sos)
b) how to do the look-up and then initialize the Hibernate.
Be advised I might have more than one EJB and I know how to map the resource / EJB references for EJB / Web containers.
TIA
-JB