stagemonitor / stagemonitor-mailinglist

GitHub issues abused as a mailing list
3 stars 0 forks source link

How to use stagemonitor in an OSGi based application #22

Open busychild opened 8 years ago

busychild commented 8 years ago

Hi guys,

we would like to use stagemonitor in our application which contains several servlets (for three applications) as well as some other servlets for resources, etc. The application is OSGi based and we're using Vaadin as our client/server framework.

How can we implement stagemonitor in this environment? What i've tried so far:

  1. Just added the maven depdencies and a new custom OSGi feature for stagemonitor -> Didn't worked
  2. Added the javaagent to the jvm args for running stagemonitor outside the environment -> Didn't worked
  3. Readded the maven dependencies and the feature and additionally called "StageMonitor.init()" and "new WebPlugin().onStartup(null, getServletContext());" in the "servletInitialized" method of one of our servlets -> Throws a nullpointer exception as "ConfigurationOptionProvider> T getConfig(Class configClass)" in Configuration.java can't find the options provider (there's just a CorePlugin inside the optionProvidersByClass but a WebPlugin is expected) and so the registration of the HttpRequestMonitorFilter won't work

As i'm not aware of how stagemonitor is attaching / embedding itself to the regarding application i'm stuck at the moment. Has anybody some ideas?

Thanks in advance and best regards

Florian

felixbarny commented 8 years ago

I didn't try out stagemonitor in an OSGI environment yet. Do you have an example application at hand that I could use to try out the integration?

busychild commented 8 years ago

Hi Felix, thanks - i've created a simple demo application here: https://github.com/busychild/vaadin-osgi-stagemonitor

I've implemented some parts of our application architecture so it should fit our environment. I try to init Stagemonitor in the StagemonitorServlet of the demo app.