Hi Deepal,
please correct me if I'm wrong, but this is what happens for "normal"
modules. Do you mean "standard" modules come with lifecycle management
for free :)?
What I want is
public class MyModule implements Module {
// engage, canSupportAssertion, engageNotify()
private MyClass c;
public void init(ConfigurationContext configContext, AxisModule
module) {
this.c = new MyClass();
this.c.setEnabled(true); // this will set up some connections
}
public void shutdown(ConfigurationContext configurationContext) {
this.c.setEnabled(false); // this will finalize the c object,
close connections, etc.
}
}
Does this work? Do I have only 1 MyClass instance this way?
Thanks,
Michele
Deepal Jayasinghe wrote:
> Hi Michele ;
> To have module life cycle management you need to implement
> org.apache.axis2.modules.Module and specify the impl class in module.xml
> as follows;
>
> <module name="MyModule" class="full name of the module impl class">
>
> </module>
>
>
> Thanks
> Deepal
>
>> Hi all,
>>
>> I need to add lifecycle management to my custom module. More in detail,
>> I need to instantiate an object when the system starts and "destroy" it
>> when the systems shuts down.
>> Is it possible? Is this the aim of the init() and shutdown() methods?
>>
>> Thanks,
>> Michele
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>>
>>
>>
>>
>>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]