Am Donnerstag, den 27.09.2007, 12:57 +0700 schrieb Kevin Jackson: > Hi Norman, > > > what about writing a "small" service which get wired via assembly.xml ? > > So it will automatic startet via james and do the job until james is > > stopped.. > > Does this sound better ? > > This does sound like the kind of thing we want, which apis should I be > looking at (presumably not the mailet api)
Well you need to look at avalon framework... > > > > > If you have questions i can probaly assist you... > > Do you have a skeleton code for a service and the assembly wiring? > > Kev First off you should look at JDBCMailRepository (org.apache.james.mailrepository). Be sure to understand the avalon lifecycle. More infos can be found here: http://excalibur.apache.org/framework/lifecycle.html The basic steps which should be done are: 1. Create a service interface which holds the methods you need to get called. (org.apache.james.services) 2. Create a new package which holds the implementation of the service 3. Create a .xinfo file in the package which holds the dependencies of your service ( For example: MailStoreSpoolRepository.xinfo ) 4. Add your service to assembly.xml and inject all needed services to it. 5. Fire up james and cross fingers Maybe you can use org.apache.avalon.cornerstone.services.scheduler.PeriodicTimeTrigger to trigger you needed tasks. Look at FetchScheduler code to get more examples. Just ping me if you need more infos... bye Norman --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]