[Yanel-dev] Introducing init() and destroy() for Resource.class

Josias Thöny josias.thoeny at wyona.com
Mon Dec 3 09:45:54 CET 2007


Michael Wechner wrote:
> Josias Thöny wrote:
> 
>> Evaldas Taroza wrote:
>>
>>>  > I think we should introduce a init() and destroy() methods for the
>>>  > Resource class, which would allow to initiate stuff once than per 
>>> request.
>>>
>>> I agree. Now I am trying to integrate Axis2 into Yanel and it 
>>> certainly needs one-time initialization/destruction. Currently I am 
>>> thinking of creating a context listener to initialize Axis2 Web 
>>> service repository and it looks like an ugly workaround.
>>
>>
>> Maybe the axis repository could be wrapped in a spring bean?
>> Resources can have their own spring config file, see e.g. the wiki 
>> resource 
>> (src/contributions/resources/wiki/src/build/spring-wiki-config.xml).
> 
> 
> Are the spring configs being initialized during startup?

yes.
IIRC a bean is a singleton by default, so it could be used for 
components which have to be instantiated only once.

josias

> 
> Cheers
> 
> Michi
> 
>>
>> josias
>>
>>>
>>> Evaldas
>>> _______________________________________________
>>> Yanel-development mailing list
>>> Yanel-development at wyona.com
>>> http://lists.wyona.org/cgi-bin/mailman/listinfo/yanel-development
>>
>>
>> _______________________________________________
>> Yanel-development mailing list
>> Yanel-development at wyona.com
>> http://lists.wyona.org/cgi-bin/mailman/listinfo/yanel-development
> 
> 
> 



More information about the Yanel-development mailing list