[jboss-user] [Beginner's Corner] - Hibernate sessions in JBoss AS7 using JPA

Chris Cooper do-not-reply at jboss.com
Thu Aug 1 08:44:54 EDT 2013


Chris Cooper [https://community.jboss.org/people/ccooperfos] created the discussion

"Hibernate sessions in JBoss AS7 using JPA"

To view the discussion, visit: https://community.jboss.org/message/830944#830944

--------------------------------------------------------------
Apologies if this isn't the right forum, if it's not please direct me to a more appropriate location!

After following the reverse engineering tutorial ( http://docs.jboss.org/tools/movies/#hibreveng http://docs.jboss.org/tools/movies/#hibreveng) I've successfully generated a set of entities from database tables. However when trying to duplicate the example REST services from the sample application for another entity (in this case, Film from the sakila database) I run into a problem - the entity isn't able to lazily load the collections that are part of it.

I've done some Hibernate work before but not using JPA or EJB annotations and am now stuck as to how I should be handling requests like this. I've found some stuff about writing an interceptor to manually create Sessions but was wondering if there was a clear set of instructions as to how this is best achieved (preferably I'd like some instruction on a continuation of the example application used in the video linked to above!)

Thanks to anyone who can provide assistance!
--------------------------------------------------------------

Reply to this message by going to Community
[https://community.jboss.org/message/830944#830944]

Start a new discussion in Beginner's Corner at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2075]

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-user/attachments/20130801/5b262f68/attachment-0001.html 


More information about the jboss-user mailing list