Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 367810

Summary: Impossible to run AUTs with monitoring agents when the embedded AUT agent is used
Product: [Technology] Jubula Reporter: Marc Steffens <Marc.Steffens>
Component: AgentAssignee: Zeb Ford-Reitz <zeb.ford-reitz>
Status: CLOSED FIXED QA Contact: Oliver Goetz <Oliver.Goetz>
Severity: enhancement    
Priority: P3 CC: alexandra.schladebeck, zeb.ford-reitz
Version: unspecified   
Target Milestone: Juno M5   
Hardware: All   
OS: All   
Whiteboard:
Attachments:
Description Flags
This patch will allow to run AUTs with monitoring agents when the embedded agent is used
none
Second version of the patch zeb.ford-reitz: iplog+

Description Marc Steffens CLA 2012-01-04 03:04:06 EST
At the present moment it is not possible to run AUTs with monitoring agents, if the embedded agent is used to launch the application under test.
Comment 1 Marc Steffens CLA 2012-01-04 03:25:05 EST
Created attachment 208986 [details]
This patch will allow to run AUTs with monitoring agents when the embedded agent  is used
Comment 2 Marc Steffens CLA 2012-01-04 09:05:51 EST
Created attachment 209007 [details]
Second version of the patch

It did some refactoring work so that the Platform.getBundle(bundleId) method will be only called once in the getMontoringAgent() method. The formerly used loadMonitoringClass() and getBundleFile() method were delete. 

Everything what is necessary to generate the "-javaagent:myagent.jar" String will be done in the getMonitoringAgent() method.

This implementation assumes that the given monitoring bundle has a directory shaped character like: Eclipse-BundleShape: dir

If you want to avoid using a "Eclipse-BundleShape: dir" you can use getClasspathEntriesForBundleId() method and extract the jar files which are held in the plugin jar file. But i choose the way of using the Eclipse-BundleShape: dir.
Comment 3 Zeb Ford-Reitz CLA 2012-01-05 03:26:58 EST
Comment on attachment 209007 [details]
Second version of the patch

patch applied with http://git.eclipse.org/c/jubula/org.eclipse.jubula.core.git/commit/?id=37280687de2c2ad588df979aab663d8a32e3a1a8

It took me a little longer than expected to review this patch, as I stumbled over https://bxapps.bredex.de/bugzilla/show_bug.cgi?id=221 during testing.
Comment 4 Zeb Ford-Reitz CLA 2012-01-05 03:27:51 EST
Fixed with applied patch.
Comment 5 Oliver Goetz CLA 2012-01-10 10:55:09 EST
Tested