Dave Bryson wrote:
> 
> Hey everyone,
> 
> I have an idea for a Service.  However, it's Friday and I've had
> a couple of Harp beers so I thought I'd bounce the idea off all of you to see if
> it makes sense.
> 
> Essentially the idea stems from a requirement I have to generate some fairly
> heavy reports (PDF, RTF) from a Web Application (so much for the paperless
> office). Currently, I use Ant off a Cron job that generates these reports via a
> customized Texen task.  What I'd like to do is Web enable this so they could be
> handled more on demand versus a timed Cron.
> 
> So here's what I'm thinking - what if Turbine had an Ant Service that would
> allow you to call Ant tasks from Screens and Actions?  On the Service init()
> you could load all the targets and cache them for future calls. (Ant would
> not spawn another JVM). Then from your app, you call the AntService and execute
> the pre-configured targets. Ideally, the tasks would run in a separate thread.
> 
> This would allow you to use all of the existing Tasks available in Ant and allow
> one to configure tasks to do fairly complex things via the usual Ant xml file.
> Also, custom tasks could be created in the normal Ant fashion (extend Task).
> 
> Would others find this useful?  Any Ant experts see any objections of why this
> wouldn't work?  Should I lay off the Harps :-)?
> 

I like this idea!

The main issue I see is that Ant doesn't really provide a good mechanism
for integration into other apps.  Ant is called by invoking the Main
class from the command-line which isn't exactly the most useful process.

I wrote a class called AntWrapper which has much of the same code as in
Main except it can be put into other things.

You can look at it here, 

http://releng.tigris.org/source/browse/releng/java/org/tigris/releng/AntWrapper.java?rev=1.3&content-type=text/x-cvsweb-markup.

It's not pretty but it works.


josh


------------------------------------------------------------
To subscribe:        [EMAIL PROTECTED]
To unsubscribe:      [EMAIL PROTECTED]
Search: <http://www.mail-archive.com/turbine%40list.working-dogs.com/>
Problems?:           [EMAIL PROTECTED]

Reply via email to