tomee-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Harald Wellmann <hwellmann...@gmail.com>
Subject Re: JPA Load-Time Enhancement
Date Sat, 20 Oct 2012 10:06:17 GMT
Yes, that works, but it's extremely inconvenient for interactive use.

I have a few hundred JUnit test classes in my workspace which I'd like 
to run with one click (Eclipse: Run As | JUnit Test). Adding a 
-javaagent option to each and every test launcher is out of the question.

I'm just wondering why this agent is required at all. Doesn't Tomcat 
offer a hook to intercept class loading, allowing the ClassTransformer 
to enhance the JPA entity classes?

Best regards,
Harald


Am 20.10.2012 11:06, schrieb Romain Manni-Bucau:
> Put it in surefire or launcher for embedded case and arquillian.xml for
> remote one (catalina_opts property)
> Le 20 oct. 2012 10:30, "Harald Wellmann" <hwellmann.de@gmail.com> a écrit :
>
>> Am 19.10.2012 21:42, schrieb Romain Manni-Bucau:
>>
>>> Load time enhancement simply needs the openejb javaagent (added by
>>> default)
>>>
>>
>> Good to know, thanks. But that won't help in embedded usage - e.g. for
>> integration tests with Pax Exam or Arquillian. You want to run tests
>> directly from the IDE without having to add -javaagent options manually to
>> each and every test launcher.
>>
>> Best regards,
>> Harald
>>
>>
>>   Le 19 oct. 2012 21:15, "Harald Wellmann" <hwellmann.de@gmail.com> a
>>> écrit :
>>>
>>>   Looking for load time enhancement support in TomEE, the only information
>>>> I've found is this article:
>>>>
>>>> http://rmannibucau.wordpress.****com/2012/07/26/tomee-and-**
>>>> openejb-jpa-deploy-time-****enhancement/<http://**
>>>> rmannibucau.wordpress.com/**2012/07/26/tomee-and-openejb-**
>>>> jpa-deploy-time-enhancement/<http://rmannibucau.wordpress.com/2012/07/26/tomee-and-openejb-jpa-deploy-time-enhancement/>
>>>>>
>>>>
>>>> Now this kind of deploy-time enhancement is certainly better than
>>>> build-time enhancement which ties your model classes to OpenJPA, but I
>>>> think this is rather brute force compared to real load-time enhancement
>>>> by
>>>> means of PersistenceUnitInfo.****addClassTransformer().
>>>>
>>>> GlassFish, Aries and Pax JPA all use this method which works smoothly
>>>> with
>>>> OpenJPA.
>>>>
>>>> Is this on the agenda for TomEE?
>>>>
>>>> Best regards,
>>>> Harald
>>>>
>>>>
>>>
>>
>


Mime
View raw message