JohnCurley wrote:
Any help would be great. I can get Hibernate to work within Weblogic as a Singleton class but can't get the SessionFactory obtained from the JNDI tree. Also, I would like to be able to eventually make use of Weblogic services, such as transactions, etc.
Use something like :
Code:
<hibernate-configuration>
<session-factory name="hibernate.session-factory.Oracle">
<property name="jndi.class">weblogic.jndi.WLInitialContextFactory</property>
<property name="jndi.url">t3://localhost:7001</property>
<!-- ... -->
</session-factory>
</hibernate-configuration>
Also, raise the log level to INFO and see if something like the following is logged :
Code:
- INFO 07-Sep-04 18:18:24:018 net.sf.hibernate.cfg.Configuration: Configured SessionFactory: hibernate.session-factory.Oracle
There are a few
posts elsewhere on the forums regarding this. Also please see this
FAQ.