-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: Integrating Hibernate & Jboss in application
PostPosted: Mon Feb 20, 2006 5:04 am 
Newbie

Joined: Mon Feb 20, 2006 4:28 am
Posts: 1
Hi,

I have a problem in integrating jboss 4.0.2 and Hibernate 3.1.I wrote the hibernate service and deployed in jboss,
I connected to the service in a web application and got the SessionFactoty with this code :

InitialContext ctx = new InitialContext();
SessionFactory factory = (SessionFactory)
ctx.lookup("SessionFactory");

It worked fine. But when I want to connect to the service in a windows application it fails.
I configure the jndi.properties file correctly and put it in classpath, then I put the same code and execute in application, the lookup process works fine, but the sessionfactory which is returned is NULL.

Can anyone tell me what the process of connecting in windows application is?
Is the hibernate-cfg.xml in this case is necessary ?

Thanks,


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.