08-18-07 06:11 PM
Thanks, and this will be included in the standard enhancement contract.
-----Original Message-----
From: Erik Bengtson [mailto:erik@jpox.org]
Sent: Saturday, August 18, 2007 6:57 AM
To: jdo-dev@db.apache.org; jdo-experts-ext@sun.com
Subject: Re: Minutes: JDO TCK Conference Call Friday, Aug 17, 9 am PDT
Matthew and All,
Do you also have ClassFileTransformer for transparent runtime enhancement
with
JRE 5 ?
usage example:
------------------
java -javaagent:jdo-2.1.jar -Djavax.jdo.enhancer.class=acme.EnhancerImpl
<MAIN>
alternative command line:
java -javaagent:jdo-2.1.jar=enhancer.class=acme.EnhancerImpl <MAIN>
Implementation
-------------------------------------
package acme;
public class Enhancer
{
public Enhancer() {}
public byte[] enhance(final String className, byte[] classdefinition
,
ClassLoader loader)
{
return bytecodemodified;
}
}
--------------------------------------
package javax.jdo.enhancer;
public JDOClassFileTransformer implements ClassFileTransformer
{
public static void premain(String agentArguments, Instrumentation
instrumentation)
{
instrumentation.addTransformer(new JDOClassFileTransformer());
}
public byte[] transform(ClassLoader loader, String className, Class
classBeingRedefined, ProtectionDomain protectionDomain, byte[]
classfileBuffer)
{
Enhancer enhancer = new instance of class defined at
System.getProperty("javax.jdo.enhancer.class")
return enhancer. enhance(className,classfileBuffer,loader
);
}
}
--------------------------------------------------
Quoting Michelle Caisse <Michelle.Caisse@sun.com>:
> Attendees: Matthew Adams, Michelle Caisse
>
> Matthew is working on standard enhancer and schema management classes
> and the associated SPI.
> His patch dealing with PMF properties "name" and "persistenceUnitName"
> have been checked in (JDO-496). Seems to work.
>
> Michelle is working on tests for relationship integrity on flush() when
> the application changes one side of the relationship (spec 15.3).
>
> Craig is working on spec updates for persistent properties.
>
> -- Michelle
>
> Michelle Caisse wrote:
>
>
>
>
[ Post a follow-up to this message ]
|