[ 
https://issues.apache.org/jira/browse/JDO-621?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Craig Russell updated JDO-621:
------------------------------

    Attachment: jdo-621.patch

Please review this patch. It adds the new javax.jdo.Enhancer main class to 
invoke the enhancer.

There are a few things that can be improved. There is no checking that a file 
is actually loadable, or that a .class file actually contains a class, or that 
a .jdo file has an xml formatted metadata document. There is so little 
processing done that I'd prefer that the main program simply pass all of the 
file names to the JDOEnhancer instead of trying to figure out what kind of file 
is there. That would involve removing the addClasses and addJarFile methods.

There is also no processing of the -cp <extra class path> parameter except to 
take the parameter and assign it to the classLoaderParameter. This will be done 
for the next version of the patch.

One oddity in the JDOEnhancer API: it only allows the processing of one jar 
file. Can anyone explain this?

> Add javax.jdo.JDOEnhancerMain to call the enhancer via standard API
> -------------------------------------------------------------------
>
>                 Key: JDO-621
>                 URL: https://issues.apache.org/jira/browse/JDO-621
>             Project: JDO
>          Issue Type: New Feature
>          Components: api2
>    Affects Versions: JDO 2 maintenance release 2
>            Reporter: Craig Russell
>            Assignee: Craig Russell
>             Fix For: JDO 2 maintenance release 3
>
>         Attachments: jdo-621.patch
>
>
> The proposed new class will use the standard enhancer API to enhance classes. 
> The command line parameters would be similar to the original proposal of 
> JDO-591, with changes as needed to use the new class in the TCK.
> java -cp classpath {enhancer-class} [options] [jdo-files] [class-files] 
>     where options can be 
>         -persistenceUnit persistence-unit-name : Name of a "persistence-unit" 
> to enhance the classes for 
>         -d target-dir-name : Write the enhanced classes to the specified 
> directory 
>         -checkonly : Just check the classes for enhancement status 
>         -v : verbose output 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to