title: JAXb, Hibernate and beans
body: <p>Currently I am working on a project with Spring web-service, hibernate and JAXb.</p>
  
  <p>1) I have generated hibernate beans using IDE 'hibernate code generation, </p>
  
  <p>2) also, I have generated the jaxb beans using maven compiler.</p>
  
  <p>.. </p>
  
  <p>Now, my question is, </p>
  
  <p>1) Is this the right approach? (to have so many beans).</p>
  
  <p>2) Shall I use JAXb beans for processing into the service layer? How can I keep layers decoupled?</p>
  
  <p>3) Or, do I need to create another set of beans ie. map (JAXb beans) to (new beans) to (hibernate beans)?</p>
  
  <p>.</p>
  
  <p>Please tell your views?</p>
  
  <p>Thanks,
  adi</p>