[jboss-user] [Installation, Configuration & DEPLOYMENT] - deploying a scheduled service

gasper_k do-not-reply at jboss.com
Mon Aug 20 09:54:53 EDT 2007


I'm using JBoss 4.2.1 GA and I'm trying to deploy a singleton service bean into a cluster and I've found three ways to do it:
1) deploy as a true HA singleton (didn't manage to get it to work),
2) deploy through a .sar archive with jboss-service.xml descriptor with a HASingletonDeployer Barrier dependency (the service gets created on each node, but only starts on one, which seems to work fine),
3) deploy with .jar and @Service annotation, without a descriptor file (works fine, only one node creates and starts the service).

Next, I want to add a scheduler that would call this singleton service on specified intervals. If I go with no. 2, it works fine, I add a SchedulerProvider with dependency on my mbean and also on HASingletonDeployer Barrier, so that the scheduler also only runs on one node.

This works fine, but I'm trying to deploy the service as described in no. 3. I'd have to rename the file to .jar, since @Service annotation doesn't get picked up if it's present inside a .sar archive, so the service isn't started and the scheduler reports a dependancy error (of course). I'd prefer to deploy my service as a "true" service, not simulate it via singleton-barrier dependency.

So; how can I deploy a @Service and a scheduler at the same time? I can't find any annotations for scheduling. I've searched around quite a lot, but can't find The Answer.

Perhaps I'm going the wrong way about it, but I need some sort of a singleton timer that would serve as the main job manager that would delegate work to specific beans in the cluster -- scheduled calls to clustered downloading, log processing, and such.

Thanks and best regards,

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4075854#4075854

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4075854

More information about the jboss-user mailing list