Author: limpbizkit
Date: Mon Feb 16 12:04:27 2009
New Revision: 848

Added:
    wiki/OSGi.wiki

Log:
Created wiki page through web user interface.

Added: wiki/OSGi.wiki
==============================================================================
--- (empty file)
+++ wiki/OSGi.wiki      Mon Feb 16 12:04:27 2009
@@ -0,0 +1,22 @@
+#summary Using Guice in an OSGi container
+=OSGi=
+OSGi is a dynamic module system, used in many projects including  
[http://www.eclipse.org/ Eclipse] and [https://glassfish.dev.java.net/  
Glassfish]. Guice integrates with OSGi via the third-party  
[http://code.google.com/p/peaberry/ peaberry] project.
+
+===What are the benefits of peaberry?===
+Peaberry exposes a fluent API to publish and consume OSGi services.
+
+You can inject OSGi services, just like any other Guice binding. When that  
service is reloaded, the binding transparently continues to work.
+
+You can expose bound types as OSGi services.
+
+===Can I use Guice in an OSGi environment without peaberry?===
+Yes.
+
+===What are the constraints of using Guice's OSGi support?===
+Guice uses [ClassLoading bytecode generation] for AOP, faster reflection,  
and to proxy circular dependencies. If you dynamically unload an OSGi  
module, it's necessary to unload the generated bytecode as well. Otherwise  
each time the application is dynamically reloaded, memory will be leaked.
+
+The simplest solution is to *use dynamic module reloading sparingly*. It's  
usually fine to do a full JVM shutdown when a production service is  
upgraded. This also avoids problems like serialization-compatibility for  
HTTP session objects.
+
+Otherwise, you need to make sure that reflectively-invoked members are  
visible to the generated bytecode. In particular, *avoid intercepting  
package-private methods*.
+
+

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"google-guice-dev" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/google-guice-dev?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to