Expand my Community achievements bar.

Guidelines for the Responsible Use of Generative AI in the Experience Cloud Community.
SOLVED

OSGI Service

Avatar

Level 2

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.

1 Accepted Solution

Avatar

Correct answer by
Level 10

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.

View solution in original post

2 Replies

Avatar

Former Community Member

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.

Avatar

Correct answer by
Level 10

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.