Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 367810 - Impossible to run AUTs with monitoring agents when the embedded AUT agent is used
Summary: Impossible to run AUTs with monitoring agents when the embedded AUT agent is ...
Status: CLOSED FIXED
Alias: None
Product: Jubula
Classification: Technology
Component: Agent (show other bugs)
Version: unspecified   Edit
Hardware: All All
: P3 enhancement (vote)
Target Milestone: Juno M5   Edit
Assignee: Zeb Ford-Reitz CLA
QA Contact: Oliver Goetz CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-01-04 03:04 EST by Marc Steffens CLA
Modified: 2012-01-24 05:56 EST (History)
2 users (show)

See Also:


Attachments
This patch will allow to run AUTs with monitoring agents when the embedded agent is used (8.89 KB, patch)
2012-01-04 03:25 EST, Marc Steffens CLA
no flags Details | Diff
Second version of the patch (9.98 KB, patch)
2012-01-04 09:05 EST, Marc Steffens CLA
zeb.ford-reitz: iplog+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
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