openwebbeans-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From strub...@apache.org
Subject svn commit: r1533700 - /openwebbeans/cms-site/trunk/content/openwebbeans-spi.mdtext
Date Sat, 19 Oct 2013 07:54:43 GMT
Author: struberg
Date: Sat Oct 19 07:54:42 2013
New Revision: 1533700

URL: http://svn.apache.org/r1533700
Log:
add SPI docs

contributed by Karl Kilden, txs!

Modified:
    openwebbeans/cms-site/trunk/content/openwebbeans-spi.mdtext

Modified: openwebbeans/cms-site/trunk/content/openwebbeans-spi.mdtext
URL: http://svn.apache.org/viewvc/openwebbeans/cms-site/trunk/content/openwebbeans-spi.mdtext?rev=1533700&r1=1533699&r2=1533700&view=diff
==============================================================================
--- openwebbeans/cms-site/trunk/content/openwebbeans-spi.mdtext (original)
+++ openwebbeans/cms-site/trunk/content/openwebbeans-spi.mdtext Sat Oct 19 07:54:42 2013
@@ -18,5 +18,55 @@ Notice:    Licensed to the Apache Softwa
 
 # OpenWebBeans SPI
 
-Coming soon...
+###What is an SPI?
 
+> Service Provider Interface (SPI) is an API intended to be implemented
+> or extended by a third party. It can be used to enable framework
+> extension and  replaceable components.
+- [wikipedia][1]
+
+
+###How does the SPI functionality work in OpenWebBeans?
+First off reading about [OpenWebBeans Core](openwebbeans-impl.html) will give you the overall
idea. 
+Now as mentioned in that description the SPI is simply used to integrate other 
+frameworks with OpenWebBeans. The point of gravity for Java EE is definitely going
+towards CDI today and the SPI pattern ensures that OpenWebBeans can manage this handily.
+
+From a more technical standpoint it's nothing more then a bunch of interfaces. 
+For example a part of the SPI is the following interface:
+
+    :::java
+    package org.apache.webbeans.spi;
+   
+    /**
+    * Conversation related SPI.
+    * @version $Rev$ $Date$
+    */
+    public interface ConversationService
+    {
+        /**
+        * Gets the current conversation id or null
+        * if there is no conversation.
+        * @return the current conversation id
+        */
+        public String getConversationId();
+       
+        /**
+        * Gets the session id of the current session.
+        * @return the session id of the current user session
+        */
+        public String getConversationSessionId();
+   
+    }
+
+
+After seeing this interface one can easily conclude that frameworks that want to utilize
the Conversation Id functionality must implement this interface.
+Now since this is part of the specification for JSF 2.x the JSF plugin of course implements
it and actually the JSF 1.2 plugin as well. Supporting the Conversation Id in another plugin
should be rather intuitive and this is true for the SPI in general. 
+
+
+
+
+
+
+
+  [1]: http://en.wikipedia.org/wiki/Service_provider_interface



Mime
View raw message