You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomee.apache.org by Romain Manni-Bucau <rm...@gmail.com> on 2012/07/12 15:07:34 UTC

javaagent?

Hi,

anyone has an idea why we use a javaagent?

from what i saw it mainly runs the openjpa transformer...

i don't really see why it is needed since if entities are enhanced at build
time that's more efficient and not needed, if the user wants to do it at
runtime he can add the openjpa javaagent.

why i ask is mainly because in java it breaks the runtime because it tries
to load the class we are loading the it leads to some LinkageErrors....

I would like to remove it from TomEE so please shout if yo uknow why we
have it in place.

- Romain

Re: javaagent?

Posted by Romain Manni-Bucau <rm...@gmail.com>.
i understand but it needs to load entities too and that's not logical for me

- Romain


2012/7/15 Mark Struberg <st...@yahoo.de>

>
>
> It's not the entity class which is the problem but some OpenJPA core
> classes which get loaded as well. E.g. PersistenceCapable, the
> Configuration stuff and others...
>
> LieGrue,
> strub
>
> >________________________________
> > From: Romain Manni-Bucau <rm...@gmail.com>
> >To: dev@openejb.apache.org; Mark Struberg <st...@yahoo.de>
> >Sent: Sunday, July 15, 2012 5:33 PM
> >Subject: Re: javaagent?
> >
> >
> >typically for deploy time enhancement i created a temp classloader only
> for the enhancement since the enhancing needs to load the clss (WTF? asm
> doesnt need it normally! is it because of serp?)
> >
> >- Romain
> >
> >
> >
> >2012/7/15 Mark Struberg <st...@yahoo.de>
> >
> >Might be the same issue I experienced here:
> >>https://issues.apache.org/jira/browse/OPENJPA-1454
> >>
> >>The bug is closed as there have been improvements for a few scenarios.
> But the basic problem still exists.
> >>
> >>I did not reopen the bug as I have an idea how to fix that: Creating an
> own ClassLoader for the enhancer and prevent trashing the SystemClassLoader
> that way.
> >>
> >>Of course that still might get you weird results as we might pick up the
> OpenJPA classes provided by TomEE to enhance the classes, and later using
> the OpenJPA classes provided by the user in WEB-INF/lib/
> >>
> >>
> >>
> >>LieGrue,
> >>strub
> >>
> >>
> >>
> >>----- Original Message -----
> >>
> >>> From: Romain Manni-Bucau <rm...@gmail.com>
> >>> To: dev@openejb.apache.org
> >>> Cc:
> >>> Sent: Saturday, July 14, 2012 12:07 AM
> >>> Subject: Re: javaagent?
> >>>
> >>> active back the javaagent,
> >>>
> >>> run tests on openejb-core.
> >>>
> >>> BundleUtils (from openjpa) will be in linkagerror
> >>>
> >>> - Romain
> >>>
> >>>
> >>> 2012/7/14 David Blevins <da...@gmail.com>
> >>>
> >>>>
> >>>>  On Jul 13, 2012, at 3:01 PM, Romain Manni-Bucau wrote:
> >>>>
> >>>>  > not the same issue at all
> >>>>  >
> >>>>  > i spoke about java 7, this error was with j6 too
> >>>>
> >>>>  Any steps to reproduce this error?
> >>>>
> >>>>
> >>>>  -David
> >>>>
> >>>>  >
> >>>>  > 2012/7/13 David Blevins <da...@gmail.com>
> >>>>  >
> >>>>  >>
> >>>>  >> On Jul 12, 2012, at 6:07 AM, Romain Manni-Bucau wrote:
> >>>>  >>
> >>>>  >>> why i ask is mainly because in java it breaks the runtime
> >>> because it
> >>>>  >> tries
> >>>>  >>> to load the class we are loading the it leads to some
> >>> LinkageErrors....
> >>>>  >>
> >>>>  >> I was able to reproduce the most recent LinkageError
> >>>>  >> (ResourceLocalCdiEmTest) with no javaagent installed.
> >>>>  >>
> >>>>  >> Not sure how you tested that removing the javaagent fixed a
> >>>>  LinkageError,
> >>>>  >> but it might be coincidence.
> >>>>  >>
> >>>>  >>
> >>>>  >> -David
> >>>>  >>
> >>>>  >>
> >>>>
> >>>>
> >>>
> >>
> >
> >
> >
>

Re: javaagent?

Posted by Mark Struberg <st...@yahoo.de>.

It's not the entity class which is the problem but some OpenJPA core classes which get loaded as well. E.g. PersistenceCapable, the Configuration stuff and others...

LieGrue,
strub

>________________________________
> From: Romain Manni-Bucau <rm...@gmail.com>
>To: dev@openejb.apache.org; Mark Struberg <st...@yahoo.de> 
>Sent: Sunday, July 15, 2012 5:33 PM
>Subject: Re: javaagent?
> 
>
>typically for deploy time enhancement i created a temp classloader only for the enhancement since the enhancing needs to load the clss (WTF? asm doesnt need it normally! is it because of serp?)
>
>- Romain
>
>
>
>2012/7/15 Mark Struberg <st...@yahoo.de>
>
>Might be the same issue I experienced here:
>>https://issues.apache.org/jira/browse/OPENJPA-1454
>>
>>The bug is closed as there have been improvements for a few scenarios. But the basic problem still exists.
>>
>>I did not reopen the bug as I have an idea how to fix that: Creating an own ClassLoader for the enhancer and prevent trashing the SystemClassLoader that way.
>>
>>Of course that still might get you weird results as we might pick up the OpenJPA classes provided by TomEE to enhance the classes, and later using the OpenJPA classes provided by the user in WEB-INF/lib/
>>
>>
>>
>>LieGrue,
>>strub
>>
>>
>>
>>----- Original Message -----
>>
>>> From: Romain Manni-Bucau <rm...@gmail.com>
>>> To: dev@openejb.apache.org
>>> Cc:
>>> Sent: Saturday, July 14, 2012 12:07 AM
>>> Subject: Re: javaagent?
>>>
>>> active back the javaagent,
>>>
>>> run tests on openejb-core.
>>>
>>> BundleUtils (from openjpa) will be in linkagerror
>>>
>>> - Romain
>>>
>>>
>>> 2012/7/14 David Blevins <da...@gmail.com>
>>>
>>>>
>>>>  On Jul 13, 2012, at 3:01 PM, Romain Manni-Bucau wrote:
>>>>
>>>>  > not the same issue at all
>>>>  >
>>>>  > i spoke about java 7, this error was with j6 too
>>>>
>>>>  Any steps to reproduce this error?
>>>>
>>>>
>>>>  -David
>>>>
>>>>  >
>>>>  > 2012/7/13 David Blevins <da...@gmail.com>
>>>>  >
>>>>  >>
>>>>  >> On Jul 12, 2012, at 6:07 AM, Romain Manni-Bucau wrote:
>>>>  >>
>>>>  >>> why i ask is mainly because in java it breaks the runtime
>>> because it
>>>>  >> tries
>>>>  >>> to load the class we are loading the it leads to some
>>> LinkageErrors....
>>>>  >>
>>>>  >> I was able to reproduce the most recent LinkageError
>>>>  >> (ResourceLocalCdiEmTest) with no javaagent installed.
>>>>  >>
>>>>  >> Not sure how you tested that removing the javaagent fixed a
>>>>  LinkageError,
>>>>  >> but it might be coincidence.
>>>>  >>
>>>>  >>
>>>>  >> -David
>>>>  >>
>>>>  >>
>>>>
>>>>
>>>
>>
>
>
>

Re: javaagent?

Posted by Romain Manni-Bucau <rm...@gmail.com>.
typically for deploy time enhancement i created a temp classloader only for
the enhancement since the enhancing needs to load the clss (WTF? asm doesnt
need it normally! is it because of serp?)

- Romain


2012/7/15 Mark Struberg <st...@yahoo.de>

> Might be the same issue I experienced here:
> https://issues.apache.org/jira/browse/OPENJPA-1454
>
> The bug is closed as there have been improvements for a few scenarios. But
> the basic problem still exists.
>
> I did not reopen the bug as I have an idea how to fix that: Creating an
> own ClassLoader for the enhancer and prevent trashing the SystemClassLoader
> that way.
>
> Of course that still might get you weird results as we might pick up the
> OpenJPA classes provided by TomEE to enhance the classes, and later using
> the OpenJPA classes provided by the user in WEB-INF/lib/
>
>
> LieGrue,
> strub
>
>
>
> ----- Original Message -----
> > From: Romain Manni-Bucau <rm...@gmail.com>
> > To: dev@openejb.apache.org
> > Cc:
> > Sent: Saturday, July 14, 2012 12:07 AM
> > Subject: Re: javaagent?
> >
> > active back the javaagent,
> >
> > run tests on openejb-core.
> >
> > BundleUtils (from openjpa) will be in linkagerror
> >
> > - Romain
> >
> >
> > 2012/7/14 David Blevins <da...@gmail.com>
> >
> >>
> >>  On Jul 13, 2012, at 3:01 PM, Romain Manni-Bucau wrote:
> >>
> >>  > not the same issue at all
> >>  >
> >>  > i spoke about java 7, this error was with j6 too
> >>
> >>  Any steps to reproduce this error?
> >>
> >>
> >>  -David
> >>
> >>  >
> >>  > 2012/7/13 David Blevins <da...@gmail.com>
> >>  >
> >>  >>
> >>  >> On Jul 12, 2012, at 6:07 AM, Romain Manni-Bucau wrote:
> >>  >>
> >>  >>> why i ask is mainly because in java it breaks the runtime
> > because it
> >>  >> tries
> >>  >>> to load the class we are loading the it leads to some
> > LinkageErrors....
> >>  >>
> >>  >> I was able to reproduce the most recent LinkageError
> >>  >> (ResourceLocalCdiEmTest) with no javaagent installed.
> >>  >>
> >>  >> Not sure how you tested that removing the javaagent fixed a
> >>  LinkageError,
> >>  >> but it might be coincidence.
> >>  >>
> >>  >>
> >>  >> -David
> >>  >>
> >>  >>
> >>
> >>
> >
>

Re: javaagent?

Posted by Mark Struberg <st...@yahoo.de>.
Might be the same issue I experienced here:
https://issues.apache.org/jira/browse/OPENJPA-1454

The bug is closed as there have been improvements for a few scenarios. But the basic problem still exists.

I did not reopen the bug as I have an idea how to fix that: Creating an own ClassLoader for the enhancer and prevent trashing the SystemClassLoader that way. 

Of course that still might get you weird results as we might pick up the OpenJPA classes provided by TomEE to enhance the classes, and later using the OpenJPA classes provided by the user in WEB-INF/lib/ 


LieGrue,
strub



----- Original Message -----
> From: Romain Manni-Bucau <rm...@gmail.com>
> To: dev@openejb.apache.org
> Cc: 
> Sent: Saturday, July 14, 2012 12:07 AM
> Subject: Re: javaagent?
> 
> active back the javaagent,
> 
> run tests on openejb-core.
> 
> BundleUtils (from openjpa) will be in linkagerror
> 
> - Romain
> 
> 
> 2012/7/14 David Blevins <da...@gmail.com>
> 
>> 
>>  On Jul 13, 2012, at 3:01 PM, Romain Manni-Bucau wrote:
>> 
>>  > not the same issue at all
>>  >
>>  > i spoke about java 7, this error was with j6 too
>> 
>>  Any steps to reproduce this error?
>> 
>> 
>>  -David
>> 
>>  >
>>  > 2012/7/13 David Blevins <da...@gmail.com>
>>  >
>>  >>
>>  >> On Jul 12, 2012, at 6:07 AM, Romain Manni-Bucau wrote:
>>  >>
>>  >>> why i ask is mainly because in java it breaks the runtime 
> because it
>>  >> tries
>>  >>> to load the class we are loading the it leads to some 
> LinkageErrors....
>>  >>
>>  >> I was able to reproduce the most recent LinkageError
>>  >> (ResourceLocalCdiEmTest) with no javaagent installed.
>>  >>
>>  >> Not sure how you tested that removing the javaagent fixed a
>>  LinkageError,
>>  >> but it might be coincidence.
>>  >>
>>  >>
>>  >> -David
>>  >>
>>  >>
>> 
>> 
> 

Re: javaagent?

Posted by Romain Manni-Bucau <rm...@gmail.com>.
active back the javaagent,

run tests on openejb-core.

BundleUtils (from openjpa) will be in linkagerror

- Romain


2012/7/14 David Blevins <da...@gmail.com>

>
> On Jul 13, 2012, at 3:01 PM, Romain Manni-Bucau wrote:
>
> > not the same issue at all
> >
> > i spoke about java 7, this error was with j6 too
>
> Any steps to reproduce this error?
>
>
> -David
>
> >
> > 2012/7/13 David Blevins <da...@gmail.com>
> >
> >>
> >> On Jul 12, 2012, at 6:07 AM, Romain Manni-Bucau wrote:
> >>
> >>> why i ask is mainly because in java it breaks the runtime because it
> >> tries
> >>> to load the class we are loading the it leads to some LinkageErrors....
> >>
> >> I was able to reproduce the most recent LinkageError
> >> (ResourceLocalCdiEmTest) with no javaagent installed.
> >>
> >> Not sure how you tested that removing the javaagent fixed a
> LinkageError,
> >> but it might be coincidence.
> >>
> >>
> >> -David
> >>
> >>
>
>

Re: javaagent?

Posted by David Blevins <da...@gmail.com>.
On Jul 13, 2012, at 3:01 PM, Romain Manni-Bucau wrote:

> not the same issue at all
> 
> i spoke about java 7, this error was with j6 too

Any steps to reproduce this error?


-David

> 
> 2012/7/13 David Blevins <da...@gmail.com>
> 
>> 
>> On Jul 12, 2012, at 6:07 AM, Romain Manni-Bucau wrote:
>> 
>>> why i ask is mainly because in java it breaks the runtime because it
>> tries
>>> to load the class we are loading the it leads to some LinkageErrors....
>> 
>> I was able to reproduce the most recent LinkageError
>> (ResourceLocalCdiEmTest) with no javaagent installed.
>> 
>> Not sure how you tested that removing the javaagent fixed a LinkageError,
>> but it might be coincidence.
>> 
>> 
>> -David
>> 
>> 


Re: javaagent?

Posted by Romain Manni-Bucau <rm...@gmail.com>.
not the same issue at all

i spoke about java 7, this error was with j6 too

- Romain


2012/7/13 David Blevins <da...@gmail.com>

>
> On Jul 12, 2012, at 6:07 AM, Romain Manni-Bucau wrote:
>
> > why i ask is mainly because in java it breaks the runtime because it
> tries
> > to load the class we are loading the it leads to some LinkageErrors....
>
> I was able to reproduce the most recent LinkageError
> (ResourceLocalCdiEmTest) with no javaagent installed.
>
> Not sure how you tested that removing the javaagent fixed a LinkageError,
> but it might be coincidence.
>
>
> -David
>
>

Re: javaagent?

Posted by David Blevins <da...@gmail.com>.
On Jul 12, 2012, at 6:07 AM, Romain Manni-Bucau wrote:

> why i ask is mainly because in java it breaks the runtime because it tries
> to load the class we are loading the it leads to some LinkageErrors....

I was able to reproduce the most recent LinkageError (ResourceLocalCdiEmTest) with no javaagent installed.

Not sure how you tested that removing the javaagent fixed a LinkageError, but it might be coincidence.


-David


Re: javaagent?

Posted by Romain Manni-Bucau <rm...@gmail.com>.
seems it is fine for openejb-core where cmp are tested

i didnt get " We cannot use the default openjpa javagent because of some
classloader
reasons (classes must be enhanced first). "...isnt it the goal of the
javaaagent?

well by the way fro all i read we cannot encourage javagaagent or
subclassing with openjpa (exceted for testing where javaagent is a pain)

- Romain


2012/7/12 Jean-Louis MONTEIRO <je...@gmail.com>

> Hi,
>
> AFAIR, it's only used to enhance JPA entities because that is needed with
> OpenJPA.
> We cannot use the default openjpa javagent because of some classloader
> reasons (classes must be enhanced first).
>
> Just be careful cause we currently support EJB 2 CMP entity beans. Behind
> the cover, we use JPA and OpenJPA to manage CMP entities. That means if you
> remove the javaagent, we won't be able to support CMP out of the box.
>
> Isn't it?
>
> Jean-Louis
>
>
> 2012/7/12 Romain Manni-Bucau <rm...@gmail.com>
>
> > Hi,
> >
> > anyone has an idea why we use a javaagent?
> >
> > from what i saw it mainly runs the openjpa transformer...
> >
> > i don't really see why it is needed since if entities are enhanced at
> build
> > time that's more efficient and not needed, if the user wants to do it at
> > runtime he can add the openjpa javaagent.
> >
> > why i ask is mainly because in java it breaks the runtime because it
> tries
> > to load the class we are loading the it leads to some LinkageErrors....
> >
> > I would like to remove it from TomEE so please shout if yo uknow why we
> > have it in place.
> >
> > - Romain
> >
>

Re: javaagent?

Posted by Romain Manni-Bucau <rm...@gmail.com>.
Was a troll? That's not obvious :p
Le 12 juil. 2012 19:08, "Mark Struberg" <st...@yahoo.de> a écrit :

> >BTW, regarding OpenEJB, it will require a lot of refactoring if we wanna
> remove CMP, EJB 2, etc.
>
> But it would make OpenEJB likely quite a lot leaner and faster!
>
> LieGrue,
> strub
>
>
>
>
> >________________________________
> > From: Jean-Louis MONTEIRO <je...@gmail.com>
> >To: dev@openejb.apache.org; Mark Struberg <st...@yahoo.de>
> >Sent: Thursday, July 12, 2012 6:35 PM
> >Subject: Re: javaagent?
> >
> >
> >Mark,
> >
> >Regarding CMP, it's still in as far as I know. As I said, it's managed
> under the cover as JPA entities and therefore by OpenJPA.
> >In the spec EJB 3.2 (ongoing), we decide to split what is required and
> what is optional.
> >
> >So CMP is still required in Web Profile because the Web Profile is based
> on EJB 3.1.
> >But I hope next time we can get rid of old things.
> >
> >BTW, regarding OpenEJB, it will require a lot of refactoring if we wanna
> remove CMP, EJB 2, etc.
> >
> >Jean-Louis
> >
> >
> >
> >2012/7/12 Mark Struberg <st...@yahoo.de>
> >
> >I fully agree that the javaagent has plenty of issues (both inOpenJPA,
> but mostly in Java itself) and shall only be used as last resort.
> >>
> >>But I hope TomEE doesn't do any CMP processing anymore, isn't? That
> would be a shame, as CMP got ditched a long time ago and is not part of the
> EE6 WebProfile afaik, isn't?
> >>
> >>LieGrue,
> >>strub
> >>
> >>
> >>
> >>
> >>----- Original Message -----
> >>> From: Jean-Louis MONTEIRO <je...@gmail.com>
> >>> To: dev@openejb.apache.org
> >>> Cc:
> >>> Sent: Thursday, July 12, 2012 3:13 PM
> >>> Subject: Re: javaagent?
> >>>
> >>> Hi,
> >>>
> >>> AFAIR, it's only used to enhance JPA entities because that is needed
> with
> >>> OpenJPA.
> >>> We cannot use the default openjpa javagent because of some classloader
> >>> reasons (classes must be enhanced first).
> >>>
> >>> Just be careful cause we currently support EJB 2 CMP entity beans.
> Behind
> >>> the cover, we use JPA and OpenJPA to manage CMP entities. That means
> if you
> >>> remove the javaagent, we won't be able to support CMP out of the box.
> >>>
> >>> Isn't it?
> >>>
> >>> Jean-Louis
> >>>
> >>>
> >>> 2012/7/12 Romain Manni-Bucau <rm...@gmail.com>
> >>>
> >>>>  Hi,
> >>>>
> >>>>  anyone has an idea why we use a javaagent?
> >>>>
> >>>>  from what i saw it mainly runs the openjpa transformer...
> >>>>
> >>>>  i don't really see why it is needed since if entities are enhanced at
> >>> build
> >>>>  time that's more efficient and not needed, if the user wants to do it
> >>> at
> >>>>  runtime he can add the openjpa javaagent.
> >>>>
> >>>>  why i ask is mainly because in java it breaks the runtime because it
> tries
> >>>>  to load the class we are loading the it leads to some
> LinkageErrors....
> >>>>
> >>>>  I would like to remove it from TomEE so please shout if yo uknow why
> we
> >>>>  have it in place.
> >>>>
> >>>>  - Romain
> >>>>
> >>>
> >>
> >
> >
> >
>

Re: javaagent?

Posted by Romain Manni-Bucau <rm...@gmail.com>.
What about removing the agent David?
Le 13 juil. 2012 22:53, "David Blevins" <da...@gmail.com> a écrit :

>
> On Jul 12, 2012, at 10:08 AM, Mark Struberg wrote:
>
> >> BTW, regarding OpenEJB, it will require a lot of refactoring if we
> wanna remove CMP, EJB 2, etc.
> >
> > But it would make OpenEJB likely quite a lot leaner and faster!
>
> :)  Perhaps a very tiny bit leaner, but not faster.
>
> 95% of the CMP code is OpenJPA, 99% of the EJB 2 code is the same as the
> EJB 3 code.
>
> We already trimmed it severely.  There's not much to cut at this point.
>
> There was a ton of code dropped between OpenEJB 2 and OpenEJB 3.  A ton
> being pretty much the entire codebase.
>
>
>
> -David
>
>

Re: javaagent?

Posted by David Blevins <da...@gmail.com>.
On Jul 12, 2012, at 10:08 AM, Mark Struberg wrote:

>> BTW, regarding OpenEJB, it will require a lot of refactoring if we wanna remove CMP, EJB 2, etc.
> 
> But it would make OpenEJB likely quite a lot leaner and faster!

:)  Perhaps a very tiny bit leaner, but not faster.

95% of the CMP code is OpenJPA, 99% of the EJB 2 code is the same as the EJB 3 code.

We already trimmed it severely.  There's not much to cut at this point.

There was a ton of code dropped between OpenEJB 2 and OpenEJB 3.  A ton being pretty much the entire codebase.



-David


Re: javaagent?

Posted by Mark Struberg <st...@yahoo.de>.
>BTW, regarding OpenEJB, it will require a lot of refactoring if we wanna remove CMP, EJB 2, etc.

But it would make OpenEJB likely quite a lot leaner and faster!

LieGrue,
strub




>________________________________
> From: Jean-Louis MONTEIRO <je...@gmail.com>
>To: dev@openejb.apache.org; Mark Struberg <st...@yahoo.de> 
>Sent: Thursday, July 12, 2012 6:35 PM
>Subject: Re: javaagent?
> 
>
>Mark,
>
>Regarding CMP, it's still in as far as I know. As I said, it's managed under the cover as JPA entities and therefore by OpenJPA.
>In the spec EJB 3.2 (ongoing), we decide to split what is required and what is optional.
>
>So CMP is still required in Web Profile because the Web Profile is based on EJB 3.1.
>But I hope next time we can get rid of old things.
>
>BTW, regarding OpenEJB, it will require a lot of refactoring if we wanna remove CMP, EJB 2, etc.
>
>Jean-Louis
>
>
>
>2012/7/12 Mark Struberg <st...@yahoo.de>
>
>I fully agree that the javaagent has plenty of issues (both inOpenJPA, but mostly in Java itself) and shall only be used as last resort.
>>
>>But I hope TomEE doesn't do any CMP processing anymore, isn't? That would be a shame, as CMP got ditched a long time ago and is not part of the EE6 WebProfile afaik, isn't?
>>
>>LieGrue,
>>strub
>>
>>
>>
>>
>>----- Original Message -----
>>> From: Jean-Louis MONTEIRO <je...@gmail.com>
>>> To: dev@openejb.apache.org
>>> Cc:
>>> Sent: Thursday, July 12, 2012 3:13 PM
>>> Subject: Re: javaagent?
>>>
>>> Hi,
>>>
>>> AFAIR, it's only used to enhance JPA entities because that is needed with
>>> OpenJPA.
>>> We cannot use the default openjpa javagent because of some classloader
>>> reasons (classes must be enhanced first).
>>>
>>> Just be careful cause we currently support EJB 2 CMP entity beans. Behind
>>> the cover, we use JPA and OpenJPA to manage CMP entities. That means if you
>>> remove the javaagent, we won't be able to support CMP out of the box.
>>>
>>> Isn't it?
>>>
>>> Jean-Louis
>>>
>>>
>>> 2012/7/12 Romain Manni-Bucau <rm...@gmail.com>
>>>
>>>>  Hi,
>>>>
>>>>  anyone has an idea why we use a javaagent?
>>>>
>>>>  from what i saw it mainly runs the openjpa transformer...
>>>>
>>>>  i don't really see why it is needed since if entities are enhanced at
>>> build
>>>>  time that's more efficient and not needed, if the user wants to do it
>>> at
>>>>  runtime he can add the openjpa javaagent.
>>>>
>>>>  why i ask is mainly because in java it breaks the runtime because it tries
>>>>  to load the class we are loading the it leads to some LinkageErrors....
>>>>
>>>>  I would like to remove it from TomEE so please shout if yo uknow why we
>>>>  have it in place.
>>>>
>>>>  - Romain
>>>>
>>>
>>
>
>
>

Re: javaagent?

Posted by Jean-Louis MONTEIRO <je...@gmail.com>.
Mark,

Regarding CMP, it's still in as far as I know. As I said, it's managed
under the cover as JPA entities and therefore by OpenJPA.
In the spec EJB 3.2 (ongoing), we decide to split what is required and what
is optional.

So CMP is still required in Web Profile because the Web Profile is based on
EJB 3.1.
But I hope next time we can get rid of old things.

BTW, regarding OpenEJB, it will require a lot of refactoring if we wanna
remove CMP, EJB 2, etc.

Jean-Louis


2012/7/12 Mark Struberg <st...@yahoo.de>

> I fully agree that the javaagent has plenty of issues (both inOpenJPA, but
> mostly in Java itself) and shall only be used as last resort.
>
> But I hope TomEE doesn't do any CMP processing anymore, isn't? That would
> be a shame, as CMP got ditched a long time ago and is not part of the EE6
> WebProfile afaik, isn't?
>
> LieGrue,
> strub
>
>
>
> ----- Original Message -----
> > From: Jean-Louis MONTEIRO <je...@gmail.com>
> > To: dev@openejb.apache.org
> > Cc:
> > Sent: Thursday, July 12, 2012 3:13 PM
> > Subject: Re: javaagent?
> >
> > Hi,
> >
> > AFAIR, it's only used to enhance JPA entities because that is needed with
> > OpenJPA.
> > We cannot use the default openjpa javagent because of some classloader
> > reasons (classes must be enhanced first).
> >
> > Just be careful cause we currently support EJB 2 CMP entity beans. Behind
> > the cover, we use JPA and OpenJPA to manage CMP entities. That means if
> you
> > remove the javaagent, we won't be able to support CMP out of the box.
> >
> > Isn't it?
> >
> > Jean-Louis
> >
> >
> > 2012/7/12 Romain Manni-Bucau <rm...@gmail.com>
> >
> >>  Hi,
> >>
> >>  anyone has an idea why we use a javaagent?
> >>
> >>  from what i saw it mainly runs the openjpa transformer...
> >>
> >>  i don't really see why it is needed since if entities are enhanced at
> > build
> >>  time that's more efficient and not needed, if the user wants to do it
> > at
> >>  runtime he can add the openjpa javaagent.
> >>
> >>  why i ask is mainly because in java it breaks the runtime because it
> tries
> >>  to load the class we are loading the it leads to some LinkageErrors....
> >>
> >>  I would like to remove it from TomEE so please shout if yo uknow why we
> >>  have it in place.
> >>
> >>  - Romain
> >>
> >
>

Re: javaagent?

Posted by Mark Struberg <st...@yahoo.de>.
I fully agree that the javaagent has plenty of issues (both inOpenJPA, but mostly in Java itself) and shall only be used as last resort.

But I hope TomEE doesn't do any CMP processing anymore, isn't? That would be a shame, as CMP got ditched a long time ago and is not part of the EE6 WebProfile afaik, isn't?

LieGrue,
strub



----- Original Message -----
> From: Jean-Louis MONTEIRO <je...@gmail.com>
> To: dev@openejb.apache.org
> Cc: 
> Sent: Thursday, July 12, 2012 3:13 PM
> Subject: Re: javaagent?
> 
> Hi,
> 
> AFAIR, it's only used to enhance JPA entities because that is needed with
> OpenJPA.
> We cannot use the default openjpa javagent because of some classloader
> reasons (classes must be enhanced first).
> 
> Just be careful cause we currently support EJB 2 CMP entity beans. Behind
> the cover, we use JPA and OpenJPA to manage CMP entities. That means if you
> remove the javaagent, we won't be able to support CMP out of the box.
> 
> Isn't it?
> 
> Jean-Louis
> 
> 
> 2012/7/12 Romain Manni-Bucau <rm...@gmail.com>
> 
>>  Hi,
>> 
>>  anyone has an idea why we use a javaagent?
>> 
>>  from what i saw it mainly runs the openjpa transformer...
>> 
>>  i don't really see why it is needed since if entities are enhanced at 
> build
>>  time that's more efficient and not needed, if the user wants to do it 
> at
>>  runtime he can add the openjpa javaagent.
>> 
>>  why i ask is mainly because in java it breaks the runtime because it tries
>>  to load the class we are loading the it leads to some LinkageErrors....
>> 
>>  I would like to remove it from TomEE so please shout if yo uknow why we
>>  have it in place.
>> 
>>  - Romain
>> 
> 

Re: javaagent?

Posted by Jean-Louis MONTEIRO <je...@gmail.com>.
Hi,

AFAIR, it's only used to enhance JPA entities because that is needed with
OpenJPA.
We cannot use the default openjpa javagent because of some classloader
reasons (classes must be enhanced first).

Just be careful cause we currently support EJB 2 CMP entity beans. Behind
the cover, we use JPA and OpenJPA to manage CMP entities. That means if you
remove the javaagent, we won't be able to support CMP out of the box.

Isn't it?

Jean-Louis


2012/7/12 Romain Manni-Bucau <rm...@gmail.com>

> Hi,
>
> anyone has an idea why we use a javaagent?
>
> from what i saw it mainly runs the openjpa transformer...
>
> i don't really see why it is needed since if entities are enhanced at build
> time that's more efficient and not needed, if the user wants to do it at
> runtime he can add the openjpa javaagent.
>
> why i ask is mainly because in java it breaks the runtime because it tries
> to load the class we are loading the it leads to some LinkageErrors....
>
> I would like to remove it from TomEE so please shout if yo uknow why we
> have it in place.
>
> - Romain
>