Glassfish OSGi debugging?

Hi,

I'm currently evaluating Intellij IDEA - I want to switch from Eclipse. At our company we currently develop OSGi applications under Glassfish (+ Felix). In Eclipse I'm able to connect to the glassfish debug port (defaults to 9009) and debug the developed OSGi bundles as they were normal applications. Currently I'm testing IDEA 10.5 and it is not able to submit a breakpoint and stop at it when executing the code snippet. Am I able to do this anyhow?
Thanks in advance!

Regards,
Sandor

4 comments
Comment actions Permalink

Hi Sandor,

Looks like you're asking about how to perform remote debugging at IJ.

Denis

0
Comment actions Permalink

Hi Denis,

yes, that was what I was thinking when I tried it, but it does not work for OSGi bundles just for web / enterprise applications. Using remote debug the bundle won't stop at any breakpoints I try to submit.
I believe that I set up everything correctly (I am able to connect to the remote server using remote debug), but the situation is still the same.

Regards,
Sandor

0
Comment actions Permalink

Hi Sandor,

how exactly did you set up glassfish to run your bundles? Could you zip up a small demo project that I could have a look at?

Kind regards,
Jan

0
Comment actions Permalink

I have fiddled a bit more with this. I created a project that creates a simple bundle using Osmorc. Then I created a  run configuration for glassfish which runs glassfish at the default settings and deploys nothing. I started this glassfish server in debug mode and put a breakpoint into my  BundleActivator.start method. Then I copied over my bundle to glassfish/domains/domain1/autodeploy/bundles and glassfish deployed it. After deploying, the breakpoint was hit. So I assume in general that debugging works for OSGi bundles as well. However I couldn't find a way yet to deploy OSGi-Bundles to glassfish, as the deployment in the glassfish run configuration seems to recognize web applications, only. I might be wrong on that, though.

I've attached my test project, hope this works for you as well.



Attachment(s):
glassfishtest.zip
0

Please sign in to leave a comment.