Modified: websites/staging/openejb/trunk/content/singleton-example.html
==============================================================================
--- websites/staging/openejb/trunk/content/singleton-example.html (original)
+++ websites/staging/openejb/trunk/content/singleton-example.html Tue Jul 12 
18:06:32 2011
@@ -153,11 +153,11 @@
             <!-- $BODY -->
             <DIV id="PageContent">
           <p>{tip:title=OpenEJB 3.1 or later required}
-<a name="SingletonE<IMG class="emoticon" 
src="https://cwiki.apache.org/confluence/images/icons/emoticons/error.gif"; 
height="16" width="16" align="absmiddle" alt="" 
border="0">ample-Overview">&lt;<IMG class="emoticon" 
src="https://cwiki.apache.org/confluence/images/icons/emoticons/check.gif"; 
height="16" width="16" align="absmiddle" alt="" border="0">a></p>
+<a name="SingletonExample-Overview"></a></p>
 
 <h1>Overview</h1>
 
-<p>As the name implies a java<IMG class="emoticon" 
src="https://cwiki.apache.org/confluence/images/icons/emoticons/error.gif"; 
height="16" width="16" align="absmiddle" alt="" border="0">.ejb.Singleton is a 
session bean with a
+<p>As the name implies a javax.ejb.Singleton is a session bean with a
 guarantee that there is at most one instance in the application.</p>
 
 <p>What it gives you that is completely missing in EJB 3.0 and prior versions
@@ -169,13 +169,13 @@ all users using it, without the need for
 beans can be invoked by several threads at one time similar to a Servlet.</p>
 
 <p><em>See the <a href="singleton-beans.html">Singleton Beans</a>
- page for a full description of the java<IMG class="emoticon" 
src="https://cwiki.apache.org/confluence/images/icons/emoticons/error.gif"; 
height="16" width="16" align="absmiddle" alt="" border="0">.ejb.Singleton 
api.</em></p>
+ page for a full description of the javax.ejb.Singleton api.</em></p>
 
-<p><a name="SingletonE<IMG class="emoticon" 
src="https://cwiki.apache.org/confluence/images/icons/emoticons/error.gif"; 
height="16" width="16" align="absmiddle" alt="" 
border="0">ample-TheCode">&lt;<IMG class="emoticon" 
src="https://cwiki.apache.org/confluence/images/icons/emoticons/check.gif"; 
height="16" width="16" align="absmiddle" alt="" border="0">a></p>
+<p><a name="SingletonExample-TheCode"></a></p>
 
 <h1>The Code</h1>
 
-<p><a name="SingletonE<IMG class="emoticon" 
src="https://cwiki.apache.org/confluence/images/icons/emoticons/error.gif"; 
height="16" width="16" align="absmiddle" alt="" 
border="0">ample-PropertyRegistryBean">&lt;<IMG class="emoticon" 
src="https://cwiki.apache.org/confluence/images/icons/emoticons/check.gif"; 
height="16" width="16" align="absmiddle" alt="" border="0">a></p>
+<p><a name="SingletonExample-PropertyRegistryBean"></a></p>
 
 <h2>PropertyRegistryBean</h2>
 
@@ -186,9 +186,9 @@ container when the application starts.  
  The bean shown is a simple properties "registry" and provides a place
 where options could be set and retrieved by all beans in the application.</p>
 
-<p>{snippet:url=openejb3<IMG class="emoticon" 
src="https://cwiki.apache.org/confluence/images/icons/emoticons/check.gif"; 
height="16" width="16" align="absmiddle" alt="" border="0">e<IMG 
class="emoticon" 
src="https://cwiki.apache.org/confluence/images/icons/emoticons/error.gif"; 
height="16" width="16" align="absmiddle" alt="" border="0">amples<IMG 
class="emoticon" 
src="https://cwiki.apache.org/confluence/images/icons/emoticons/check.gif"; 
height="16" width="16" align="absmiddle" alt="" border="0">simple-singleton<IMG 
class="emoticon" 
src="https://cwiki.apache.org/confluence/images/icons/emoticons/check.gif"; 
height="16" width="16" align="absmiddle" alt="" border="0">src<IMG 
class="emoticon" 
src="https://cwiki.apache.org/confluence/images/icons/emoticons/check.gif"; 
height="16" width="16" align="absmiddle" alt="" border="0">main<IMG 
class="emoticon" 
src="https://cwiki.apache.org/confluence/images/icons/emoticons/check.gif"; 
height="16" width="16" align="absmiddle" alt="" border="0"
 >java<IMG class="emoticon" 
 >src="https://cwiki.apache.org/confluence/images/icons/emoticons/check.gif"; 
 >height="16" width="16" align="absmiddle" alt="" border="0">org<IMG 
 >class="emoticon" 
 >src="https://cwiki.apache.org/confluence/images/icons/emoticons/check.gif"; 
 >height="16" width="16" align="absmiddle" alt="" border="0">superbiz<IMG 
 >class="emoticon" 
 >src="https://cwiki.apache.org/confluence/images/icons/emoticons/check.gif"; 
 >height="16" width="16" align="absmiddle" alt="" border="0">registry<IMG 
 >class="emoticon" 
 >src="https://cwiki.apache.org/confluence/images/icons/emoticons/check.gif"; 
 >height="16" width="16" align="absmiddle" alt="" 
 >border="0">PropertyRegistryBean.java|lang=java|id=code}</p>
+<p>{snippet:url=openejb3/examples/simple-singleton/src/main/java/org/superbiz/registry/PropertyRegistryBean.java|lang=java|id=code}</p>
 
-<p><a name="SingletonE<IMG class="emoticon" 
src="https://cwiki.apache.org/confluence/images/icons/emoticons/error.gif"; 
height="16" width="16" align="absmiddle" alt="" 
border="0">ample-ComponentRegistryBean">&lt;<IMG class="emoticon" 
src="https://cwiki.apache.org/confluence/images/icons/emoticons/check.gif"; 
height="16" width="16" align="absmiddle" alt="" border="0">a></p>
+<p><a name="SingletonExample-ComponentRegistryBean"></a></p>
 
 <h2>ComponentRegistryBean</h2>
 
@@ -197,9 +197,9 @@ default.  With <em>@ConcurrencyManagemen
 whether multi-threaded access should be allowed to the bean 
(<em>@Lock(READ)</em>)
 or if single-threaded access should be enforced (<em>@Lock(WRITE)</em>).</p>
 
-<p>{snippet:url=openejb3<IMG class="emoticon" 
src="https://cwiki.apache.org/confluence/images/icons/emoticons/check.gif"; 
height="16" width="16" align="absmiddle" alt="" border="0">e<IMG 
class="emoticon" 
src="https://cwiki.apache.org/confluence/images/icons/emoticons/error.gif"; 
height="16" width="16" align="absmiddle" alt="" border="0">amples<IMG 
class="emoticon" 
src="https://cwiki.apache.org/confluence/images/icons/emoticons/check.gif"; 
height="16" width="16" align="absmiddle" alt="" border="0">simple-singleton<IMG 
class="emoticon" 
src="https://cwiki.apache.org/confluence/images/icons/emoticons/check.gif"; 
height="16" width="16" align="absmiddle" alt="" border="0">src<IMG 
class="emoticon" 
src="https://cwiki.apache.org/confluence/images/icons/emoticons/check.gif"; 
height="16" width="16" align="absmiddle" alt="" border="0">main<IMG 
class="emoticon" 
src="https://cwiki.apache.org/confluence/images/icons/emoticons/check.gif"; 
height="16" width="16" align="absmiddle" alt="" border="0"
 >java<IMG class="emoticon" 
 >src="https://cwiki.apache.org/confluence/images/icons/emoticons/check.gif"; 
 >height="16" width="16" align="absmiddle" alt="" border="0">org<IMG 
 >class="emoticon" 
 >src="https://cwiki.apache.org/confluence/images/icons/emoticons/check.gif"; 
 >height="16" width="16" align="absmiddle" alt="" border="0">superbiz<IMG 
 >class="emoticon" 
 >src="https://cwiki.apache.org/confluence/images/icons/emoticons/check.gif"; 
 >height="16" width="16" align="absmiddle" alt="" border="0">registry<IMG 
 >class="emoticon" 
 >src="https://cwiki.apache.org/confluence/images/icons/emoticons/check.gif"; 
 >height="16" width="16" align="absmiddle" alt="" 
 >border="0">ComponentRegistryBean.java|lang=java|id=code}</p>
+<p>{snippet:url=openejb3/examples/simple-singleton/src/main/java/org/superbiz/registry/ComponentRegistryBean.java|lang=java|id=code}</p>
 
-<p>Unless specified e<IMG class="emoticon" 
src="https://cwiki.apache.org/confluence/images/icons/emoticons/error.gif"; 
height="16" width="16" align="absmiddle" alt="" border="0">plicitly on the bean 
class or a method, the default
+<p>Unless specified explicitly on the bean class or a method, the default
 @Lock value is @Lock(WRITE).  The code above uses the @Lock(READ)
 annotation on bean class to change the default so that multi-threaded
 access is granted by default.  We then only need to apply the @Lock(WRITE)
@@ -208,15 +208,15 @@ annotation to the methods that modify th
 <p>Essentially @Lock(READ) allows multithreaded access to the Singleton bean
 instance <em>unless</em> someone is invoking an @Lock(WRITE) method.  With
 @Lock(WRITE), the thread invoking the bean will be guaranteed to have
-e<IMG class="emoticon" 
src="https://cwiki.apache.org/confluence/images/icons/emoticons/error.gif"; 
height="16" width="16" align="absmiddle" alt="" border="0">clusive access to 
the Singleton bean instance for the duration of its
+exclusive access to the Singleton bean instance for the duration of its
 invocation.  This combination allows the bean instance to use data types
 that are not normally thread safe.  Great care must still be used, though.  
</p>
 
-<p>In the e<IMG class="emoticon" 
src="https://cwiki.apache.org/confluence/images/icons/emoticons/error.gif"; 
height="16" width="16" align="absmiddle" alt="" border="0">ample we see 
ComponentRegistryBean using a java.util.HashMap which
+<p>In the example we see ComponentRegistryBean using a java.util.HashMap which
 is not synchronized.  To make this ok we do three things:</p>
 
 <ol>
-<li>Encapsulation.  We don't e<IMG class="emoticon" 
src="https://cwiki.apache.org/confluence/images/icons/emoticons/error.gif"; 
height="16" width="16" align="absmiddle" alt="" border="0">pose the HashMap 
instance directly; including
+<li>Encapsulation.  We don't expose the HashMap instance directly; including
 its iterators, key set, value set or entry set.</li>
 <li>We use @Lock(WRITE) on the methods that mutate the map such as the put()
 and remove() methods.  </li>
@@ -234,17 +234,17 @@ bit of an advantage over Servlets for pr
 <p><em>See the <a href="singleton-beans.html">Singleton Beans</a>
  page for more advanced details on Container-Managed Concurrency.</em></p>
 
-<p><a name="SingletonE<IMG class="emoticon" 
src="https://cwiki.apache.org/confluence/images/icons/emoticons/error.gif"; 
height="16" width="16" align="absmiddle" alt="" 
border="0">ample-TestCase">&lt;<IMG class="emoticon" 
src="https://cwiki.apache.org/confluence/images/icons/emoticons/check.gif"; 
height="16" width="16" align="absmiddle" alt="" border="0">a></p>
+<p><a name="SingletonExample-TestCase"></a></p>
 
 <h1>Test Case</h1>
 
-<p>{snippet:url=openejb3<IMG class="emoticon" 
src="https://cwiki.apache.org/confluence/images/icons/emoticons/check.gif"; 
height="16" width="16" align="absmiddle" alt="" border="0">e<IMG 
class="emoticon" 
src="https://cwiki.apache.org/confluence/images/icons/emoticons/error.gif"; 
height="16" width="16" align="absmiddle" alt="" border="0">amples<IMG 
class="emoticon" 
src="https://cwiki.apache.org/confluence/images/icons/emoticons/check.gif"; 
height="16" width="16" align="absmiddle" alt="" border="0">simple-singleton<IMG 
class="emoticon" 
src="https://cwiki.apache.org/confluence/images/icons/emoticons/check.gif"; 
height="16" width="16" align="absmiddle" alt="" border="0">src<IMG 
class="emoticon" 
src="https://cwiki.apache.org/confluence/images/icons/emoticons/check.gif"; 
height="16" width="16" align="absmiddle" alt="" border="0">test<IMG 
class="emoticon" 
src="https://cwiki.apache.org/confluence/images/icons/emoticons/check.gif"; 
height="16" width="16" align="absmiddle" alt="" border="0"
 >java<IMG class="emoticon" 
 >src="https://cwiki.apache.org/confluence/images/icons/emoticons/check.gif"; 
 >height="16" width="16" align="absmiddle" alt="" border="0">org<IMG 
 >class="emoticon" 
 >src="https://cwiki.apache.org/confluence/images/icons/emoticons/check.gif"; 
 >height="16" width="16" align="absmiddle" alt="" border="0">superbiz<IMG 
 >class="emoticon" 
 >src="https://cwiki.apache.org/confluence/images/icons/emoticons/check.gif"; 
 >height="16" width="16" align="absmiddle" alt="" border="0">registry<IMG 
 >class="emoticon" 
 >src="https://cwiki.apache.org/confluence/images/icons/emoticons/check.gif"; 
 >height="16" width="16" align="absmiddle" alt="" 
 >border="0">ComponentRegistryBeanTest.java|lang=java|id=code}</p>
+<p>{snippet:url=openejb3/examples/simple-singleton/src/test/java/org/superbiz/registry/ComponentRegistryBeanTest.java|lang=java|id=code}</p>
 
-<p><a name="SingletonE<IMG class="emoticon" 
src="https://cwiki.apache.org/confluence/images/icons/emoticons/error.gif"; 
height="16" width="16" align="absmiddle" alt="" 
border="0">ample-Running">&lt;<IMG class="emoticon" 
src="https://cwiki.apache.org/confluence/images/icons/emoticons/check.gif"; 
height="16" width="16" align="absmiddle" alt="" border="0">a></p>
+<p><a name="SingletonExample-Running"></a></p>
 
 <h1>Running</h1>
 
-<p>Running the e<IMG class="emoticon" 
src="https://cwiki.apache.org/confluence/images/icons/emoticons/error.gif"; 
height="16" width="16" align="absmiddle" alt="" border="0">ample is fairly 
simple.  In the "simple-singleton" directory
+<p>Running the example is fairly simple.  In the "simple-singleton" directory
 run:</p>
 
 <p>$ mvn clean install</p>
@@ -256,21 +256,21 @@ run:</p>
 -------------------------------------------------------
 Running org.superbiz.registry.ComponentRegistryBeanTest
 Apache OpenEJB 3.1-SNAPSHOT    build: 20080820-09:53
-http:&lt;IMG class="emoticon" 
src="https://cwiki.apache.org/confluence/images/icons/emoticons/check.gif"; 
height="16" width="16" align="absmiddle" alt="" border="0"&gt;&lt;IMG 
class="emoticon" 
src="https://cwiki.apache.org/confluence/images/icons/emoticons/check.gif"; 
height="16" width="16" align="absmiddle" alt="" 
border="0"&gt;openejb.apache.org&lt;IMG class="emoticon" 
src="https://cwiki.apache.org/confluence/images/icons/emoticons/check.gif"; 
height="16" width="16" align="absmiddle" alt="" border="0"&gt;
+http://openejb.apache.org/
 INFO - openejb.home =
 </code></pre>
 
-<p><IMG class="emoticon" 
src="https://cwiki.apache.org/confluence/images/icons/emoticons/check.gif"; 
height="16" width="16" align="absmiddle" alt="" border="0">Users<IMG 
class="emoticon" 
src="https://cwiki.apache.org/confluence/images/icons/emoticons/check.gif"; 
height="16" width="16" align="absmiddle" alt="" border="0">dblevins<IMG 
class="emoticon" 
src="https://cwiki.apache.org/confluence/images/icons/emoticons/check.gif"; 
height="16" width="16" align="absmiddle" alt="" border="0">work<IMG 
class="emoticon" 
src="https://cwiki.apache.org/confluence/images/icons/emoticons/check.gif"; 
height="16" width="16" align="absmiddle" alt="" border="0">openejb3<IMG 
class="emoticon" 
src="https://cwiki.apache.org/confluence/images/icons/emoticons/check.gif"; 
height="16" width="16" align="absmiddle" alt="" border="0">e<IMG 
class="emoticon" 
src="https://cwiki.apache.org/confluence/images/icons/emoticons/error.gif"; 
height="16" width="16" align="absmiddle" alt="" border="0">amples<IMG 
class="emotic
 on" src="https://cwiki.apache.org/confluence/images/icons/emoticons/check.gif"; 
height="16" width="16" align="absmiddle" alt="" border="0">simple-singleton
+<p>/Users/dblevins/work/openejb3/examples/simple-singleton
     INFO - openejb.base =
-<IMG class="emoticon" 
src="https://cwiki.apache.org/confluence/images/icons/emoticons/check.gif"; 
height="16" width="16" align="absmiddle" alt="" border="0">Users<IMG 
class="emoticon" 
src="https://cwiki.apache.org/confluence/images/icons/emoticons/check.gif"; 
height="16" width="16" align="absmiddle" alt="" border="0">dblevins<IMG 
class="emoticon" 
src="https://cwiki.apache.org/confluence/images/icons/emoticons/check.gif"; 
height="16" width="16" align="absmiddle" alt="" border="0">work<IMG 
class="emoticon" 
src="https://cwiki.apache.org/confluence/images/icons/emoticons/check.gif"; 
height="16" width="16" align="absmiddle" alt="" border="0">openejb3<IMG 
class="emoticon" 
src="https://cwiki.apache.org/confluence/images/icons/emoticons/check.gif"; 
height="16" width="16" align="absmiddle" alt="" border="0">e<IMG 
class="emoticon" 
src="https://cwiki.apache.org/confluence/images/icons/emoticons/error.gif"; 
height="16" width="16" align="absmiddle" alt="" border="0">amples<IMG 
class="emoticon"
  src="https://cwiki.apache.org/confluence/images/icons/emoticons/check.gif"; 
height="16" width="16" align="absmiddle" alt="" border="0">simple-singleton
+/Users/dblevins/work/openejb3/examples/simple-singleton
     INFO - Configuring Service(id=Default Security Service,
 type=SecurityService, provider-id=Default Security Service)
     INFO - Configuring Service(id=Default Transaction Manager,
 type=TransactionManager, provider-id=Default Transaction Manager)
     INFO - Found EjbModule in classpath:
-<IMG class="emoticon" 
src="https://cwiki.apache.org/confluence/images/icons/emoticons/check.gif"; 
height="16" width="16" align="absmiddle" alt="" border="0">Users<IMG 
class="emoticon" 
src="https://cwiki.apache.org/confluence/images/icons/emoticons/check.gif"; 
height="16" width="16" align="absmiddle" alt="" border="0">dblevins<IMG 
class="emoticon" 
src="https://cwiki.apache.org/confluence/images/icons/emoticons/check.gif"; 
height="16" width="16" align="absmiddle" alt="" border="0">work<IMG 
class="emoticon" 
src="https://cwiki.apache.org/confluence/images/icons/emoticons/check.gif"; 
height="16" width="16" align="absmiddle" alt="" border="0">openejb3<IMG 
class="emoticon" 
src="https://cwiki.apache.org/confluence/images/icons/emoticons/check.gif"; 
height="16" width="16" align="absmiddle" alt="" border="0">e<IMG 
class="emoticon" 
src="https://cwiki.apache.org/confluence/images/icons/emoticons/error.gif"; 
height="16" width="16" align="absmiddle" alt="" border="0">amples<IMG 
class="emoticon"
  src="https://cwiki.apache.org/confluence/images/icons/emoticons/check.gif"; 
height="16" width="16" align="absmiddle" alt="" border="0">simple-singleton<IMG 
class="emoticon" 
src="https://cwiki.apache.org/confluence/images/icons/emoticons/check.gif"; 
height="16" width="16" align="absmiddle" alt="" border="0">target<IMG 
class="emoticon" 
src="https://cwiki.apache.org/confluence/images/icons/emoticons/check.gif"; 
height="16" width="16" align="absmiddle" alt="" border="0">classes
+/Users/dblevins/work/openejb3/examples/simple-singleton/target/classes
     INFO - Beginning load:
-<IMG class="emoticon" 
src="https://cwiki.apache.org/confluence/images/icons/emoticons/check.gif"; 
height="16" width="16" align="absmiddle" alt="" border="0">Users<IMG 
class="emoticon" 
src="https://cwiki.apache.org/confluence/images/icons/emoticons/check.gif"; 
height="16" width="16" align="absmiddle" alt="" border="0">dblevins<IMG 
class="emoticon" 
src="https://cwiki.apache.org/confluence/images/icons/emoticons/check.gif"; 
height="16" width="16" align="absmiddle" alt="" border="0">work<IMG 
class="emoticon" 
src="https://cwiki.apache.org/confluence/images/icons/emoticons/check.gif"; 
height="16" width="16" align="absmiddle" alt="" border="0">openejb3<IMG 
class="emoticon" 
src="https://cwiki.apache.org/confluence/images/icons/emoticons/check.gif"; 
height="16" width="16" align="absmiddle" alt="" border="0">e<IMG 
class="emoticon" 
src="https://cwiki.apache.org/confluence/images/icons/emoticons/error.gif"; 
height="16" width="16" align="absmiddle" alt="" border="0">amples<IMG 
class="emoticon"
  src="https://cwiki.apache.org/confluence/images/icons/emoticons/check.gif"; 
height="16" width="16" align="absmiddle" alt="" border="0">simple-singleton<IMG 
class="emoticon" 
src="https://cwiki.apache.org/confluence/images/icons/emoticons/check.gif"; 
height="16" width="16" align="absmiddle" alt="" border="0">target<IMG 
class="emoticon" 
src="https://cwiki.apache.org/confluence/images/icons/emoticons/check.gif"; 
height="16" width="16" align="absmiddle" alt="" border="0">classes
+/Users/dblevins/work/openejb3/examples/simple-singleton/target/classes
     INFO - Configuring enterprise application: classpath.ear
     INFO - Configuring Service(id=Default Singleton Container, type=Container,
 provider-id=Default Singleton Container)


Reply via email to