Hi,
1) I set up a hibernate.sar file with an appropriate MBean because

2) I did not want to use the "traditional hibernate.cfg.xml or
hibernate.properties method" as the JBoss documentation stated.

3) In another part of the documentation it says that "For use inside
an application server, Hibernate may obtain connections
from a javax.sql.Datasource registered in JNDI."

4) So I added the following to my code:

props.put("hibernate.connection.datasource","java:/DefaultDS");
sessionFactory = new 
Configuration().addProperties(props).configure().buildSessionFactory();

5) But whenever I try to receive a sessionFactory the app throws the following 
Exception:
Exception building SessionFactory: /hibernate.cfg.xml not found.
I thought going the "MBean way" you could skip part 2)?
Please help!

View the original post : 
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3823333#3823333

Reply to the post : 
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3823333


-------------------------------------------------------
SF.Net is sponsored by: Speed Start Your Linux Apps Now.
Build and deploy apps & Web services for Linux with
a free DVD software kit from IBM. Click Now!
http://ads.osdn.com/?ad_id=1356&alloc_id=3438&op=click
_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to