Running multiple OSGi http bundles on different ports with Equinox - jetty

I want to run multiple OSGi http bundles bound to different ports. I am using Server-Side Equinox for this which uses jetty as the underlying engine for providing Servlet API support.
If I want to run just a single bundle, I can just use the property - org.eclipse.equinox.http.jetty.http.port=8080. But how can we run multiple such bundles on different ports? Is it even possible to do this using equinox jetty server?
Thanks in advance.

Related

limitations of running WSO2 Carbon 4.x and WSO2 Carbon based products in webapp mode?

WSO2 Carbon is not officially supported in webapp mode (see the selected answer here). However, I have no choice - If I want to run carbon, it must be run in webapp mode.
There are some detailed instructions here for setting up carbon 4.x in webapp mode.
I am concerned is that standalone mode is strongly recommended by WSO2.
My Questions are: What are the limitations:
when running Carbon 4.x in webapp mode?
when running other Carbon based products (e.g. ESB, AS, etc) in webapp mode?
If possible, please provide a detailed list of the limitations.
Limitations:
When you take the ESB, as you might have seen it exposes ports 8280/8243 (HTTP/HTTPS) in addition to 9763/9443 which is exposed through the servlet transport. In the case of ESB you need (and want) to use port 8280/8243 when you're interacting with the ESB because those are the two non-blocking high performant transports. When you deploy ESB on top of another web container, you're limited by the servlet transports provided by the container. So we can't get the desired performance out of the ESB for proxying and other scenarios.
Complexities involving using web container functionalities. Carbon has its own clustering/caching/security etc... infrastructure. When you deploy Carbon as a webapp then we should look at supporting all those functions provided by the container for different containers. Which is complex, not consistent and in some cases sub-optimal
IMHO those were the two most important factors why it's discouraged to deploy Carbon on top of other containers. Going with a standalone deployment approach it has contributed immensely to not include web container specific "hacks" into the platform to get things done and have a much cleaner consistent platform.
One issues with deploying Carbon in web-app mode is that this deployment model is not supported by WSO2. I will add more issues to this answer as I encounter them...
AFAIK, webapp is not supported... Please refer this thread :Running WSO2 Carbon as Web Application in Tomcat
Regards,
Mohan

wso2 carbon - deploy to servicemix / fuseesb

My company has decided on fuseesb as their ESB platform. However, some of the carbon functionality would be useful to us. For example, the carbon components provide a nice structure for creating backend service components and front end ui components. Would it be possible to deploy carbon on top of an existing karaf/felix based container such as fuseesb?
Yes this is possible. We ourselves have successfully deployed carbon on top of Karaf runtime some-time ago.
If you are using Carbon 4.x.x then to expose HTTPService you can use the default shipped tomcat bundle. If you are using Carbon 3.x.x then you have to use Jetty OSGi bundle(not shipped by default) to get the HTTPService in your runtime.
Just to give an idea, Carbon uses embedded tomcat as the servlet container. All the admin services call usually depends on servlet transport (there can be exceptions).
All in all, you can do this, but keep in mind that this is a advanced usage of carbon and ClassLoading issues are on your way and you have to solve those. :)
HTH

websphere vs tomcat for jax-ws 2 web service deployment

I have an assignment that requires exposing a web service to 3rd party vendor based web application. I have the choice of server platform (between the 2 mentioned below) on which to deploy the web service. Should I deploy on tomcat 6 vs websphere 6.1.
I want to developed JAX-WS compliance web services in this case (with all the annotation support etc.)
My main concern - which of these two server platforms will scale my web service better - for example today the load might only be 300 transactions a second but it could increase 3-4 times in very near future..
This is probably something you will have to figure out for yourself by doing some load testing against both servers (if you already have them installed). Performance issues will always be dependant on how you have coded your web service and what resources are utilised (e.g. database, jms, etc).
A well tuned Tomcat server will perform just as well as a well tuned Websphere server because it's just a JVM under the hood. Keep in mind that Websphere provides a full J2EE stack, it will provide you with access to J2EE functionality that Tomcat does not provide (e.g. EJB) which is only a servlet container.
As long as you write your web service in a portable manner, you will be able to migrate between Tomcat or Websphere or ServerX in the future if that is what is required. Portability can be achieved by using a framework like Spring, with remote services so that you're not tied in to using a particular vendor's stack.
If you already have investment in Websphere servers I would continue to use them. If you are starting from scratch, why not begin with Tomcat (it's free!). Should you run into perfomance issues you'll have to look into using a load balanced solution and both servers can support this configuration.

How to connect two Spring applications through ESB using web-service binding components?

I have two Spring applications. One of them manages data storage (backend), the other communicates with users (frontend). Now I need to connect these two applications with ESB (Probably Fuse ESB) using web services (so probably CXF binding components). Could you explain to me how to achieve this functionality step by step?
I have Service interface and its implementation on backend Spring application.
Thanks for replies
Any Messaging protocol (JMS, AMQP, TCP etc.) would allow you to connect two apps that run in different JVMs together.
Have you look at Spring Integration project? You really don't need ESB for that.

how to deploy web application and web service in glassfish server

I want to deploy web application and web service in a glassfish server . How can I do it?
can I deploy two applications on different port? I can't combine the web application and RESTful web service.
thanks
Web apps and Jersey web services are both deployed in WARs. So, you have several options.
You can combine the two in to a single web app, and deploy a single WAR.
You can deploy them in separate WARs, with separate contexts (i.e. /war1, /ws2).
You can create a new virtual server (which can listen on any port) and one WAR to each, and then they can both be using the same context, they're just use different hosts and/or ports.
It's not clear what problem you're having or what you're trying to do, but those are the three main options available to you.