Interface « POJO « JPA Q&A

1. Should raw Hibernate annotated POJO's be returned from the Data Access Layer, or Interfaces instead?

I understand separating the data layer objects (DAOs) in their own layer that abstracts the data access logic and data source specifics from service and business layers as outlined in

2. POJOS implementing interface with static fields

Hi All, Does the Garbage Collector collects the POJO's which implements the interface(which has static fields). I am facing the situvation like the gc is not collecting these POJO's even after the user has signoff from the application.Inturn my application is running out of space. Any thing i need to do , so that these pojos will get collected by GC(). ...

3. Using interfaces with POJOs and HQL

I forgot to mention I use XDoclet 1.2.3. As XDoclet tags are annotated in the implementation classes; XDoclet produce a file named XxxImpl.hbm.xml. The side effect of this is that I have to use XxxImpl in my queries. There is a solution, just add: after the hibernate-doclet task. Then ...

4. Can i use an Interface as a pojo object to be persistent?

i try to use an interface to be persistent. in hbm.xml : name will be ths class name that implements the interface. can i do that? and how can i write serialVersionUID? will be useable? also i want to ask :if i do like this,is some hibernate feature will be lose? BTW:i use hibernate 3.2.1GA thanks!!!