Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- companyIds = getCompaniesByIndustry(industryId)
- for( companyId : companyIds){
- FetchActor.tell(companyId ,self())
- }
- @Component
- @Scope("prototype")
- SOAPAPI soapAPI{
- return URL; /// other componenet SOAP service
- }
- @Component
- @Scope("prototype")
- FetchActor extends UntypedActor {
- @Override
- public void preStart() throws Exception {
- //
- }
- public void onReceive(Object msg) throws Throwable {
- if(msg instanceof String) {
- String companyId = (String ) msg;
- // fetch results of companyId by calling SOAP URL ---this is causing issue here
- //save results in lis/db table.
- }
- }
- @Bean
- public ActorSystem actorSystem() {
- ActorSystem system = ActorSystem.create("ActorSystem", akkaConfiguration());
- springExtension.initialize(applicationContext);
- system.actorOf((springExtension.props("fetchActor")).withRouter(new RoundRobinPool( 5 )), "FetchActor");
- return system;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement