Jarosław Czub

Ogólnie o rozwou, programowaniu i nie tylko…

Tag: scala

How to add balancer in scala 2.9 and akka 2.0.2

In Akka 2.0.2 authors change a procedure to set a load balance. Example to set router: val system = ActorSystem("HarvestSystem") val router = system.actorOf(Props[SiteTestActor].withRouter(RoundRobinRouter(nrOfInstances = testSiteWorkes)))   implicit val timeout = Timeout (10 seconds)   val countUrl=index.values.size val countDownUrl = new CountDownLatch(countUrl)   var cnt=0 index.values.foreach(url =>{   Sys.info("HarvestActor::"+actorName,"Start site test "+cnt+": "+url.toString,4) cnt+=1   […]

NetBeans 7.1.2 and complie JARs to single JAR

In build.xml add new target: <target name="__package-for-store" depends="jar">         <property name="store.jar.name" value="${application.title}"/>           <property name="store.dir" value="store"/>         <property name="store.jar" value="${store.dir}/${store.jar.name}.jar"/>           <echo message="Packaging ${application.title} into a single JAR at ${store.jar}"/>           <delete dir="${store.dir}"/>         <mkdir dir="${store.dir}"/>           <jar destfile="${store.dir}/temp_final.jar" filesetmanifest="skip">             <zipgroupfileset dir="dist" includes="*.jar"/>             <zipgroupfileset dir="dist/lib" includes="*.jar"/>               <manifest> […]

© 2024 Jarosław Czub — Powered by WordPress