I have been a member of the OSGi Core Platform Expert Group for several years, and I was one of the founders of the OSGi Vehicle Expert Groups. Hence, I know the technologies pretty well. Unfortunately, the OSGi membership model makes it very difficult (read: expensive) for small companies like LodgON to become a participating member — and I am not interested in a membership that does not allow me to participate in the specification process.
Nevertheless, I am following the OSGi activities very closely, and we are doing some customer projects based on the OSGi specifications. At LodgON, we convinced a major customer to use OSGi for a very cool but secret prototype.
GlassFish v3 can hardly be compared with the previous generation of Application Servers. That is, it provides backward compatibility from a functional point of view. It will provide e.g. a container for WAR's and a container for EJB's.
But it can do much more (or much less) than the previous generations. In the past, an Application Server was a huge block of software providing some well-defined functionality to the user. What I have seen in a number of cases, though, is that only a small part of this functionality is used in a large number of projects. This leads almost inevitably to some sort of a penalty. If you have a simple web-project that only needs a WAR container, lots of standard functionality in the Application Server is rather a curse than a help.
As a consequence, the use of these full-featured Application Servers is often limited to high-end enterprise applications — although they provide at least the same functionality required for more simple web-projects.
On the other hand, Application Servers in many cases do not offer all the infrastructure that is needed in projects. I haven't seen many mobile applications running on an Application Server. Maybe this sounds weird, but I am pretty sure that this will be commodity within a few years. One could of course question whether we are still talking about Application Servers in this case, but my point is that the same technology can be used.
The OSGi model provides a very good architecture for solving both issues. The heart of an OSGi-based application is an implementation of the OSGi Framework. The OSGi Framework itself consists of a small number of classes and interfaces, that can be implemented by different vendors (actually, I wrote an implementation of the framework myself when I was working at Acunia, it isn't that hard).
The model then allows you to develop bundles and services (I am not going to explain the difference here again, I've done that thousands of times in the past and I am sure there are decent on-line resources describing this). Bundles may have dependencies on some packages, and they may export some packages. Apart from that, they can operate pretty independent from each other. The idea is that for a given project, you use only the bundles that are needed for that project. Suppose that the WAR container is a bundle, and the EJB container is another bundle, then you probably don't need the EJB bundle in the case of a simple web-project. And in the case you are working with mobile clients, you might need a MIDP bundle [long discussion about co-existence of OSGi and MIDP infrastructure on mobile devices omitted].
At this moment, GlassFish v3 only uses OSGi internally, hence no external API's are exposed. Work is currently being done to make the different parts of the Application Server code more modular, and fitting it into a number of bundles.
The efforts that this operation requires should not be underestimated. I have "OSGi'zed" a number of smaller projects, and it is not always easy to remove spaghetti-dependencies and make interactions cleaner and compliant with the OSGi model. However, the end result is often much more readable and better code.
It would be great, however, if GlassFish v3 goes one step further. Developers of middleware software can make some OSGi bundles as well, and deploy them in the Application Server. Those bundles can then depend on other bundles available in GlassFish, and only the required bundles are packaged together. The result is an Application Server that exactly contains what the application needs. In case of a complex enterprise application, this is probably a huge set of code. In case of a mobile application, we are probably talking about a much smaller number of bundles, and much less code.
Let's see how things evolve.