geronimo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Jencks <david_jen...@yahoo.com>
Subject Re: Builders and jpa
Date Thu, 02 Nov 2006 20:49:08 GMT

On Nov 2, 2006, at 12:15 PM, Aaron Mulder wrote:

> Instead of leaving it up to GBeans to handle, do you think we should
> just put a hook into the Configuration where you can specify byte code
> transformers that it will apply to the Configuration ClassLoader?  Now
> that the transformer API is there, I'm surmising that JPA may not be
> the only area where this specific issue may crop up.

I don't really see how this is attached to a particular classloader  
-- probably my limited understanding of what's going on.  I'm using  
the instrumentation stuff to install the enhancers and have an agent  
with a TransformerCollection that the jpa enhancers get added to.

In particular I don't see how to add this directly to the  
configuration since we don't know what the enhancer is going to be  
until we create a PersistenceProvider and it registers it with the  
PersistenceUnitInfo.

If you want to peek at my code before I get it completely working let  
me know and I'll create a patch.

thanks
david jencks

>
> Thanks,
>     Aaron
>
> On 11/2/06, David Jencks <david_jencks@yahoo.com> wrote:
>> I'm working on support for runtime class enhancement for jpa and have
>> run into a gbean start order issue.
>>
>> The PersistenceProvider implementation class can install a byte code
>> transformer that will enhance the classes used in the app for jpa
>> PersistenceCapable.  This needs to be done before any application
>> classes are loaded.  I think the gbean that starts the
>> PersistenceProvider needs to be in the same configuration as the app,
>> so I think it needs to be arranged that that gbean starts more or
>> less first.
>>
>> Dain suggested that we could implement this by giving GBeanData a
>> priority order and starting them consistent with the priority order.
>> The dependencies will still override the priority order but this will
>> provide easier hints about the desired start order.  GBeanInfo can
>> include a default priority order.  We can eventually let you set the
>> priority order in a gbean plan.
>>
>> I've opened GERONIMO-2541 to track this.
>>


Mime
View raw message