• Post Reply Bookmark Topic Watch Topic
  • New Topic

Struggling with simple Hibernate Query  RSS feed

Thomas Becker
Posts: 23
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hey everybody,

this is my very first post at JavaRanch. I'm reading here now since I started with Java (around a year ago) and always found a way to solve my problems by myself or by searching.

Ok, I'm trying to do my very first steps in ORM with Hibernate. I want to combine stateless session beans (mainly to learn how to deal with lomboz) with Hibernate as a persistence layer. Till yesterday I was running with hibernate2.x, but I decided to migrate to hibernate3 today because of some nice new features and since I have to learn it anyway...why don't start with the modern release.

Here's my hbm.xml:

My hibernate.cfg.xml:

And here's the method from my ejb, which is currently now working. It looks ugly since I'm adding and rewriting the code since hours to get it work:

It works fine, but I had to install ANTLR to get it running. Could anyone tell me, why this simple createQuery needs ANTLR and why it is neither mentioned in any tutorial I found nor in the documentation on hibernate.org?

And what do you experienced guys think about the combination of stateless session beans (and for sure all the other J2EE stuff if needed) and hibernate?

Thanks a lot in advance guys! Hope my questions are not to stupid.
[ March 29, 2005: Message edited by: Thomas Becker ]
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!