OSGI Service | Community
Skip to main content
Level 2
October 16, 2015
Solved

OSGI Service

  • October 16, 2015
  • 2 replies
  • 906 views

I have an OsgiService which implements EventHandler . The issue is it works perfectly fine for some time but afterwards it needs a bundle refresh or restart.

I have given all the required annotations @Component(immediate=true) .

 can you please give me some help for its cause or solution.

Any help would be highly appreciated.

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by Sham_HC

Note event handling require to be careful as by default if the processing is too slow it will blacklist your handler.


There are usually 2 options:

1 - configure the event admin to ignore timeout for your package
* To configure go to http://<host>:<port>/system/console/configMgr
* Select "Apache Felix Event Admin Implementation"
* You should see a list for ignore timeout

2 - fork your code to be handler asynchronously so that it doesn't get blacklisted.

2 replies

October 16, 2015

We're going to need a lot more detail than this to help you out.

What have you tried ?

What errors/exceptions are you seeing ?

What do you mean by '.. for some time'. How long ? Is it consistent ? Is there any pattern of usage that might be triggering the problem you are seeing ?

Whats in the log for you component and/or the general error log

Post relevant parts of your implementation

Heve you read Ove Lindström's post How do I ask a good question on a forum ?

Fraser.

Sham_HC
Sham_HCAccepted solution
Level 10
October 16, 2015

Note event handling require to be careful as by default if the processing is too slow it will blacklist your handler.


There are usually 2 options:

1 - configure the event admin to ignore timeout for your package
* To configure go to http://<host>:<port>/system/console/configMgr
* Select "Apache Felix Event Admin Implementation"
* You should see a list for ignore timeout

2 - fork your code to be handler asynchronously so that it doesn't get blacklisted.