db-jdo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Michael Bouschen (JIRA)" <j...@apache.org>
Subject [jira] Commented: (JDO-591) Enhancer Invocation API
Date Sat, 15 Nov 2008 19:55:46 GMT

    [ https://issues.apache.org/jira/browse/JDO-591?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12647892#action_12647892

Michael Bouschen commented on JDO-591:

The patch looks good. Just a couple of questions/remarks:

- Does the enhancer replace the class files in place? Or does tis depend on whether setOutputDirectory
has been called? I would be nice to have both options: replace the class file with th enhanced
class file or write the enhanced class file to a different place.

- Method enhanceClasses should take a ClassLoader in addition to the array of classNames.
The method should use the context class loader if null is passed.

- The arguments passed to methods enhanceJdoFiles and enhanceJar specify files names. I assume
the files names may be absolute or relativ and in the latter case they are taken relative
to the current working directory, correct? Would it make sense to add an option to find the
file as a resource using the classpath (e.g. getResourceAsStream)? Then we need to specify
a class loader used to find the resources.


> Enhancer Invocation API
> -----------------------
>                 Key: JDO-591
>                 URL: https://issues.apache.org/jira/browse/JDO-591
>             Project: JDO
>          Issue Type: New Feature
>          Components: api2
>            Reporter: Andy Jefferson
>            Assignee: Andy Jefferson
>             Fix For: JDO 2 maintenance release 3
>         Attachments: jdoenhancer.patch
> Having a standard interface to invoke the enhancer makes a lot of sense so we can have
interchangeability of enhancers (for implementations that support BinaryCompatibility). 
> A start point (for discussions) could be
> 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 then allows enhancement of the specified classes, or the classes defined by the
specified JDO files, or the classes defined by the specified persistence-unit.
> What other control would people like to see ? 

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

View raw message