On Friday at 3:01pm, MB=>Musachy Barroso <[EMAIL PROTECTED]> wrote:

MB> I'm using it, and I love it, the only problem I've found so far is 
MB> that errors and exceptions do not help at all, like this one I get 
MB> from time to time (got it 2 minutes ago):
MB> 
MB> javax.servlet.ServletException: java.lang.IllegalStateException: 
MB> Attempting to execute an operation on a closed EntityManager.
MB> 
MB> which is thrown when you don't mark your read only service method as
MB> @Transactional(readOnly = true). I have had to debug toplink more than
MB> once just to figure out what is wrong on my code. Besides that, it
MB> works like a charm :) (for me)
MB> 

Hi Musachy, Ted,

I thought I was the only one. I had a tough time getting that 
@Transactional(readOnly = true) sorted out as well. For DAOs that only 
have read only operations, I typically annotate with @Transactional at the 
class level and then with @Transactional(readOnly = true) on all the 
methods. Is that the case for you as well?

For exception handling, I've been using spring AOP annotations since I 
also wanted to do some logging using the same SystemArchitecture, so I 
have'nt tried the @Repository spring exception handling.

I've been using Toplink Essentials JPA. Its been mostly painless.

MB> 
MB> musachy
MB> 

Later,
--
Haroon Rafique
<[EMAIL PROTECTED]>


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to