tags:

views:

76

answers:

1

Hello everybody,

I’m a beginner with the technologies OSGi and JMX, so I have some questions and I hope to have answers.

I want to recover the OSGi Log object for display logs on my console eclipse and then display them on a jsp page.

Haw can I access to Log OSGi bundle via the JMX’ Object MBeanServerConnection?

Haw can I have LogEntry, ServiceReference and BundleContext?

Is there another way to logging OSGi with a distant Object?

Thanks,

Néjib.

A: 

From within OSGi, find the LogReader service, it will allow you to read the log entries of the OSGi system. Still, I do not understand your other use cases; what is the relationship between the JSP pages and the OSGi system?

Tassos Bassoukos
Thanks for your speed answer.I will display and monitoring the loggings OSGi via the web. So, I use for this struts and the JSP pages.
Néjib
In a bundle activator, set up a ServiceTracker that tracks the LogReader service. From your JSP fetch the LogReader and use it.
Tassos Bassoukos
Thanks, I will do it
Néjib
Hi Tassos,Perhaps this is obvious to you buthonestly I can not find theLogreader service. Can youhelp me with a concrete example.Thanks,Néjib.
Néjib
Hi, The solution is with Http ServiceThanks
Néjib
Hi, for the gory details, see the Log Service Specification in the OSGi Service Platform Service Compendium (download it for free from http://www.osgi.org/Download/Release4V42), section 101.4, page 22-850.
Tassos Bassoukos