[jboss-user] [EJB 3.0] - Re: failed to lazily initialize a collection of role:

negora do-not-reply at jboss.com
Fri May 8 11:32:44 EDT 2009


Wow, what a chance! Today, 8th May of 2009, I've found this thread in Google but was doubting about posting here because of the age of the messages. However I've realized that you've taken it back to life just a few hours ago, ha ha ha. So it's an excellent moment to ask :) .

I'm still a beginner with EJB, JBoss and many of the J2EE features, so I have many doubts and much to learn yet. One of my "Achilles heels" has always been this error and its meaning. Thanks to your explanation, Wolfgang, I've been able to understand and prevent it.

My problem was that I tried to recover collections when the entity manager had lost any control over the entity. For example, I did it in a different method of my session bean than the one which retrieved the entity. And thus... The mentioned exception was triggered.

My question is the following one: How long does the control of the entity manager over the entity last? Only during the execution of the method in which the entity manager retrieved that entity?

Again, thank you very much Wolfgang and the rest of people who helps us, the beginners :D .

View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4229768#4229768

Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4229768



More information about the jboss-user mailing list