-->
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.  [ 3 posts ] 
Author Message
 Post subject: Using Hibernate with pure Java
PostPosted: Mon Jul 07, 2008 8:10 pm 
Beginner
Beginner

Joined: Mon Jul 07, 2008 8:07 pm
Posts: 42
Hey all,
Is there any way to do all of my Hibernate setup in just pure Java without the need for ant, external build files, etc? I'm working in Spring and I just don't want to have to mess with all of that extra stuff.

- TK


Top
 Profile  
 
 Post subject:
PostPosted: Mon Jul 07, 2008 10:15 pm 
Expert
Expert

Joined: Tue May 13, 2008 3:42 pm
Posts: 919
Location: Toronto & Ajax Ontario www.hibernatemadeeasy.com
Great question.

Personally, it's a big pet peeve of mine having to configure Ant and master Maven to get a simple tutorial or example from a book to work. I mean, if I want to learn Hibernate, I want to learn Hibernate, not a million different peripheral technologies that have the potential of working with Hibernate.

http://jpa.ezhibernate.com/Javacode/lea ... hhibernate

I acutally have a tutorial on my website, based on my book, Hibernate Made Easy, that sets up a Hibernate environment without any peripheral technologies - just the basics. And when I say basics, I mean:

1. A JDK
2. A Database (I used MySQL)
3. JDBC drivers so the JDK/JRE can connect to the database
4. The Hibernate Core download (and annotations as well)
5. Notepad and the command prompt I guess, for compiling code.

Here's the tutorial on my site:

http://jpa.ezhibernate.com/Javacode/lea ... hhibernate

Let me know what you think!

-Cameron McKenzie

_________________
Cameron McKenzie - Author of "Hibernate Made Easy" and "What is WebSphere?"
http://www.TheBookOnHibernate.com Check out my 'easy to follow' Hibernate & JPA Tutorials


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jul 08, 2008 7:52 pm 
Beginner
Beginner

Joined: Mon Jul 07, 2008 8:07 pm
Posts: 42
I'm working on a spring configuration so I don't understand if I'm supposed to use a hibernate.cfg.xml file or not.

*extremely confused.

Is there any raw way to do it in Java?

Like so:
Code:
Hibernate.connect("jdbc:hsqldb:whatever/database", "username", "password");


And then be immediately be able to work with SessionFactories afterward.

Does anyone know of any good Spring/Hibernate tutorials? I'm crawling the web for 'em. I'm using Red5 with Hibernate and I can't seem to figure this out, It's not working and not throwing any errors...[/code]


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 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.