hassan bousnguar wrote:hello,
what is the difference between OSGi and other remote invocation approach like RMI and CORBA
Marco already pretty much said it, but I'll restate and add to it...
OSGi is not a remoting technology. It's a modularization technology. For the first 10 years of its existence OSGi has focused on solving the problem of breaking monolithic, highly-coupled, low-cohesive applications into discrete, focused, and loosely-coupled modules...that all run in the same JVM.
The part of OSGi that can confuse many and make them think that it's another remoting technology is that OSGi is often referred to as "SOA in a JVM". It's a descriptive name, but can be misleading to anyone who thinks that SOA implies web services. That phrase means that it offers a service-oriented architecture (which doesn't necessarily have anything to do with SOAP, REST, RMI, CORBA, or any remoting technology) within a single JVM.
All that said, OSGi R4.2 defines a specification for declaring OSGi services (which are not naturally remote services) into web services. It's done declaratively by adding a few special attributes to the service when it's published into the OSGi service registry. I don't cover remote OSGi services in my book (they were still taking shape as I was writing), but I've blogged a bit about them (then called distributed OSGi) at http://www.jroller.com/habuma/entry/pax_runner_profiles_and_distributed.