Hi Damith,

Make sure you include scr-plugin configurations in the pom and the correct
scr settings in the component initialization class. You may have a look at
 [1] and [2].

[1] -
https://github.com/wso2/carbon-storage-management/blob/master/components/rss-manager/org.wso2.carbon.rssmanager.core/pom.xml#L31-L34
[2] -
https://github.com/wso2/carbon-storage-management/blob/master/components/rss-manager/org.wso2.carbon.rssmanager.core/src/main/java/org/wso2/carbon/rssmanager/core/internal/RSSManagerServiceComponent.java

Thanks,
Harsha

On Tue, Jun 16, 2015 at 11:46 AM, Damith Senanayake <[email protected]>
wrote:

> Hi,
>
> I'm trying to register a user operation event listener from the package
> org.wso2.carbon.identity.user.profile.mgt and I have registered it as
> follows
>
>   protected void activate(ComponentContext ctxt) {
>
>         UserRenameEventListener listener = new UserRenameEventListener();
>
>
> ctxt.getBundleContext().registerService(UserOperationEventListener.class.getName(),listener,null);
>
>         try {
>             if (log.isDebugEnabled()) {
>                 log.debug("User Profile Mgt bundle is activated ");
>             }
>         } catch (Throwable e) {
>             log.error("Failed to activate ProfileMgt bundle ", e);
>         }
>     }
>
>
> ​However, when debugged, I noticed that the method 'activate' doesn't get
> hit. I tried logging it using a debug log, and also tried remote debugging.
> This method doesn't get called, yet the component is up and active.
>
> Any idea why this is happening?
>
> Thanks in advance for any help... ​
>
> --
> *-Damith Senanayake-*
> +94712205272
>
> _______________________________________________
> Dev mailing list
> [email protected]
> http://wso2.org/cgi-bin/mailman/listinfo/dev
>
>


-- 
Harsha Kumara
Software Engineer, WSO2 Inc.
Mobile: +94775505618
Blog:harshcreationz.blogspot.com
_______________________________________________
Dev mailing list
[email protected]
http://wso2.org/cgi-bin/mailman/listinfo/dev

Reply via email to