openjpa-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Patrick Linskey" <plins...@bea.com>
Subject RE: Can enhancer operate on jar files?
Date Wed, 21 Feb 2007 18:03:26 GMT
> We need some way to tell the enhancer about the jar file. 

I don't think that we do -- I think that we already know where the class
is being loaded from.

> Does it make sense to have any more than one jar file as input? 

Kinda. IMO, the arguments to the enhancer should remain as they are -- a
listing of the classes / metadata files / etc. that should be processed.
When run in enhance-in-place mode (the default), the enhancer should be
smart enough to update the classes wherever they happen to reside.

> Does it make sense to require that all the metadata be contained 
> in the jar file itself, or can metadata be provided as an external 
> resource? 

I don't think that we should make any restrictions here; this is a
packaging issue more than an enhancement issue. See above comment.

> Should we have an option to create a new jar file as output 
> instead of overwriting the input jar file?

I don't think that's as useful as enhancing inside the jar file. We
already have an option to write modified classes to a new directory.
Anyone who wants a new jar to be created is probably doing something in
a build file already, and could trivially run the enhancer to output to
a new dir and then jar up that dir.

-Patrick

-- 
Patrick Linskey
BEA Systems, Inc. 

_______________________________________________________________________
Notice:  This email message, together with any attachments, may contain
information  of  BEA Systems,  Inc.,  its subsidiaries  and  affiliated
entities,  that may be confidential,  proprietary,  copyrighted  and/or
legally privileged, and is intended solely for the use of the individual
or entity named in this message. If you are not the intended recipient,
and have received this message in error, please immediately return this
by email and then delete it. 

> -----Original Message-----
> From: Craig.Russell@Sun.COM [mailto:Craig.Russell@Sun.COM] 
> Sent: Wednesday, February 21, 2007 9:42 AM
> To: open-jpa-dev@incubator.apache.org
> Subject: Re: Can enhancer operate on jar files?
> 
> Hi Dain,
> 
> In answer to your original question, yes I agree that it would be  
> nice to have an option for batch enhancement to take a jar file as  
> the source, enhance the classes and interfaces found therein, and  
> repackage the jar file.
> 
> A few items for discussion: the jar file can't be signed. We need  
> some way to tell the enhancer about the jar file. Does it make sense  
> to have any more than one jar file as input? Does it make sense to  
> require that all the metadata be contained in the jar file 
> itself, or  
> can metadata be provided as an external resource? Should we have an  
> option to create a new jar file as output instead of overwriting the  
> input jar file?
> 
> Please file a JIRA so we don't lose it...
> 
> Thanks,
> 
> Craig
> 
> P.S. Have you installed Apple's latest/gratest Java update?
> 
> On Feb 21, 2007, at 8:59 AM, Dain Sundstrom wrote:
> 
> > On Feb 20, 2007, at 1:13 PM, Pinaki Poddar wrote:
> >
> >>> It is kind of a pain to unpack a jar, enhance it and repack it.
> >> How about compile, enhance and then jar?
> >
> > That implies that I'm that own the development cycle of 
> this code.   
> > In this case, I just get a jar from the user.
> >
> >>> Can the OpenJPA enhancer operate on a Jar file?
> >> If runtime enhancement is in effect via
> >> (-javaagent:/path/to/openjpa.jar) then the unenhanced persistent  
> >> domain
> >> classes be packed into a jar and referred in persistence.xml in
> >> <jar-file> tag. The classes will get enhanced as they are loaded  
> >> in JVM
> >> but original jar will remain unaltered.
> >
> > I was attempting to not use runtime enhancement due to vm hangs,  
> > but I think the problem is in the Apple VM itself now.
> >
> > -dain
> 
> Craig Russell
> Architect, Sun Java Enterprise System http://java.sun.com/products/jdo
> 408 276-5638 mailto:Craig.Russell@sun.com
> P.S. A good JDO? O, Gasp!
> 
> 

Mime
View raw message