I am also working in embedded environments, where we just move over from JavaSE Embedded 7 to JavaSE Embedded 8. We started to move over to compact2 profile, but faced the problem, that some of our used 3rd party components (mostly OpenSource) are not able to run on compact2, like logback here. Therefore I really appreciate that logback could be used now even for a constrained environment.
We have a continuous discussion to choose either compact2 or compact3. Lets summarize our pros/cons against that:
-
for us the only relevant difference between compact2 and compact3 is JMX support. We have needs for JMX for monitoring of JVM status, e.g. for development support, but also for runtime doing some checks on thread deadlocks, JVM stats like memory consumption etc. to get a health status of JVM
-
in theory compact3/JMX would allow to use more developer tooling like Java FlightRecorder (JFR) even on compact3. In practice it did not work, we ran into issues, even if Oracle claims that it should work (see also http://stackoverflow.com/questions/34208333/does-flightrecorder-run-on-javase-8-embedded-8-compact2-profile)
-
The footprint in size of about flash memory (we observed about +4 MB difference) and in RAM would be acceptable for our environment, but this depends on every target hardware/software stack, as @maxurech also mentioned
-
The used OpenSource components are typcially not able to neither run on compact2 nor compact3, as they will use either JavaBeans, JAXB, where we did some "ports" of libraries getting rid of Full-JRE. So this is typically not so relevant for a compact2 vs 3 discussion
For logback I would consider the framework to be able to run on compact2. And if you want to have more functionality like on-the-fly configuration and monitoring this could be extended via an optional part which can then rely on JMX, so compact3.
Just my 2 cents
|