O.K after some time  I see that you set up the session the following way:

Context ctx = new InitialContext();
SessionFactory factory = (SessionFactory)ctx.lookup("java:/DefaultDS");

However the second line throws a ClassCastException because ctx.lookup
returns an Object of type: org.jboss.resource.adapter.jdbc.WrapperDataSource

so all I can do is:
DataSource ds = (DataSource)ctx.lookup("java:/DefaultDS");

How can I obtain a SessionFactory then?


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

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


-------------------------------------------------------
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