[jira] Created: (JDO-591) Enhancer Invocation API

View: New views
8 Messages — Rating Filter:   Alert me  

[jira] Created: (JDO-591) Enhancer Invocation API

by JIRA jira@apache.org :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Enhancer Invocation API
-----------------------

                 Key: JDO-591
                 URL: https://issues.apache.org/jira/browse/JDO-591
             Project: JDO
          Issue Type: New Feature
            Reporter: Andy Jefferson
             Fix For: JDO 2 maintenance release 2


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.


[jira] Commented: (JDO-591) Enhancer Invocation API

by JIRA jira@apache.org :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


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

Andy Jefferson commented on JDO-591:
------------------------------------

Should have added that "classpath" should include
jdo2-api.jar
classes to enhance
JDO metadata files
enhancer jar

> Enhancer Invocation API
> -----------------------
>
>                 Key: JDO-591
>                 URL: https://issues.apache.org/jira/browse/JDO-591
>             Project: JDO
>          Issue Type: New Feature
>            Reporter: Andy Jefferson
>             Fix For: JDO 2 maintenance release 2
>
>
> 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.


[jira] Commented: (JDO-591) Enhancer Invocation API

by JIRA jira@apache.org :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


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

Erik Bengtson commented on JDO-591:
-----------------------------------

The enhancer API should implement the javaagent java 5 interfaces to allow runtime enhancement

> Enhancer Invocation API
> -----------------------
>
>                 Key: JDO-591
>                 URL: https://issues.apache.org/jira/browse/JDO-591
>             Project: JDO
>          Issue Type: New Feature
>            Reporter: Andy Jefferson
>             Fix For: JDO 2 maintenance release 2
>
>
> 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.


[jira] Updated: (JDO-591) Enhancer Invocation API

by JIRA jira@apache.org :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


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

Craig Russell updated JDO-591:
------------------------------

    Component/s: tck2-legacy
                 tck2
                 specification
                 api2-legacy
                 api2

> Enhancer Invocation API
> -----------------------
>
>                 Key: JDO-591
>                 URL: https://issues.apache.org/jira/browse/JDO-591
>             Project: JDO
>          Issue Type: New Feature
>          Components: api2, api2-legacy, specification, tck2, tck2-legacy
>            Reporter: Andy Jefferson
>             Fix For: JDO 2 maintenance release 2
>
>
> 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.


[jira] Commented: (JDO-591) Enhancer Invocation API

by JIRA jira@apache.org :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


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

Ilan Kirsh commented on JDO-591:
--------------------------------

-persistenceUnit is too long and error prone, should be -pu.

IMO, class files or persistence unit should be sufficient, and jdo-files might be a non portable extension (especially when annotations can replace XML).

On the other hand, supporting enhancement of a JAR file could be useful.

+1 for java agent support


> Enhancer Invocation API
> -----------------------
>
>                 Key: JDO-591
>                 URL: https://issues.apache.org/jira/browse/JDO-591
>             Project: JDO
>          Issue Type: New Feature
>          Components: api2, api2-legacy, specification, tck2, tck2-legacy
>            Reporter: Andy Jefferson
>             Fix For: JDO 2 maintenance release 2
>
>
> 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.


[jira] Commented: (JDO-591) Enhancer Invocation API

by JIRA jira@apache.org :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


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

Andy Jefferson commented on JDO-591:
------------------------------------

Below is an outline API interface :-

package javax.jdo.enhancer;

import java.lang.instrument.ClassFileTransformer;

public interface JDOEnhancer extends ClassFileTransformer
{
    void setVerbose(boolean arg);
    void setOutputDirectory(String dirName);

    void enhancePersistenceUnit(String persistenceUnit);

    void enhanceClasses(String[] classNames);

    void enhanceJdoFiles(String[] jdoFileNames);

    void enhanceJar(String jarFileName);
}

also define a new Exception, something like JDOEnhanceException thrown for failures in enhancement.


Comments :-
1). The four things that it is important to be able to enhance from each have their own method. The type passed in to each could be made more flexible, e.g use of URI instead of file names. Same goes for the names of the methods - could just have setters for the different types of "input" data, and then a method enhance().
2). I consider enhancement from "jdo-files" equal in importance to "class-files" since this is what the user generates and can specify multiple classes hence is easier to specify than a long list of classes.
3). A "persistence-unit" can include jar-file(s), class-file(s), and mapping-file(s) so it could be argued that this would be the only option required, but then having the others makes sense for backwards compat.


> Enhancer Invocation API
> -----------------------
>
>                 Key: JDO-591
>                 URL: https://issues.apache.org/jira/browse/JDO-591
>             Project: JDO
>          Issue Type: New Feature
>          Components: api2, api2-legacy, specification, tck2, tck2-legacy
>            Reporter: Andy Jefferson
>             Fix For: JDO 2 maintenance release 2
>
>
> 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.


[jira] Updated: (JDO-591) Enhancer Invocation API

by JIRA jira@apache.org :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


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

Craig Russell updated JDO-591:
------------------------------

      Component/s:     (was: tck2-legacy)
                       (was: api2-legacy)
                       (was: specification)
                       (was: tck2)
    Fix Version/s:     (was: JDO 2 maintenance release 2)
                   JDO 2 maintenance release 3

Moving this to 2.3; awaiting a volunteer to take it.

> 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
>             Fix For: JDO 2 maintenance release 3
>
>
> 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.


[jira] Assigned: (JDO-591) Enhancer Invocation API

by JIRA jira@apache.org :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


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

Andy Jefferson reassigned JDO-591:
----------------------------------

    Assignee: Andy Jefferson

> 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
>
>
> 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.

LightInTheBox - Buy quality products at wholesale price