You can define several Bootable classes, but a Bootable doesn't take parameters. One way is to define the properties in a configuration file that each bootable reads from.
Be aware of that akka sbt dist is discontinued in version 2.3.x and sbt-native-packager <https://github.com/sbt/sbt-native-packager> is the recommended tool for creating distributions of Akka applications when using sbt. Regards, Patrik On Wed, Jun 11, 2014 at 11:20 AM, Axel Poigné <[email protected]> wrote: > Hello, > > I like to distribute a Akka microkernel to a cluster using > akka-sbt-plugin. I have several boot classes, some of which do need a > parameter. The situation is best compared with the > akka-sample-cluster-scala factorial example where we have a main > > object FactorialApp { > def main(args: Array[String]): Unit = { > // starting 3 backend nodes and 1 frontend node > FactorialBackend.main( Seq( "2551" ).toArray ) > FactorialBackend.main( Seq( "2552" ).toArray ) > FactorialBackend.main( Array.empty ) > FactorialFrontend.main( Array.empty ) > } > } > > where different ports are provided to the FactorialBackend. In my case, > however, the FactorialBackend should be a Bootable that is distributed to a > cluster but with different parameters (here port names). I am aware of > > > http://stackoverflow.com/questions/15888579/get-command-line-arguments-when-running-an-akka-microkernel > > which does not provide a solution. > > I would like to stick to using sbt dist for convenience, but there might > be other ways to proceed. > > Any help would be welcome. > > Axel > > -- > >>>>>>>>>> Read the docs: http://akka.io/docs/ > >>>>>>>>>> Check the FAQ: > http://doc.akka.io/docs/akka/current/additional/faq.html > >>>>>>>>>> Search the archives: > https://groups.google.com/group/akka-user > --- > You received this message because you are subscribed to the Google Groups > "Akka User List" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To post to this group, send email to [email protected]. > Visit this group at http://groups.google.com/group/akka-user. > For more options, visit https://groups.google.com/d/optout. > -- Patrik Nordwall Typesafe <http://typesafe.com/> - Reactive apps on the JVM Twitter: @patriknw <http://www.scaladays.org/> -- >>>>>>>>>> Read the docs: http://akka.io/docs/ >>>>>>>>>> Check the FAQ: >>>>>>>>>> http://doc.akka.io/docs/akka/current/additional/faq.html >>>>>>>>>> Search the archives: https://groups.google.com/group/akka-user --- You received this message because you are subscribed to the Google Groups "Akka User List" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/akka-user. For more options, visit https://groups.google.com/d/optout.
