Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Hiberante annotaions not working in ejb3.0

 
V.N.T.Deepak Solasa
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi
I am using ejb3.0 entities and there in I am trying to use hibernate annotations like @Length,@Email etc.ofcourse I am not getting any run time or compile time problems but my application is not considering the any of the hibernate annotations at all,
For eg,I have a database field articleNum where in I decalared @Length(max=15)

I am wrirting my own validations explicitly.whats the problem
Even i have a necessary jar files also.

Thanks in Advance
Deepak Solasa
 
Z Sugiarto
Ranch Hand
Posts: 58
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello, I'm still pretty new to the EJB 3 scene as well, but I think you have this problem because you need to use Hibernate via the (JPA)Java Persistence API?

The idea behind JPA is for common persistence API, meaning that without changing the code, you can *theoritically* swap Hibernate for Toplink.

If you use hibernate-specific tags, it's breaking away from JPA. That make sense?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic