[
https://issues.apache.org/jira/browse/JDO-591?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12657131#action_12657131
]
Ilan Kirsh commented on JDO-591:
--------------------------------
> how does the impl know if it is a persistence-unit
I agree that persistence unit is different, and I do not suggest merging it
with anything.
I wrote: "one add(String... args) method should replace addClasses, addFiles,
addJar and addDirectory".
addPersistenceUnit(String) is probably required anyway.
> how does the impl know if it is ... or a mapping file, or a class file, or a
> wildcard, or a directory name, or some random junk ?
Files should be identified anyway for command line enhancement. It is very easy
to check if a file exists and if it is a directory. Jar and class files can be
identified by their suffix. If it is not a file, it is either a class or junk.
Actually ObjectDB works this way, and there is no real impact on performance
(also, usually there are only few arguments to check, such as *.class or
package.*). This is negligible, relative for instance to searching package.jdo
files everywhere, and writing all the result class files.
> What bearing does "subdirectories" have on the input from
> addPersistenceUnit(), or addClass() ?
Sure, but the same is true for the command line, and still -s is a global
option, doesn't it?
I just wanted to synchronize JDO-591 with JDO-621.
> 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-5.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.