From open-jpa-dev-return-178-apmail-incubator-open-jpa-dev-archive=incubator.apache.org@incubator.apache.org Mon Jul 31 16:24:12 2006 Return-Path: Delivered-To: apmail-incubator-open-jpa-dev-archive@locus.apache.org Received: (qmail 14783 invoked from network); 31 Jul 2006 16:24:12 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 31 Jul 2006 16:24:12 -0000 Received: (qmail 86479 invoked by uid 500); 31 Jul 2006 16:24:12 -0000 Delivered-To: apmail-incubator-open-jpa-dev-archive@incubator.apache.org Received: (qmail 86421 invoked by uid 500); 31 Jul 2006 16:24:12 -0000 Mailing-List: contact open-jpa-dev-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: open-jpa-dev@incubator.apache.org Delivered-To: mailing list open-jpa-dev@incubator.apache.org Received: (qmail 86412 invoked by uid 99); 31 Jul 2006 16:24:11 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 31 Jul 2006 09:24:11 -0700 X-ASF-Spam-Status: No, hits=0.5 required=10.0 tests=DNS_FROM_RFC_ABUSE,HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: domain of michael.d.dick@gmail.com designates 64.233.182.184 as permitted sender) Received: from [64.233.182.184] (HELO nf-out-0910.google.com) (64.233.182.184) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 31 Jul 2006 09:24:11 -0700 Received: by nf-out-0910.google.com with SMTP id x4so592416nfb for ; Mon, 31 Jul 2006 09:23:49 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:references; b=dYWN+3qfmGiLDCHE8r+HkqIOqNJndsCQkVWUu1di/TxOWfnxBsPTn7L5CP0UgYwuOOwsz7mNzh//cbpdADfWqs8gmlK5M4NaHxUj2JsZ1tvXyAidG2WJ7aiyWYGXYdVNGxSp4Rc6Kkbh2Vdehar8Q9s1OoRIq3nTB5FEtc0Cs3M= Received: by 10.49.8.10 with SMTP id l10mr2295367nfi; Mon, 31 Jul 2006 09:23:49 -0700 (PDT) Received: by 10.49.64.18 with HTTP; Mon, 31 Jul 2006 09:23:48 -0700 (PDT) Message-ID: <72c1350f0607310923s5e39ad14hc995bec4101336fc@mail.gmail.com> Date: Mon, 31 Jul 2006 11:23:48 -0500 From: "Michael Dick" To: open-jpa-dev@incubator.apache.org Subject: Re: RuntimeEnhancement In-Reply-To: <324F19CA-BC3F-4A3B-BAE9-651D387CA27F@apache.org> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_34460_8995582.1154363028958" References: <7D856CDFE035FF45A0420ACBD71BDD63019CBF22@repbex02.amer.bea.com> <324F19CA-BC3F-4A3B-BAE9-651D387CA27F@apache.org> X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N ------=_Part_34460_8995582.1154363028958 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline I rebuilt the jars with your changes and it looks like runtime enhancement worked for me. I had to specify the MetaDataFactory class in my javaagent string (shown below in case anyone else is interested): -javaagent:/home/mikedd/.m2/repository/org/apache/openjpa/openjpa-kernel-5/0.9.0/openjpa- kernel-5-0.9.0.jar=scanDevPath=true,MetaDataFactory= org.apache.openjpa.persistence.PersistenceMetaDataFactory Thanks, On 7/29/06, Marc Prud'hommeaux wrote: > > > > Hmm. Does anyone have any idea how to convince mvn to do this as > > part of > > the build process? > > > org.apache.maven.plugins > maven-jar-plugin > > > > > > org.apache.openjpa.enhance.PCEnhancerAgent > > > > > > Looking at the META-INF/MANIFEST.MF file in the openjpa- > kernel-0.9.0.jar file, I do see: > > Premain-Class: org.apache.openjpa.enhance.PCEnhancerAgent > > ... so I think it is being generated and put in the jar as expected. > However, it should probably be in the openjpa-kernel-5-0.9.0.jar > file, rather than the openjpa-kernel-0.9.0.jar file (since Premain- > Class is a Java 5 manifest attribute). So I've gone ahead and changed > the generation to be in openjpa-kernel-5/pom.xml. > > However, I haven't yet tested whether this makes the runtime > enhancement work as expected. > > > > > On Jul 28, 2006, at 10:07 PM, Patrick Linskey wrote: > > >> I did some experimentation with runtime enhancement (the doc > >> Marc posted was helpful here). All the code required is > >> checked in to SVN, but you I did have to add Premain-Class: > >> org.apache.openjpa.enhance.PCEnhancerAgent to the manifest > >> for openjpa-kernel-5-0.9.0.jar. > > > > Hmm. Does anyone have any idea how to convince mvn to do this as > > part of > > the build process? > > > >> Is this right way to resolve the problem? The documentation > >> refers to org.apache.openjpa.jar which presumably would > >> contain the manifest. > > > > A bunch of the docs were converted via sed scripts; some things > > (such as > > org.apache.openjpa.jar) are a sad victim of the conversion process. > > That > > used to be kodo.jar. > > > > In the long run, we need to work out our deployment story. We might > > want > > to move towards a build system that assembles a monolithic jar out of > > all the modules. > > > >> Admittedly this is a minor issue and I have a workaround, but > >> if I can I'd like to help get the change back into svn. > > > > Probably the most useful things would be to fix the docs to point > > to the > > right jar, and to divine how to make mvn spit out the right manifest > > info. Theoretically, this might be as easy as some directive or > > putting > > a MANIFEST.MF file somewhere to get merged during the build > > process. But > > I'm a mvn newbie, so have no real clue sadly. > > > > -Patrick > > ______________________________________________________________________ > > _ > > Notice: This email message, together with any attachments, may > > contain > > information of BEA Systems, Inc., its subsidiaries and > > affiliated > > entities, that may be confidential, proprietary, copyrighted > > and/or > > legally privileged, and is intended solely for the use of the > > individual > > or entity named in this message. If you are not the intended > > recipient, > > and have received this message in error, please immediately return > > this > > by email and then delete it. > > -- -Michael Dick ------=_Part_34460_8995582.1154363028958--