You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@openjpa.apache.org by "Kevin Sutter (JIRA)" <ji...@apache.org> on 2013/02/20 21:39:14 UTC

[jira] [Resolved] (OPENJPA-2337) ClassFileTransformer modifies bytecode

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

Kevin Sutter resolved OPENJPA-2337.
-----------------------------------

    Resolution: Cannot Reproduce

I'm confused by this JIRA.  If you are using the javaagent for doing the class transformation, OpenJPA does not write back out to disk.  By the time, OpenJPA gets the class file for transforming, it's just a bunch of bytes.  We transform them and give them back to the classloader.  No writing to disk is performed.

If you are using the build-time enhancement mechanism (maven, ant, plugin, etc), then in that case, OpenJPA does write back to disk.

If you really think this is an issue, then please provide a testcase to demonstrate the problem.  Thanks.
                
> ClassFileTransformer modifies bytecode
> --------------------------------------
>
>                 Key: OPENJPA-2337
>                 URL: https://issues.apache.org/jira/browse/OPENJPA-2337
>             Project: OpenJPA
>          Issue Type: Bug
>          Components: Enhance
>    Affects Versions: 2.2.0, 2.2.1
>            Reporter: Romain Manni-Bucau
>            Priority: Blocker
>
> When using the JPA ClassFileTransformer from a javaagent the expected workflow is to simply convert in memory original class byte[] to an enhanced byte[].
> However since the code is shared with ant task, mvn plugin and main() enhancer it also updates the file physically.
> That's a pain for load time weaving.
> Could it be skipped when using the ClassFileTransformer?
> sounds like a bug for me, wdyt?

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira