On 15 May 2014 at 20:26:49, MV (mee...@gmail.com) wrote:
Hello,I am trying to use DI with Spring and Akka actors. I found the template example at TypesafeActivator but I had question for a case that is not working for me.The example uses AnnotationBased DI and I would like to use XMl based for the following reason:I have two algorithm implementations for my project which project my results to the end user in different formats. The algorithms are also significantly different and I have a single JAVA interface that these 2 algorithms implement.I don't prefer the annotation based binding because I want the tester during integration testing to change the algorithm we use in an XML file or property file because if the chnage is done in a JAVA file, it warrants a new release of software version at the Integration test site. I want the tester to be able to run the jar with different algorithms based on an external XML/ java properties file.Qn 1) The example on the website to create the actor system and Props uses Java annotation technique. How do I convert that to a regular <bean>....</bean> kind of thing?
Qn 2) I want to create a few actors as simple UntypedActors and few Actors as ConsistentHashingRouter where the number of workers comes from a Java Properties file. Is this as simple as having another props() method? How can I translate this props() method to an XML format so that I can make it follow the way I want to in Qn (1). As of now, I do not want a mix of dependency injection techniques and would like to stick to one format.
Any help will be really appreciated because I am a novice to Spring DI with Akka actors.Thanks in advance,Meena Venkat
--
>>>>>>>>>> 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 akka-user+...@googlegroups.com.
To post to this group, send email to akka...@googlegroups.com.
Visit this group at http://groups.google.com/group/akka-user.
For more options, visit https://groups.google.com/d/optout.
class MyComponentActor extends UntypedActor
{
final Properties appProps;
@Inject
public MyComponentActor (@Named("myproperties") final Properties appProperties)
{
// do stuff
appProps = appProperties;
}
}