Juan Hernandez has posted comments on this change. Change subject: core: introduce osinfo service instead of Config values ......................................................................
Patch Set 1: (1 inline comment) .................................................... File backend/manager/modules/utils/src/main/java/org/ovirt/engine/core/utils/osinfo/LibosinfoClient.java Line 86: Line 87: String options = "-Djava.rmi.server.hostname=localhost"; Line 88: String mainClassName = "org.ovirt.engine.core.osinfo.server.LibosinfoServer"; Line 89: Line 90: builder.command(java, "-cp", classpath, options, mainClassName); These are not independent software components, as the external process is meaningless without the engine, and just a workaround to avoid direct calls to the libosinfo native methods. But even if they were, software components communicate and start as their developers find more convenient. There is no law mandating them to communicate using any particular protocol or mandating them to start in any particular way. In this particular case I believe that what is more convenient is launching the external process from the main process (the fact that it is running JBoss is not relevant) as that doesn't require any external service manager, any external scripts or any external configuration. The concerns about leaked resources can be handled in this context. Creating the new process from the engine service script is not better than creating it from the main process, same issues to take care of, and the addiotional issues introduced by the fact that we can't directly use the stub generated in the standard output by the external process (RMI registry, etc). In my opinion the only reasonable alternative to doing this is calling the native methods directly, which I believe is better. The only real obstacle for calling directly the native methods is the fear that people has of native methods, and that, as Roy suggested, can be overcome with good testing. Line 91: return builder; Line 92: } Line 93: Line 94: private ProcessBuilder buildShellProcessCmd() { -- To view, visit http://gerrit.ovirt.org/12936 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ibd75679a1a1af5d5a0925e181b5dfd6e87574a75 Gerrit-PatchSet: 1 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Roy Golan <rgo...@redhat.com> Gerrit-Reviewer: Allon Mureinik <amure...@redhat.com> Gerrit-Reviewer: Alon Bar-Lev <alo...@redhat.com> Gerrit-Reviewer: Juan Hernandez <juan.hernan...@redhat.com> Gerrit-Reviewer: Michal Skrivanek <michal.skriva...@redhat.com> Gerrit-Reviewer: Omer Frenkel <ofren...@redhat.com> Gerrit-Reviewer: Roy Golan <rgo...@redhat.com> _______________________________________________ Engine-patches mailing list Engine-patches@ovirt.org http://lists.ovirt.org/mailman/listinfo/engine-patches