> On 30 Apr 2015, at 11:11, Romain Reuillon <[email protected]> wrote:
>
> OpenMOLE uses OSGi for the runtime (on the execution nodes) too. Your bundle
> will be loaded in its own classloader so if you use
> pluginobject.getClass.getClassLoader.getRessource(....) it will find your
> file. I think you might want to provide this class loader to the typesafe
> config loader.
Thanks, that’s of course much better than trying to distinguish how the plugin
was imported.
>
> PS: I am not a big fan of typesafe config since it is not type-safe at all !
> :)
>
>
> Le 30/04/2015 11:39, Andreas Schuh a écrit :
>> Hi,
>>
>> I am interested in some details on how the ScalaTask’s are being executed on
>> the remote machine. Are they run within the OpenMOLE OSGi console
>> application or simply run as standalone Scala App ?
>>
>> The reason I am asking is that for some reason the reference typesafe config
>> of my plugin seems to be not read/found. This could be because of the
>> following code I am using to distinguish whether the code is executed as
>> part of an OSGi bundle or not. If it is, I have to use an URL to be able to
>> access the configuration file. In both cases it would use the
>> “reference.conf” in the plugin’s JAR file as fallback which works fine when
>> I use the code on my local machine. However, when the ScalaTask executes on
>> the remote machine (SLURM environment), the keys specified by this reference
>> configuration are missing.
>>
>> val config = {
>> ConfigFactory.defaultOverrides().withFallback(file match {
>> case Some(f) => ConfigFactory.parseFile(f)
>> case None => ConfigFactory.empty()
>> }).withFallback(System.getProperty("eclipse.application", "NotOpenMOLE")
>> match {
>> case "org.openmole.ui" => ConfigFactory.parseURL(new
>> URL("platform:/plugin/com.andreasschuh.repeat/reference.conf"))
>> case _ => ConfigFactory.defaultReference()
>> }).resolve()
>> }
>>
>> Andreas
>> _______________________________________________
>> OpenMOLE-users mailing list
>> [email protected]
>> http://fedex.iscpif.fr/mailman/listinfo/openmole-users
>
>
_______________________________________________
OpenMOLE-users mailing list
[email protected]
http://fedex.iscpif.fr/mailman/listinfo/openmole-users