Joined: Mon Mar 24, 2008 2:55 am Posts: 5
|
Hi,
i am using jndi datasource to get session factory in hibernate.
This is the code
try {
Context ctx = new InitialContext();
System.out.println("check1");
locProviderSessionFactory = (SessionFactory)ctx.lookup("java:/LocationProvider");
System.out.println("check2");
//locProviderSessionFactory = (SessionFactory)obj;
} catch (NamingException e) {
e.printStackTrace();
casting exception is thrown.So i am not able to get the Session Factory.Can anyone help me out in this
Thanks
|
|