You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by Wadi Jalil Maluf <wa...@gmail.com> on 2009/12/04 15:45:05 UTC

Init Code

Hi all,
       I'm building a web application with spring and apache cxf. I 
would like to know where te best place to put initialization code is.
Thanks in advance,
Regards,
Wadi


__________ Información de ESET NOD32 Antivirus, versión de la base de firmas de virus 4660 (20091204) __________

ESET NOD32 Antivirus ha comprobado este mensaje.

http://www.eset.com



Re: Init Code

Posted by Wadi Jalil Maluf <wa...@gmail.com>.
Thank you very much Pawel!!!!
Paweł Lipka escribió:
> Alternatively, not to tie yourself to JSR-250, you could put your code 
> into a plain 'void initialize() throws Exception' method and use 
> Spring's bean element init-method attribute to specify which method is 
> to be invoked after ur component is instantiated and wired to its 
> dependencies.
>
>
> Daniel Kulp wrote:
>>
>> In a method annotated with @PostConstruct?
>>
>> Dan
>>
>>
>>
>> On Fri December 4 2009 9:45:05 am Wadi Jalil Maluf wrote:
>>> Hi all,
>>>        I'm building a web application with spring and apache cxf. I
>>> would like to know where te best place to put initialization code is.
>>> Thanks in advance,
>>> Regards,
>>> Wadi
>>>
>>>
>>> __________ Información de ESET NOD32 Antivirus, versión de la base de
>>>  firmas de virus 4660 (20091204) __________
>>>
>>> ESET NOD32 Antivirus ha comprobado este mensaje.
>>>
>>> http://www.eset.com
>>>
>>
>
>



__________ Informaci�n de ESET NOD32 Antivirus, versi�n de la base de firmas de virus 4660 (20091204) __________

ESET NOD32 Antivirus ha comprobado este mensaje.

http://www.eset.com



Re: Init Code

Posted by Wadi Jalil Maluf <wa...@gmail.com>.
Thanks Edwin, Thanks Daniel!!
Edwin Quita escribió:
> you could also configure this declaratively in your service's impl
> bean declaration:
>
> <bean id="..." class="..." init-method="start" destroy-method="stop" />
>
> and inside your impl class implement the methods:
>
> public void start() {
>     //init code here..
> }
>
> public void stop() {
>     //shutdown code here...
> }
>
> On Fri, Dec 4, 2009 at 11:05 PM, Paweł Lipka <p....@amg.net.pl> wrote:
>   
>> Alternatively, not to tie yourself to JSR-250, you could put your code into
>> a plain 'void initialize() throws Exception' method and use Spring's bean
>> element init-method attribute to specify which method is to be invoked after
>> ur component is instantiated and wired to its dependencies.
>>
>>
>> Daniel Kulp wrote:
>>     
>>> In a method annotated with @PostConstruct?
>>>
>>> Dan
>>>
>>>
>>>
>>> On Fri December 4 2009 9:45:05 am Wadi Jalil Maluf wrote:
>>>       
>>>> Hi all,
>>>>       I'm building a web application with spring and apache cxf. I
>>>> would like to know where te best place to put initialization code is.
>>>> Thanks in advance,
>>>> Regards,
>>>> Wadi
>>>>
>>>>
>>>> __________ Información de ESET NOD32 Antivirus, versión de la base de
>>>>  firmas de virus 4660 (20091204) __________
>>>>
>>>> ESET NOD32 Antivirus ha comprobado este mensaje.
>>>>
>>>> http://www.eset.com
>>>>
>>>>         
>> --
>> Paweł Lipka
>> Senior IT Architect
>> AMG.net, A Bull Group Company
>> ul. Łąkowa 29
>> 90-554 Łódź
>> tel.: (+48 42) 634 56 78
>> www.amg.net.pl
>>
>> Treść niniejszej wiadomości może być poufna.
>> Jeżeli nie jesteście Państwo jej adresatem, to rozprowadzanie
>> lub wykorzystywanie zawartych tu informacji jest zabronione.
>>
>> This e-mail contains material that is confidential for the sole
>> use of the intended recipient. Any review, reliance or distribution
>> by others or forwarding without express permission is strictly
>> prohibited. If you are not the intended recipient, please contact
>> the sender and delete all copies.
>>
>>     
>
>
>
> __________ Información de ESET NOD32 Antivirus, versión de la base de firmas de virus 4660 (20091204) __________
>
> ESET NOD32 Antivirus ha comprobado este mensaje.
>
> http://www.eset.com
>
>
>   



__________ Información de ESET NOD32 Antivirus, versión de la base de firmas de virus 4660 (20091204) __________

ESET NOD32 Antivirus ha comprobado este mensaje.

http://www.eset.com



Re: Init Code

Posted by Edwin Quita <ed...@gmail.com>.
you could also configure this declaratively in your service's impl
bean declaration:

<bean id="..." class="..." init-method="start" destroy-method="stop" />

and inside your impl class implement the methods:

public void start() {
    //init code here..
}

public void stop() {
    //shutdown code here...
}

On Fri, Dec 4, 2009 at 11:05 PM, Paweł Lipka <p....@amg.net.pl> wrote:
> Alternatively, not to tie yourself to JSR-250, you could put your code into
> a plain 'void initialize() throws Exception' method and use Spring's bean
> element init-method attribute to specify which method is to be invoked after
> ur component is instantiated and wired to its dependencies.
>
>
> Daniel Kulp wrote:
>>
>> In a method annotated with @PostConstruct?
>>
>> Dan
>>
>>
>>
>> On Fri December 4 2009 9:45:05 am Wadi Jalil Maluf wrote:
>>>
>>> Hi all,
>>>       I'm building a web application with spring and apache cxf. I
>>> would like to know where te best place to put initialization code is.
>>> Thanks in advance,
>>> Regards,
>>> Wadi
>>>
>>>
>>> __________ Información de ESET NOD32 Antivirus, versión de la base de
>>>  firmas de virus 4660 (20091204) __________
>>>
>>> ESET NOD32 Antivirus ha comprobado este mensaje.
>>>
>>> http://www.eset.com
>>>
>>
>
>
> --
> Paweł Lipka
> Senior IT Architect
> AMG.net, A Bull Group Company
> ul. Łąkowa 29
> 90-554 Łódź
> tel.: (+48 42) 634 56 78
> www.amg.net.pl
>
> Treść niniejszej wiadomości może być poufna.
> Jeżeli nie jesteście Państwo jej adresatem, to rozprowadzanie
> lub wykorzystywanie zawartych tu informacji jest zabronione.
>
> This e-mail contains material that is confidential for the sole
> use of the intended recipient. Any review, reliance or distribution
> by others or forwarding without express permission is strictly
> prohibited. If you are not the intended recipient, please contact
> the sender and delete all copies.
>

Re: Init Code

Posted by Paweł Lipka <p....@amg.net.pl>.
Alternatively, not to tie yourself to JSR-250, you could put your code 
into a plain 'void initialize() throws Exception' method and use 
Spring's bean element init-method attribute to specify which method is 
to be invoked after ur component is instantiated and wired to its 
dependencies.


Daniel Kulp wrote:
> 
> In a method annotated with @PostConstruct?
> 
> Dan
> 
> 
> 
> On Fri December 4 2009 9:45:05 am Wadi Jalil Maluf wrote:
>> Hi all,
>>        I'm building a web application with spring and apache cxf. I
>> would like to know where te best place to put initialization code is.
>> Thanks in advance,
>> Regards,
>> Wadi
>>
>>
>> __________ Información de ESET NOD32 Antivirus, versión de la base de
>>  firmas de virus 4660 (20091204) __________
>>
>> ESET NOD32 Antivirus ha comprobado este mensaje.
>>
>> http://www.eset.com
>>
> 


-- 
Paweł Lipka
Senior IT Architect
AMG.net, A Bull Group Company
ul. Łąkowa 29
90-554 Łódź
tel.: (+48 42) 634 56 78
www.amg.net.pl

Treść niniejszej wiadomości może być poufna.
Jeżeli nie jesteście Państwo jej adresatem, to rozprowadzanie
lub wykorzystywanie zawartych tu informacji jest zabronione.

This e-mail contains material that is confidential for the sole
use of the intended recipient. Any review, reliance or distribution
by others or forwarding without express permission is strictly
prohibited. If you are not the intended recipient, please contact
the sender and delete all copies.

Re: Init Code

Posted by Daniel Kulp <dk...@apache.org>.

In a method annotated with @PostConstruct?

Dan



On Fri December 4 2009 9:45:05 am Wadi Jalil Maluf wrote:
> Hi all,
>        I'm building a web application with spring and apache cxf. I
> would like to know where te best place to put initialization code is.
> Thanks in advance,
> Regards,
> Wadi
> 
> 
> __________ Información de ESET NOD32 Antivirus, versión de la base de
>  firmas de virus 4660 (20091204) __________
> 
> ESET NOD32 Antivirus ha comprobado este mensaje.
> 
> http://www.eset.com
> 

-- 
Daniel Kulp
dkulp@apache.org
http://www.dankulp.com/blog