Hi,

On Thursday, March 19, 2020 at 12:40:22 PM UTC+1, 
fschulte.de.w...@gmail.com wrote:
>
> Dear JaCoCo Team,
>
> I'm half the way through the work implementing the target mentioned in the 
> title description.
>
> I'm stuck at the point that I have an instrumented war deployed into J2EE 
> Server (JBoss EAP 7.0) and get the jacoco.exec binary data into 
> C:\jboss\bin\jacoco.exe at shutdown of Jboss Server and can generate a 
> valid report from it. 
>
> Note: I don't use the jacoco agent in the server classpath! This is a 
> requirment as I want a solution without jacoco agent at the target 
> enviroment as I have NO control over the J2EE server and can't put any java 
> agent into the server classpath!
>

I suppose that all of the above means that
instead of on-the-fly instrumentation with "-javaagent" JVM option,
you use offline instrumentation.
And instead of placing "jacocoagent.jar" into server classpath,
you placed it inside of your war - as stated on page 
https://www.jacoco.org/jacoco/trunk/doc/offline.html about offline 
instrumentation
"jacocoagent.jar has to be accessible by the instrumented classes".

If so, then

Now I need to move this into an User Acceptance Test Enviroment with 
> multiple JBoss servers and want to "dump" the coverage data. I select JMX 
> as the way to go because I also can not open further ports to the tcpserver 
> of JaCoCo as would come to mind.
>
> I analyser the jacoco code where the JMX is initiliaed an I see the only 
> as java agent parameters this will be done.
>
> Question: Is there another way to get the jacoco instrumented code the 
> information to please have the coverage data ready as JMX bean download?
>

in case of offline instrumentation, quoting the same page 
https://www.jacoco.org/jacoco/trunk/doc/offline.html

"In offline mode the JaCoCo runtime can be configured with the same set of 
properties which are available for the agent, except for the 
includes/excludes options as the class files are already instrumented. 
There are two different ways to provide the configuration: Configuration 
File ... System Properties ..."

So the addition of jacoco-agent.properties into your war with the single 
line "jmx=true" will enable JMX.
And the addition of another line "output=none" will disable writing to file.

Many thnks for you help and this greate tool.
>


Regards,
Evgeny

-- 
You received this message because you are subscribed to the Google Groups 
"JaCoCo and EclEmma Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jacoco+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jacoco/994831d7-96fd-4eec-99a8-690c1d904e3d%40googlegroups.com.

Reply via email to