[prev in list] [next in list] [prev in thread] [next in thread] 

List:       openejb-user
Subject:    Re: Stateful removal
From:       Jean-Sébastien_Scrève <jean-sebastien.screve () atosorigin ! co
Date:       2008-12-11 16:07:09
Message-ID: 20958454.post () talk ! nabble ! com
[Download RAW message or body]


I checked the spec and I cannot find anything about it.

It's just that I tought it would be logic. What do you think ?



Dain Sundstrom wrote:
> 
> I checked the code and we don't close the EntityManager when the  
> stateful bean is removed.  Do you know if this is a spec defined  
> behavior or something that JBoss just does?
> 
> Also, if this code is called from within a JTA transaction, I wouldn't  
> expect the EntityManager to be closed until the end of the transaction.
> 
> -dain
> 
> On Dec 8, 2008, at 9:10 AM, Jean-Sébastien Scrève wrote:
> 
>>
>> Hi,
>>
>> My configuration is the following : Open 3.1, hibernate 3.2.6.
>>
>> I have a question regarding stateful removal:
>>
>> I retrieve an entity with a stateful object. I navigate through  
>> relations
>> and everything works fine.
>> I then call an @Remove method on the stateful. I kept a reference on  
>> my
>> entity so I try to navigate through the relation again and  
>> everything works
>> still fine.
>> I expected a LazyLoadingException to occur once I removed my  
>> stateful (1-n
>> relationship). Is that right ? In fact Embedded Jboss throws the lazy
>> loading exception under the same circumstances.
>> I haven't tested it yet but I think the correction would be easy : a  
>> close()
>> on the EntityManager would do.
>> I'll investigate more when I have time to.
>>
>> Thanks,
>>
>> Jean-Sébastien Scrève.
>> -- 
>> View this message in context:
>> http://www.nabble.com/Stateful-removal-tp20899366p20899366.html
>> Sent from the OpenEJB User mailing list archive at Nabble.com.
>>
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/Stateful-removal-tp20899366p20958454.html
Sent from the OpenEJB User mailing list archive at Nabble.com.


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic