On Jan 3, 2007, at 1:53 AM, Dain Sundstrom wrote:
* To use the instrumentation API, our java agent *must* be
specified on the command line. I have added this to the
standalone startup shell scripts. Without the agent we cannot
enhance classes and pre-enhancement must be used [2]. Embedded
servers (Tomcat and JUnit) must load the java agent or pre-enhance
java -javaagent:$OPENEJB_JAVAAGENT_JAR -jar $OPENEJB_CORE_JAR
start
Do you think you'll be able to find a naughty way to install an
agent after boot?
I doubt it. I don't think the vm initializes the instrumentation
system, unless there is an agent specified on the command line. I
hope to spend some time looking at the VM source to see if there is
a secret late instrumentation hook but I doubt it.
AFAIK Dain is right - instrumentation machinery requires the agent to
be specified on the command line. If there is a way around it, I'd
*really* like to know.
Andrus