Mauricio Thanks,
 
The missing part in the app config was there (copyied the original 
file ) so the misstake was as you correctly pointed out the 
.WithService.DefaultInterfaces() 
part.
I removed it and everything worked like intended. So time to read up on 
castle to learn and avoid misstakes but many thanks for your assistance 8-)
 
Really appreciated it! Thanks Anders 

 

Den söndagen den 26:e maj 2013 kl. 20:08:57 UTC+2 skrev Anders Nilsson:

> Dear All,
>  
> Im looking for some pointers related to using Windsor.net and Quarts.net. 
> I have used the integration built by Mauricio, and have started out by 
> modifying the sample application.
>  
> http://bugsquash.blogspot.se/2009/03/windsor-facility-for-quartznet.html
>  
> My intention is to dynamically load a job from an separate assembly at 
> runtime and execute the loaded job,  i get no exceptions but also nothing 
> happens during execute so somethings wrong/missing.
>  
> In short this is the code:
>  
>  //Create container with default config from sample 
>             var container = new WindsorContainer(new XmlInterpreter());
>             
> //Register my testJob
>             container.Register(AllTypes.FromAssemblyNamed("TestJob")
>                                        .Where(type => type.IsPublic) 
>                                        .WithService
>                                        .DefaultInterfaces());
>            
> //Retreive scheduler
>             var scheduler = container.Resolve<IScheduler>();
>             
>             
> //Build job
>             IJobDetail aJobdetail = JobBuilder.Create<TestJob.TestJob1>()
>                                               .WithIdentity("TestJob1", 
> "group1")
>                                               .Build();
>             
> //Add job to scheduler
>             scheduler.AddJob(aJobdetail, true);
>             try
>             {
>                
>  //Start the TestJob
>                 scheduler.TriggerJob(aJobdetail.Key);
>             }
>             catch (Exception ex)
>             {
>                 Console.WriteLine(string.Format("Something bad happened 
> ... : {0}", ex.InnerException));
>             } 
>  
>  
> So basically everything runs ... but TriggerJob does nothing and here i 
> have clearly missed somthing / invoking things in a wrong way so if anyone 
> see what I have overlooked any pointers would be appreciated. 
>  
> Best regards Anders
>  
>  
>

-- 
You received this message because you are subscribed to the Google Groups 
"Castle Project Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to castle-project-users+unsubscr...@googlegroups.com.
To post to this group, send email to castle-project-users@googlegroups.com.
Visit this group at http://groups.google.com/group/castle-project-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to