You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@openjpa.apache.org by "Pinaki Poddar (JIRA)" <ji...@apache.org> on 2010/03/25 17:01:27 UTC
[jira] Commented: (OPENJPA-1600) Allow enhancer to read entities
inside jar archive
[ https://issues.apache.org/jira/browse/OPENJPA-1600?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12849737#action_12849737 ]
Pinaki Poddar commented on OPENJPA-1600:
----------------------------------------
The referenced user forum issue [1]
[1] http://n2.nabble.com/Use-external-classes-as-entities-td4787743.html#a4787743
> Allow enhancer to read entities inside jar archive
> --------------------------------------------------
>
> Key: OPENJPA-1600
> URL: https://issues.apache.org/jira/browse/OPENJPA-1600
> Project: OpenJPA
> Issue Type: Improvement
> Components: build / infrastructure, tooling
> Reporter: Pinaki Poddar
> Assignee: Pinaki Poddar
>
> Enhancer currently does not read class bytes if they are packaged in a jar file.
> Enhancing an entity that resides inside a jar and overwriting the enhanced byte code inside the same jar is somewhat difficult.
> But as a first step, we can read the byte code for entities that are merely used as serializeable reference to other persistent entities.
> An issue of this nature has been reported in the user forum [1].
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
Re: [jira] Commented: (OPENJPA-1600) Allow enhancer to read
entities inside jar archive
Posted by Pinaki Poddar <pp...@apache.org>.
Hi Dinkar,
I was trying this new ability for enhancer to "see" class files inside
jars -- only as a build-time enhancer feature.
The degree of complexity, imo, in ascending order
a) ability to refer to a serializable class in a third-party (i.e.
unmodifiable) jar. This will support the use case that is cited in this
issue. Th referred class itself is not persistence capable, but is referred
by other persistence capable classes.
b) ability to enhance a persistence capable class that is packaged within
a jar. This is doable currently but the enhanced bytecode can not be written
in the same jar. Writing the enhanced bytecode to a separate place is
possible. The capability to write in-place will be useful to enhance a *.ear
or *.war more naturally (currently the *.ear is unpacked, enhanced and
repacked) in some application server environments via scripts.
-----
Pinaki
--
View this message in context: http://n2.nabble.com/jira-Created-OPENJPA-1600-Allow-enhancer-to-read-entities-inside-jar-archive-tp4798494p4820934.html
Sent from the OpenJPA Developers mailing list archive at Nabble.com.
Re: [jira] Commented: (OPENJPA-1600) Allow enhancer to read
entities inside jar archive
Posted by Dinkar Rao <di...@gmail.com>.
Hi Pinaki,
One issue you might encounter applies to the order of loading of the classes
in the JVM. If the jar file containing persistence.xml is loaded AFTER the
jar file containing the externally serializable entity, then load-time
enhancement (via javaagent) might not be able to enhance the already loaded
external entity.
I had faced a very similar problem with AspectJ's weaver in a JEE
environment (under WebSphere).
Thanks,
Dinkar
--
View this message in context: http://n2.nabble.com/jira-Created-OPENJPA-1600-Allow-enhancer-to-read-entities-inside-jar-archive-tp4798494p4814365.html
Sent from the OpenJPA Developers mailing list archive at Nabble.com.