how to extend BaseHotDeployListener in liferay DXP

Mohamed Faisal, modified 7 Years ago. Junior Member Posts: 90 Join Date: 8/12/09 Recent Posts

To extend Model Listener In liferay 7-DXP we use the component

@Component(immediate = true, service = ModelListener.class)

 

I need to extend BaseHotDeployListener in my portlet. I tried with  

@Component(immediate = true, service = HotDeployListener.class)

 

its not working. Please let me how to extend BaseHotDeployListener  in DXP.

 

Regards,

Faisal

thumbnail
David H Nebinger, modified 7 Years ago. Liferay Legend Posts: 14933 Join Date: 9/2/06 Recent Posts

That is all that is necessary.  Have you verified that the component is started (ACTIVE) and that the service, too, has started (no unresolved dependencies)?

Mohamed Faisal, modified 7 Years ago. Junior Member Posts: 90 Join Date: 8/12/09 Recent Posts

I have verified that the component is ACTIVE and deployed to the  liferay server, but its not called the listener.

in DXP we build and deploy in different way unlike liferay 6.2, that is module not war.  Hence, do we need to call different listener?

thumbnail
David H Nebinger, modified 7 Years ago. Liferay Legend Posts: 14933 Join Date: 9/2/06 Recent Posts

In gogo, you can scr:list # to see the services your bundle has, then scr:info ## on the service number from list output to see the status of the service.  Make sure they are all active and have no unresolved dependencies.

Mohamed Faisal, modified 7 Years ago. Junior Member Posts: 90 Join Date: 8/12/09 Recent Posts

Thanks Nebinger. Its working fine.

BaseHotDeployListener is called restarting the server.