cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Upayavira ...@upaya.co.uk>
Subject Re: CocoonBean
Date Sat, 31 Jan 2004 14:05:29 GMT
Moving over from users@

Simon Mieth wrote:

>On Sat, 31 Jan 2004 07:57:34 +0000
>Upayavira <uv@upaya.co.uk> wrote:
>
>
>  
>
>>A crawler is not re-entrant. You need a new one each time.
>>So you would call bean.process(crawler) with a newly
>>created crawler.
>>
>>Obviously all of your 'set' javabean properties of the
>>bean would need to be set and left alone before going into
>>a multithreaded mode, so the bean isn't strictly
>>threadsafe, at least until the bean is initialised. To
>>make it properly threadsafe would probably require quite a
>>redesign.
>>    
>>
>
>  
>
>>As I say above, you'd call process(crawler) passing it a
>>new crawler each time.
>>
>>    
>>
>>>With CheckSumURI, there is a controller over processed
>>>URI's too.
>>> 
>>>
>>>      
>>>
>>The checksum stuff is pretty basic, and a bit of a hack.
>>That wouldn't work in a multithreaded environment without
>>some work.
>>
>>    
>>
>>>Other question ;)
>>>
>>>Is there a way to stop the processing? I have only found
>>>dispose(), but this need then a new CocoonBean-instance.
>>> 
>>>
>>>      
>>>
>>To stop processing? How would you like to stop processing?
>>>From another thread? You could have crawler.setStop(true)
>>which the process() method would check isStop == true to
>>find out whether it should continue or not. That wouldn't
>>be too hard.
>>
>>Simon, if you're doing this sort of work with the bean,
>>and understanding how it works, then send in patches. Make
>>it do what you want it to do. We can then commit those
>>patches and everyone benefits. That's how I got involved
>>with it, I just started sending in patches.
>>
>>Regards, Upayavira
>>    
>>
>
>
>Hi Upayavira,
>
>The process(Crawler crawler) is a good idea. 
>
>  
>
Good.

The question is - what do we expose as an interface. Currently, the 
Crawler and Target classes aren't really intended to be public. Do we 
add crawler.addTarget(src, dest, etc) methods so that the Target class 
remains private. Also, I think we should move the Crawler class from 
o.a.c.bean.helpers to o.a.c.bean, as it is now more than a helper really.

>Ok, i will try to add  a "process(Crawler crawler)", which
>will do the same as process(). This will break nothing and
>the CLI and your ANT-Task will work without changes.
>  
>
Yup.

>I control the Bean from a GUI, so stop processing with
>"CTRL+C" is not that what i want ;-). I have a
>"Cancel"-button there, to stop the processing (the
>cocoon-documentation is build in 3-4 minutes, it will be
>fine to stop this, if someone want this).
>
>I will try to add a stop/interrupt-flag in the process, test
>it and add all as "PATCH" to bugzilla.
>  
>
Great.

>I hope this will help you.
>  
>
Not just me, all of us I hope!

Regards, Upayavira



Mime
View raw message