Embed Eclipse Virgo inside another application server [message #834884] |
Mon, 02 April 2012 10:19  |
Eclipse User |
|
|
|
This may seem like a weird thing to want to do but I do have a good reason for it, honest.
The product for which I am responsible can be installed on a number of different application servers, e.g. JBoss, Tomcat, WebLogic, WebSphere. The choice is usually made by our customers. However, I want to make use of OSGi within the product to avoid us having to create our own inferior solution to the problems that OSGi already addresses. e.g. We have a need for dynamically loading various types of 'bundle' just like VTS supports.
For internal use we should be able to use Eclipse Virgo (i.e. VTS) out of the box but we cannot force our customers to change their preferred application server. However, we can define the structure inside the application.
One of our products already embeds OSGi using a proprietary 'bridge' that we created long before Enterprise OSGi came along and that works reasonably well, e.g. it routes all requests to the application through to our own implementation of the HttpService. However, we want to stop maintaining that ourselves and move towards something more 'standard'. But we are quite happy to write any bridging code between the application and the embedded Eclipse Virgo but do not know where to start.
I have a suspicion that this question is probably more related to Embedded Tomcat/Jetty than Eclipse Virgo but given that Eclipse Virgo can support both Tomcat and Jetty I thought that I would ask here first. I have had a look at both Embedded Tomcat and Jetty but there does not seem anyway to stop them from creating the incoming socket. Whereas what I want them to do is behave more like a Servlet, e.g. be given the HttpServletRequest/Response pair.
Just in case there is another way I can get what I need here is a brief summary of what the product does and what we are trying to achieve.
Our product essentially provides a Servlet Filter that processes incoming requests and outgoing responses. All requests to our application that satisfy the filter mapping, including those handled by the embedded Eclipse Virgo need to pass through the filter.
Within the application we need to support:
* Hot deployment, and removal of WAR files within the application, i.e. 'sub-context'. Would behave just like deploying WAR file in stand alone tomcat, i.e. create filters, servlets, contain custom JAR files.
* Hot deployment and removal of various types of OSGi bundles to be shared and used by the deployed WAR files.
Any help or advice would be greatly appreciated.
|
|
|
Re: Embed Eclipse Virgo inside another application server [message #834903 is a reply to message #834884] |
Mon, 02 April 2012 10:38   |
Eclipse User |
|
|
|
Apparently some people use embedded Jetty for this kind of use case. I gather it is possible to deploy OSGi standard Web Application Bundles into the embedded Jetty and drive them via a servlet request in the containing app server. Unfortunately, I don't know the technical details, so I recommend posting in Jetty land.
However, if you can figure out an approach which builds on Equinox, then it should be fairly straightforward to substituted Virgo nano, or possibly even the Virgo kernel, for Equinox and get Virgo's hot deployment support and other goodies such as nice diagnostics, medic/logback, Gogo shell, etc. (We are drawing up a feature comparison of the various Virgo deliverables, so keep an eye on the Virgo home page later this week. Or check out the Virgo white paper, available from the Virgo home page, which has a section entitled "Virgo Runtime Deliverables".)
|
|
|
|
|
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.05177 seconds