views:

457

answers:

1

Hi Gurus,

I am setting up Hibernate Annotation (User JPA for mapping) with Spring. (i.e. AnnotationSessionFactoryBean)

I have a few questions

  1. Do I need a hibernate.cfg.xml for mapping?
  2. From the example http://www.zabada.com/tutorials/hibernate-and-jpa-with-spring-example.php, it seems you need to do AOP, do you really need that? I saw a lot of example doesn't have that?

Is there any good tutorial around the web?

Thanks Roy

A: 
  1. The annotations drive the mapping so you don't need the mapping file as well.
  2. I use Spring & Hibernate without AOP so i don't think it's required.

There's a rather terse tutorial here. It's using Spring 3 but i don't think that affects the JPA stuff.

jon hanson
Thanks, it works. I think I did something stupid, I redo the whole thing from scratch and it works now
Roy Chan