-->
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.  [ 7 posts ] 
Author Message
 Post subject: running hibernate outside an app server?
PostPosted: Sun Oct 26, 2003 5:07 am 
Senior
Senior

Joined: Sun Oct 26, 2003 5:05 am
Posts: 139
Can someone please give me some guidance as to how I can run hibernate outside of an app server? Like in the simplest case where I just want to start up hibernate, pass in an xml mapping file and start testing some domain objects. I don't need all the code, just the startup code because everything I have tried doesn't work :/


Top
 Profile  
 
 Post subject:
PostPosted: Sun Oct 26, 2003 5:13 am 
Hibernate Team
Hibernate Team

Joined: Mon Aug 25, 2003 9:11 pm
Posts: 4592
Location: Switzerland
Click on "Documentation" on our website and take the "I have 15 minutes to learn Hibernate" tour. The example source is what you want. Now, that was easy?

_________________
JAVA PERSISTENCE WITH HIBERNATE
http://jpwh.org
Get the book, training, and consulting for your Hibernate team.


Top
 Profile  
 
 Post subject:
PostPosted: Sun Oct 26, 2003 5:22 am 
Senior
Senior

Joined: Sun Oct 26, 2003 5:05 am
Posts: 139
That's with an app server.. I got that working just fine.


Top
 Profile  
 
 Post subject:
PostPosted: Sun Oct 26, 2003 5:25 am 
Hibernate Team
Hibernate Team

Joined: Mon Aug 25, 2003 9:11 pm
Posts: 4592
Location: Switzerland
No, the example source (not in the article, the link which reads "Example Source") is standalone.

_________________
JAVA PERSISTENCE WITH HIBERNATE
http://jpwh.org
Get the book, training, and consulting for your Hibernate team.


Top
 Profile  
 
 Post subject:
PostPosted: Sun Oct 26, 2003 5:25 am 
Hibernate Team
Hibernate Team

Joined: Mon Aug 25, 2003 9:11 pm
Posts: 4592
Location: Switzerland
Sorry, it is of course linked in the "Hibernate Examples", not in the "15 Minutes".

http://www.hibernate.org/hib_docs/examples/

_________________
JAVA PERSISTENCE WITH HIBERNATE
http://jpwh.org
Get the book, training, and consulting for your Hibernate team.


Top
 Profile  
 
 Post subject:
PostPosted: Sun Oct 26, 2003 5:27 am 
Hibernate Team
Hibernate Team

Joined: Mon Aug 25, 2003 9:11 pm
Posts: 4592
Location: Switzerland
Uh, I should wake up before posting. Sorry, we don't have an example for standalone Hibernate usage, because it is actually very easy.

Configure your hibernate.properties or hibernate.cfg.xml with a connection pool (C3P0 is recommended) and do a

SessionFactory sf = new Configuration().configure().buildSessionFactory();

in your main().

_________________
JAVA PERSISTENCE WITH HIBERNATE
http://jpwh.org
Get the book, training, and consulting for your Hibernate team.


Top
 Profile  
 
 Post subject:
PostPosted: Sun Oct 26, 2003 5:40 am 
Senior
Senior

Joined: Sun Oct 26, 2003 5:05 am
Posts: 139
I'll just continue to play with it then.


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

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.