-
1. Re: Development Doubt : Problems in time synchronization between parent and child ? ? ?
arun2arunraj Jul 22, 2013 5:56 AM (in response to arun2arunraj)1 ) Parent getValues() method will be invoked before child getValues() method.
2 ) Parent thread will get highest priority than child.
I found these based on my knowledge.
Regards,
ArunRaj.
-
2. Re: Development Doubt : Problems in time synchronization between parent and child ? ? ?
tsegismont Jul 22, 2013 6:07 AM (in response to arun2arunraj)1 of 1 people found this helpfulArun,
Parent and children resources metric collection schedules are completely independent.
If you don't have too many children one thing you could do is calling Child#getValues from Parent#getValues for each child resource and then aggregate results.
If you have too many children or child metric collection is too slow you'll have to stick with something asynchronous.
Regards
-
3. Re: Development Doubt : Problems in time synchronization between parent and child ? ? ?
arun2arunraj Jul 23, 2013 7:22 AM (in response to tsegismont)Hi Thomas,
Thank you so much for guiding me again.
I am having minimum 5 resources. Could you please share me which asynchronous pattern is good in RHQ.
Asynchrounous : Concurrent Asynchronous API , JMS , Session Bean or something else.
Please put me in the perfect path.
Regards,
ArunRaj
-
4. Re: Development Doubt : Problems in time synchronization between parent and child ? ? ?
tsegismont Jul 23, 2013 8:55 AM (in response to arun2arunraj)Arun,
When I said asynchronous, I was not talking about any technology like JMS. I was saying that parent and child metric collection happen at different times in distinct threads.
If you absolutely need to compute something at parent level with latest values from child level you can (just one possibility):
- extract metric collection logic from child components to reusable classes
- use these new classes in your parent component class and collect values for each child
You can use ResourceContext in start/stop method to register/deregister the child component to/from the parent component.
Thomas
-
5. Re: Development Doubt : Problems in time synchronization between parent and child ? ? ?
arun2arunraj Jul 23, 2013 9:34 AM (in response to tsegismont)Hi Thomas,
Thank you so much Thomas, for guiding me in the best path. I understood the extraction and registering/deregistering tips which is being used in all RHQ Plugins. Now I believe, I can make it.
Regards,
ArunRaj.