tomee-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From build...@apache.org
Subject svn commit: r798007 - /websites/staging/openejb/trunk/content/containers-and-resources.html
Date Fri, 04 Nov 2011 00:33:05 GMT
Author: buildbot
Date: Fri Nov  4 00:33:05 2011
New Revision: 798007

Log:
Staging update by buildbot

Modified:
    websites/staging/openejb/trunk/content/containers-and-resources.html

Modified: websites/staging/openejb/trunk/content/containers-and-resources.html
==============================================================================
--- websites/staging/openejb/trunk/content/containers-and-resources.html (original)
+++ websites/staging/openejb/trunk/content/containers-and-resources.html Fri Nov  4 00:33:05
2011
@@ -3,7 +3,7 @@
   <head>
 
     <meta charset="utf-8">
-      <title>Containers and Resources</title>
+      <title></title>
     <meta name="description" content="">
     <meta name="author" content="">
 
@@ -69,102 +69,528 @@
 
 <div class="page-header">
 <small><a href=".//index.html">Home</a></small><br>
-<h1>Containers and Resources</h1>
+<h1></h1>
 </div>
 
-<p><div class="anchor">: containers}
-<a name="ContainersandResources-Containers"></a></p>
+<h1>STATELESS <small>Container </small></h1>
 
-<h1>Containers<div class="anchor">:Default CMP Container-container}</h1>
+<p>Declarable in openejb.xml via</p>
+
+<pre><code>&lt;Container id="Foo" type="STATELESS"&gt;
+&lt;/Container&gt;
+</code></pre>
+
+<p>Declarable in properties via</p>
+
+<pre><code>Foo = new://Container?type=STATELESS
+</code></pre>
+
+<h2>Properties</h2>
+
+<h3>AccessTimeout</h3>
+
+<p>Specifies the time an invokation should wait for an instance
+of the pool to become available.</p>
+
+<p>After the timeout is reached, if an instance in the pool cannot
+be obtained, the method invocation will fail.</p>
+
+<p>Usable time units: nanoseconds, microsecons, milliseconds,
+seconds, minutes, hours, days.  Or any combination such as
+"1 hour and 27 minutes and 10 seconds"</p>
+
+<p>Any usage of the <code>javax.ejb.AccessTimeout</code> annotation will
+override this setting for the bean or method where the
+annotation is used.</p>
+
+<h3>MaxSize</h3>
+
+<p>Specifies the size of the bean pools for this stateless
+SessionBean container.  If StrictPooling is not used, instances
+will still be created beyond this number if there is demand, but
+they will not be returned to the pool and instead will be
+immediately destroyed.</p>
+
+<h3>MinSize</h3>
+
+<p>Specifies the minimum number of bean instances that should be in
+the pool for each bean.  Pools are prefilled to the minimum on
+startup.  Note this will create start order dependencies between
+other beans that also eagerly start, such as other <code>@Stateless</code>
+beans with a minimum or <code>@Singleton</code> beans using <code>@Startup</code>.
 The
+start order.</p>
+
+<p>The minimum pool size is rigidly maintained.  Instances in the
+minimum side of the pool are not eligible for <code>IdleTimeout</code> or
+<code>GarbageCollection</code>, but are subject to <code>MaxAge</code>
and flushing.</p>
+
+<p>If the pool is flushed it is immediately refilled to the minimum
+size with <code>MaxAgeOffset</code> applied.  If an instance from the minimum
+side of the pool reaches its <code>MaxAge</code>, it is also immediately
+replaced.  Replacement is done in a background queue using the
+number of threads specified by <code>CallbackThreads</code>.</p>
+
+<h3>StrictPooling</h3>
+
+<p>StrictPooling tells the container what to do when the pool
+reaches it's maximum size and there are incoming requests that
+need instances.</p>
+
+<p>With strict pooling, requests will have to wait for instances to
+become available. The pool size will never grow beyond the the
+set <code>MaxSize</code> value.  The maximum amount of time a request should
+wait is specified via the <code>AccessTimeout</code> setting.</p>
+
+<p>Without strict pooling, the container will create temporary
+instances to meet demand. The instances will last for just one
+method invocation and then are removed.</p>
+
+<p>Setting <code>StrictPooling</code> to <code>false</code>
and <code>MaxSize</code> to <code>0</code> will result in
+no pooling. Instead instances will be created on demand and live
+for exactly one method call before being removed.</p>
+
+<h3>MaxAge</h3>
+
+<p>Specifies the maximum time that an instance should live before
+it should be retired and removed from use.  This will happen
+gracefully.  Useful for situations where bean instances are
+designed to hold potentially expensive resources such as memory
+or file handles and need to be periodically cleared out.</p>
+
+<p>Usable time units: nanoseconds, microsecons, milliseconds,
+seconds, minutes, hours, days.  Or any combination such as
+<code>1 hour and 27 minutes and 10 seconds</code></p>
+
+<h3>ReplaceAged</h3>
+
+<p>When <code>ReplaceAged</code> is enabled, any instances in the pool
that
+expire due to reaching their <code>MaxAge</code> will be replaced immediately
+so that the pool will remain at its current size.  Replacement
+is done in a background queue so that incoming threads will not
+have to wait for instance creation.</p>
+
+<p>The aim of his option is to prevent user requests from paying
+the instance creation cost as <code>MaxAge</code> is enforced, potentially
+while under heavy load at peak hours.</p>
+
+<p>Instances from the minimum side of the pool are always replaced
+when they reach their <code>MaxAge</code>, this setting dictates the
+treatment of non-minimum instances.</p>
+
+<h3>ReplaceFlushed</h3>
 
-<p><a name="ContainersandResources-CMP_ENTITY"></a></p>
+<p>When <code>ReplaceFlushed</code> is enabled, any instances in the pool
that
+are flushed will be replaced immediately so that the pool will
+remain at its current size.  Replacement is done in a background
+queue so that incoming threads will not have to wait for
+instance creation.</p>
 
-<h2>CMP_ENTITY</h2>
+<p>The aim of his option is to prevent user requests from paying
+the instance creation cost if a flush performed while under
+heavy load at peak hours.</p>
+
+<p>Instances from the minimum side of the pool are always replaced
+when they are flushed, this setting dictates the treatment of
+non-minimum instances.</p>
+
+<p>A bean may flush its pool by casting the <code>SessionContext</code>
to
+<code>Flushable</code> and calling <code>flush()</code>.  See <code>SweepInterval</code>
for details on
+how flush is performed.</p>
+
+<pre><code>import javax.annotation.Resource;
+import javax.ejb.SessionContext;
+import javax.ejb.Stateless;
+import java.io.Flushable;
+import java.io.IOException;
+
+public class MyBean {
+
+    private SessionContext sessionContext;
+
+    public void flush() throws IOException {
+
+        ((Flushable) sessionContext).flush();
+    }
+}
+</code></pre>
+
+<h3>MaxAgeOffset</h3>
+
+<p>Applies to MaxAge usage and would rarely be changed, but is a
+nice feature to understand.</p>
+
+<p>When the container first starts and the pool is filled to the
+minimum size, all those "minimum" instances will have the same
+creation time and therefore all expire at the same time dictated
+by the <code>MaxAge</code> setting.  To protect against this sudden drop
+scenario and provide a more gradual expiration from the start
+the container will spread out the age of the instances that fill
+the pool to the minimum using an offset.</p>
+
+<p>The <code>MaxAgeOffset</code> is not the final value of the offset,
but
+rather it is used in creating the offset and allows the
+spreading to push the initial ages into the future or into the
+past.  The pool is filled at startup as follows:</p>
+
+<pre><code>for (int i = 0; i &lt; poolMin; i++) {
+    long ageOffset = (maxAge / poolMin * i * maxAgeOffset) % maxAge;
+    pool.add(new Bean(), ageOffset));
+}
+</code></pre>
+
+<p>The default <code>MaxAgeOffset</code> is -1 which causes the initial
+instances in the pool to live a bit longer before expiring.  As
+a concrete example, let's say the MinSize is 4 and the MaxAge is
+100 years.  The generated offsets for the four instances created
+at startup would be 0, -25, -50, -75.  So the first instance
+would be "born" at age 0, die at 100, living 100 years.  The
+second instance would be born at -25, die at 100, living a total
+of 125 years.  The third would live 150 years.  The fourth 175
+years.</p>
+
+<p>A <code>MaxAgeOffset</code> of 1 would cause instances to be "born"
older
+and therefore die sooner.  Using the same example <code>MinSize</code> of 4
+and <code>MaxAge</code> of <code>100 years</code>, the life spans
of these initial four
+instances would be 100, 75, 50, and 25 years respectively.</p>
+
+<p>A <code>MaxAgeOffset</code> of 0 will cause no "spreading" of the age
of the
+first instances used to fill the pool to the minimum and these
+instances will of course reach their MaxAge at the same time.
+It is possible to set to decimal values such as -0.5, 0.5, -1.2,
+or 1.2.</p>
+
+<h3>IdleTimeout</h3>
+
+<p>Specifies the maximum time that an instance should be allowed to
+sit idly in the pool without use before it should be retired and
+removed.</p>
+
+<p>Usable time units: nanoseconds, microsecons, milliseconds,
+seconds, minutes, hours, days.  Or any combination such as
+"1 hour and 27 minutes and 10 seconds"</p>
+
+<h3>GarbageCollection</h3>
+
+<p>Allows Garbage Collection to be used as a mechanism for shrinking
+the pool.  When set to true all instances in the pool, excluding
+the minimum, are eligible for garbage collection by the virtual
+machine as per the rules of <code>java.lang.ref.SoftReference</code> and can
be
+claimed by the JVM to free memory.  Instances garbage collected
+will have their <code>@PreDestroy</code> methods called during finalization.</p>
+
+<p>In the OpenJDK VM the <code>-XX:SoftRefLRUPolicyMSPerMB</code> flag
can adjust
+how aggressively SoftReferences are collected.  The default
+OpenJDK setting is 1000, resulting in inactive pooled instances
+living one second of lifetime per free megabyte in the heap, which
+is very aggressive.  The setting should be increased to get the
+most out of the <code>GarbageCollection</code> feature of the pool.  Much
+higher settings are safe.  Even a setting as high as 3600000 (1
+hour per free MB in the heap) does not affect the ability for the
+VM to garbage collect SoftReferences in the event that memory is
+needed to avoid an <code>OutOfMemoryException</code>.</p>
+
+<h3>SweepInterval</h3>
+
+<p>The frequency in which the container will sweep the pool and
+evict expired instances.  Eviction is how the <code>IdleTimeout</code>,
+<code>MaxAge</code>, and pool "flush" functionality is enforced.  Higher
+intervals are better.</p>
+
+<p>Instances in use are excluded from sweeping.  Should an instance
+expire while in use it will be evicted immediately upon return
+to the pool.  Effectively <code>MaxAge</code> and flushes will be enforced as
+a part of normal activity or sweeping, while IdleTimeout is only
+enforcable via sweeping.  This makes aggressive sweeping less
+important for a pool under moderate load.</p>
+
+<p>Usable time units: nanoseconds, microsecons, milliseconds,
+seconds, minutes, hours, days.  Or any combination such as
+<code>1 hour and 27 minutes and 10 seconds</code></p>
+
+<h3>CallbackThreads</h3>
+
+<p>When sweeping the pool for expired instances a thread pool is
+used to process calling <code>@PreDestroy</code> on expired instances as well
+as creating new instances as might be required to fill the pool
+to the minimum after a Flush or <code>MaxAge</code> expiration.  The
+<code>CallbackThreads</code> setting dictates the size of the thread pool and
+is shared by all beans deployed in the container.</p>
+
+<h3>CloseTimeout</h3>
+
+<p>PostConstruct methods are invoked on all instances in the pool
+when the bean is undeployed and its pool is closed.  The
+<code>CloseTimeout</code> specifies the maximum time to wait for the pool to
+close and <code>PostConstruct</code> methods to be invoked.</p>
+
+<p>Usable time units: nanoseconds, microsecons, milliseconds,
+seconds, minutes, hours, days.  Or any combination such as
+<code>1 hour and 27 minutes and 10 seconds</code></p>
+
+<h2>Default declaration</h2>
+
+<pre><code>&lt;Container id="Default Stateless Container" type="STATELESS"&gt;
+    AccessTimeout = 30 seconds
+    MaxSize = 10
+    MinSize = 0
+    StrictPooling = true
+    MaxAge = 0 hours
+    ReplaceAged = true
+    ReplaceFlushed = false
+    MaxAgeOffset = -1
+    IdleTimeout = 0 minutes
+    GarbageCollection = false
+    SweepInterval = 5 minutes
+    CallbackThreads = 5
+    CloseTimeout = 5 minutes
+&lt;/Container&gt;
+</code></pre>
+
+<h1>STATEFUL <small>Container </small></h1>
 
 <p>Declarable in openejb.xml via</p>
 
-<pre><code>&lt;Container id="Foo" type="CMP_ENTITY"&gt;
+<pre><code>&lt;Container id="Foo" type="STATEFUL"&gt;
 &lt;/Container&gt;
 </code></pre>
 
-<p>Declarable in properties via<div class="panel">}
-Foo = new://Container?type=CMP_ENTITY<div class="panel">}
-Supports the following properties
-    || Property Name || Description ||
-    | CmpEngineFactory | Default value is
-<em>org.apache.openejb.core.cmp.jpa.JpaCmpEngineFactory</em>.||
-<div class="anchor">:Default BMP Container-container}
-<a name="ContainersandResources-BMP_ENTITY"></a></p>
+<p>Declarable in properties via</p>
+
+<pre><code>Foo = new://Container?type=STATEFUL
+</code></pre>
+
+<h2>Properties</h2>
+
+<h3>AccessTimeout</h3>
+
+<p>Specifies the maximum time an invocation could wait for the
+<code>@Stateful</code> bean instance to become available before giving up.</p>
+
+<p>After the timeout is reached a <code>javax.ejb.ConcurrentAccessTimeoutException</code>
+will be thrown.</p>
+
+<p>Usable time units: nanoseconds, microsecons, milliseconds,
+seconds, minutes, hours, days.  Or any combination such as
+"1 hour and 27 minutes and 10 seconds"</p>
+
+<p>Any usage of the <code>javax.ejb.AccessTimeout</code> annotation will
+override this setting for the bean or method where the
+annotation is used.</p>
+
+<h3>Cache</h3>
+
+<p>The cache is responsible for managing stateful bean
+instances.  The cache can page instances to disk as memory
+is filled and can destroy abandoned instances.  A different
+cache implementation can be used by setting this property
+to the fully qualified class name of the Cache implementation.</p>
+
+<h3>Passivator</h3>
+
+<p>The passivator is responsible for writing beans to disk
+at passivation time. Different passivators can be used
+by setting this property to the fully qualified class name
+of the <code>PassivationStrategy</code> implementation. The passivator
+is not responsible for invoking any callbacks or other
+processing, its only responsibly is to write the bean state
+to disk.</p>
+
+<p>Known implementations:</p>
+
+<ul>
+<li>org.apache.openejb.core.stateful.RAFPassivater</li>
+<li>org.apache.openejb.core.stateful.SimplePassivater</li>
+</ul>
 
-<h2>BMP_ENTITY</h2>
+<h3>TimeOut</h3>
+
+<p>Specifies the time a bean can be idle before it is removed by the container.</p>
+
+<p>This value is measured in minutes. A value of 5 would
+result in a time-out of 5 minutes between invocations.
+A value of -1 would mean no timeout.
+A value of 0 would mean a bean can be immediately removed by the container.</p>
+
+<p>Any usage of the <code>javax.ejb.StatefulTimeout</code> annotation will
+override this setting for the bean where the annotation is used.</p>
+
+<h3>Frequency</h3>
+
+<p>Specifies the frequency (in seconds) at which the bean cache is checked for 
+idle beans.</p>
+
+<h3>Capacity</h3>
+
+<p>Specifies the size of the bean pools for this
+stateful SessionBean container.</p>
+
+<h3>BulkPassivate</h3>
+
+<p>Property name that specifies the number of instances
+to passivate at one time when doing bulk passivation.</p>
+
+<h2>Default declaration</h2>
+
+<pre><code>&lt;Container id="Default Stateful Container" type="STATEFUL"&gt;
+    AccessTimeout = 30 seconds
+    Cache = org.apache.openejb.core.stateful.SimpleCache
+    Passivator = org.apache.openejb.core.stateful.SimplePassivater
+    TimeOut = 20
+    Frequency = 60
+    Capacity = 1000
+    BulkPassivate = 100
+&lt;/Container&gt;
+</code></pre>
+
+<h1>SINGLETON <small>Container </small></h1>
 
 <p>Declarable in openejb.xml via</p>
 
-<pre><code>&lt;Container id="Foo" type="BMP_ENTITY"&gt;
+<pre><code>&lt;Container id="Foo" type="SINGLETON"&gt;
 &lt;/Container&gt;
 </code></pre>
 
-<p>Declarable in properties via<div class="panel">}
-Foo = new://Container?type=BMP_ENTITY<div class="panel">}
-Supports the following properties
-    || Property Name || Description ||</p>
+<p>Declarable in properties via</p>
+
+<pre><code>Foo = new://Container?type=SINGLETON
+</code></pre>
+
+<h2>Properties</h2>
+
+<h3>AccessTimeout</h3>
+
+<p>Specifies the maximum time an invocation could wait for the
+<code>@Singleton</code> bean instance to become available before giving up.</p>
+
+<p>After the timeout is reached a <code>javax.ejb.ConcurrentAccessTimeoutException</code>
+will be thrown.</p>
+
+<p>Usable time units: nanoseconds, microsecons, milliseconds,
+seconds, minutes, hours, days.  Or any combination such as
+<code>1 hour and 27 minutes and 10 seconds</code></p>
+
+<p>Any usage of the <code>javax.ejb.AccessTimeout</code> annotation will
+override this setting for the bean or method where the
+annotation is used.</p>
+
+<h2>Default declaration</h2>
 
-<p><div class="anchor">:Default Stateless Container-container}
-<a name="ContainersandResources-STATELESS"></a></p>
+<pre><code>&lt;Container id="Default Singleton Container" type="SINGLETON"&gt;
+    AccessTimeout = 30 seconds
+&lt;/Container&gt;
+</code></pre>
 
-<h2>STATELESS</h2>
+<h1>MESSAGE <small>Container </small></h1>
 
 <p>Declarable in openejb.xml via</p>
 
-<pre><code>&lt;Container id="Foo" type="STATELESS"&gt;
+<pre><code>&lt;Container id="Foo" type="MESSAGE"&gt;
+&lt;/Container&gt;
+</code></pre>
+
+<p>Declarable in properties via</p>
+
+<pre><code>Foo = new://Container?type=MESSAGE
+</code></pre>
+
+<h2>Properties</h2>
+
+<h3>ResourceAdapter</h3>
+
+<p>The resource adapter delivers messages to the container</p>
+
+<h3>MessageListenerInterface</h3>
+
+<p>Specifies the message listener interface handled by this container</p>
+
+<h3>ActivationSpecClass</h3>
+
+<p>Specifies the activation spec class</p>
+
+<h3>InstanceLimit</h3>
+
+<p>Specifies the maximum number of bean instances that are
+allowed to exist for each MDB deployment.</p>
+
+<h2>Default declaration</h2>
+
+<pre><code>&lt;Container id="Default MDB Container" type="MESSAGE"&gt;
+    ResourceAdapter = Default JMS Resource Adapter
+    MessageListenerInterface = javax.jms.MessageListener
+    ActivationSpecClass = org.apache.activemq.ra.ActiveMQActivationSpec
+    InstanceLimit = 10
+&lt;/Container&gt;
+</code></pre>
+
+<h1>MANAGED <small>Container </small></h1>
+
+<p>Declarable in openejb.xml via</p>
+
+<pre><code>&lt;Container id="Foo" type="MANAGED"&gt;
 &lt;/Container&gt;
 </code></pre>
 
-<p>Declarable in properties via<div class="panel">}
-Foo = new://Container?type=STATELESS<div class="panel">}
-Supports the following properties
-    || Property Name || Description ||</p>
+<p>Declarable in properties via</p>
+
+<pre><code>Foo = new://Container?type=MANAGED
+</code></pre>
 
-<p><div class="anchor">:Default Stateful Container-container}
-<a name="ContainersandResources-STATEFUL"></a></p>
+<p>No properties.</p>
 
-<h2>STATEFUL</h2>
+<h1>CMP_ENTITY <small>Container </small></h1>
 
 <p>Declarable in openejb.xml via</p>
 
-<pre><code>&lt;Container id="Foo" type="STATEFUL"&gt;
+<pre><code>&lt;Container id="Foo" type="CMP_ENTITY"&gt;
 &lt;/Container&gt;
 </code></pre>
 
-<p>Declarable in properties via<div class="panel">}
-Foo = new://Container?type=STATEFUL<div class="panel">}
-Supports the following properties
-    || Property Name || Description ||</p>
+<p>Declarable in properties via</p>
+
+<pre><code>Foo = new://Container?type=CMP_ENTITY
+</code></pre>
+
+<h2>Properties</h2>
+
+<h3>CmpEngineFactory</h3>
+
+<p>No description.</p>
+
+<h2>Default declaration</h2>
 
-<p><div class="anchor">:Default MDB Container-container}
-<a name="ContainersandResources-MESSAGE"></a></p>
+<pre><code>&lt;Container id="Default CMP Container" type="CMP_ENTITY"&gt;
+    CmpEngineFactory = org.apache.openejb.core.cmp.jpa.JpaCmpEngineFactory
+&lt;/Container&gt;
+</code></pre>
 
-<h2>MESSAGE</h2>
+<h1>BMP_ENTITY <small>Container </small></h1>
 
 <p>Declarable in openejb.xml via</p>
 
-<pre><code>&lt;Container id="Foo" type="MESSAGE"&gt;
+<pre><code>&lt;Container id="Foo" type="BMP_ENTITY"&gt;
 &lt;/Container&gt;
 </code></pre>
 
-<p>Declarable in properties via<div class="panel">}
-Foo = new://Container?type=MESSAGE<div class="panel">}
-Supports the following properties
-    || Property Name || Description ||</p>
+<p>Declarable in properties via</p>
 
-<p><div class="anchor">: resources}
-<a name="ContainersandResources-Resources"></a></p>
+<pre><code>Foo = new://Container?type=BMP_ENTITY
+</code></pre>
+
+<h2>Properties</h2>
+
+<h3>PoolSize</h3>
 
-<h1>Resources<div class="anchor">:Default JDBC Database-resource}</h1>
+<p>Specifies the size of the bean pools for this
+bmp entity container.</p>
 
-<p><a name="ContainersandResources-javax.sql.DataSource"></a></p>
+<h2>Default declaration</h2>
 
-<h2>javax.sql.DataSource</h2>
+<pre><code>&lt;Container id="Default BMP Container" type="BMP_ENTITY"&gt;
+    PoolSize = 10
+&lt;/Container&gt;
+</code></pre>
+
+<h1>javax.sql.DataSource <small>Resource </small></h1>
 
 <p>Declarable in openejb.xml via</p>
 
@@ -172,18 +598,245 @@ Supports the following properties
 &lt;/Resource&gt;
 </code></pre>
 
-<p>Declarable in properties via<div class="panel">}
-Foo = new://Resource?type=javax.sql.DataSource<div class="panel">}
-Supports the following properties
-    || Property Name || Description ||</p>
+<p>Declarable in properties via</p>
 
-<pre><code>| Password | Default password|
+<pre><code>Foo = new://Resource?type=javax.sql.DataSource
 </code></pre>
 
-<p><div class="anchor">:Default JMS Resource Adapter-resource}
-<a name="ContainersandResources-ActiveMQResourceAdapter"></a></p>
+<h2>Properties</h2>
+
+<h3>Definition</h3>
+
+<p>No description.</p>
+
+<h3>JtaManaged</h3>
+
+<p>Determines wether or not this data source should be JTA managed
+or user managed.  If set to 'true' it will automatically be enrolled
+in any ongoing transactions.  Calling begin/commit/rollback or setAutoCommit
+on the datasource or connection will not be allowed.  If you need to perform
+these functions yourself, set <code>JtaManaged</code> to <code>false</code></p>
+
+<p>In terms of JPA persistence.xml:</p>
+
+<ul>
+<li><code>JtaManaged=true</code> can be used as a 'jta-data-source'</li>
+<li><code>JtaManaged=false</code> can be used as a 'non-jta-data-source'</li>
+</ul>
+
+<h3>JdbcDriver</h3>
+
+<p>Driver class name</p>
+
+<h3>JdbcUrl</h3>
+
+<p>Url for creating connections</p>
+
+<h3>UserName</h3>
+
+<p>Default user name</p>
+
+<h3>Password</h3>
+
+<p>Default password</p>
+
+<h3>PasswordCipher</h3>
+
+<p>No description.</p>
+
+<h3>ConnectionProperties</h3>
+
+<p>The connection properties that will be sent to the JDBC
+driver when establishing new connections</p>
+
+<p>Format of the string must be [propertyName=property;]*</p>
+
+<p>NOTE - The "user" and "password" properties will be passed
+explicitly, so they do not need to be included here.</p>
+
+<h3>DefaultAutoCommit</h3>
+
+<p>The default auto-commit state of new connections</p>
+
+<h3>DefaultReadOnly</h3>
+
+<p>The default read-only state of new connections
+If not set then the setReadOnly method will not be called.
+(Some drivers don't support read only mode, ex: Informix)</p>
+
+<h3>DefaultTransactionIsolation</h3>
+
+<p>The default TransactionIsolation state of new connections
+If not set then the <code>setTransactionIsolation</code> method will not
+be called. The allowed values for this property are:</p>
+
+<ul>
+<li><code>NONE</code></li>
+<li><code>READ_COMMITTED</code></li>
+<li><code>READ_UNCOMMITTED</code></li>
+<li><code>REPEATABLE_READ</code></li>
+<li><code>SERIALIZABLE</code></li>
+</ul>
+
+<p>Note: Most JDBC drivers do not support all isolation levels</p>
+
+<h3>InitialSize</h3>
+
+<p>The initial number of connections that are created when the
+pool is started</p>
+
+<h3>MaxActive</h3>
+
+<p>The maximum number of active connections that can be
+allocated from this pool at the same time, or a negative
+number for no limit.</p>
+
+<h3>MaxIdle</h3>
+
+<p>The maximum number of connections that can remain idle in
+the pool, without extra ones being released, or a negative
+number for no limit.</p>
+
+<h3>MinIdle</h3>
+
+<p>The minimum number of connections that can remain idle in
+the pool, without extra ones being created, or zero to
+create none.</p>
+
+<h3>MaxWait</h3>
+
+<p>The maximum number of milliseconds that the pool will wait
+(when there are no available connections) for a connection
+to be returned before throwing an exception, or -1 to wait
+indefinitely.</p>
+
+<h3>ValidationQuery</h3>
+
+<p>The SQL query that will be used to validate connections from
+this pool before returning them to the caller. If specified,
+this query MUST be an SQL SELECT statement that returns at
+least one row.</p>
+
+<h3>TestOnBorrow</h3>
+
+<p>If true connections will be validated before being returned
+from the pool. If the validation fails, the connection is
+destroyed, and a new conection will be retrieved from the
+pool (and validated).</p>
+
+<p>NOTE - for a true value to have any effect, the
+ValidationQuery parameter must be set.</p>
+
+<h3>TestOnReturn</h3>
+
+<p>If true connections will be validated before being returned
+to the pool.  If the validation fails, the connection is
+destroyed instead of being returned to the pool.</p>
+
+<p>NOTE - for a true value to have any effect, the
+ValidationQuery parameter must be set.</p>
+
+<h3>TestWhileIdle</h3>
+
+<p>If true connections will be validated by the idle connection
+evictor (if any). If the validation fails, the connection is
+destroyed and removed from the pool</p>
+
+<p>NOTE - for a true value to have any effect, the
+timeBetweenEvictionRunsMillis property must be a positive
+number and the ValidationQuery parameter must be set.</p>
+
+<h3>TimeBetweenEvictionRunsMillis</h3>
+
+<p>The number of milliseconds to sleep between runs of the idle
+connection evictor thread. When set to a negative number, no
+idle connection evictor thread will be run.</p>
+
+<h3>NumTestsPerEvictionRun</h3>
+
+<p>The number of connectionss to examine during each run of the
+idle connection evictor thread (if any).</p>
+
+<h3>MinEvictableIdleTimeMillis</h3>
+
+<p>The minimum amount of time a connection may sit idle in the
+pool before it is eligable for eviction by the idle
+connection evictor (if any).</p>
+
+<h3>PoolPreparedStatements</h3>
+
+<p>If true, a statement pool is created for each Connection and
+PreparedStatements created by one of the following methods are
+pooled:</p>
+
+<pre><code>public PreparedStatement prepareStatement(String sql);
+public PreparedStatement prepareStatement(String sql, int resultSetType, int resultSetConcurrency)
+</code></pre>
 
-<h2>ActiveMQResourceAdapter</h2>
+<h3>MaxOpenPreparedStatements</h3>
+
+<p>The maximum number of open statements that can be allocated
+from the statement pool at the same time, or zero for no
+limit.</p>
+
+<p>NOTE - Some drivers have limits on the number of open
+statements, so make sure there are some resources left
+for the other (non-prepared) statements.</p>
+
+<h3>AccessToUnderlyingConnectionAllowed</h3>
+
+<p>If true the raw physical connection to the database can be
+accessed using the following construct:</p>
+
+<pre><code>Connection conn = ds.getConnection();
+Connection rawConn = ((DelegatingConnection) conn).getInnermostDelegate();
+...
+conn.close()
+</code></pre>
+
+<p>Default is false, because misbehaving programs can do harmfull
+things to the raw connection shuch as closing the raw
+connection or continuing to use the raw connection after it
+has been assigned to another logical connection.  Be careful
+and only use when you need direct access to driver specific
+extensions.</p>
+
+<p>NOTE: Do NOT close the underlying connection, only the
+original logical connection wrapper.</p>
+
+<h2>Default declaration</h2>
+
+<pre><code>&lt;Resource id="Default JDBC Database" type="javax.sql.DataSource"&gt;
+    Definition = 
+    JtaManaged = true
+    JdbcDriver = org.hsqldb.jdbcDriver
+    JdbcUrl = jdbc:hsqldb:file:data/hsqldb/hsqldb
+    UserName = sa
+    Password = 
+    PasswordCipher = PlainText
+    ConnectionProperties = 
+    DefaultAutoCommit = true
+    DefaultReadOnly = 
+    DefaultTransactionIsolation = 
+    InitialSize = 0
+    MaxActive = 20
+    MaxIdle = 20
+    MinIdle = 0
+    MaxWait = -1
+    ValidationQuery = 
+    TestOnBorrow = true
+    TestOnReturn = false
+    TestWhileIdle = false
+    TimeBetweenEvictionRunsMillis = -1
+    NumTestsPerEvictionRun = 3
+    MinEvictableIdleTimeMillis = 1800000
+    PoolPreparedStatements = false
+    MaxOpenPreparedStatements = 0
+    AccessToUnderlyingConnectionAllowed = false
+&lt;/Resource&gt;
+</code></pre>
+
+<h1>ActiveMQResourceAdapter <small>Resource </small></h1>
 
 <p>Declarable in openejb.xml via</p>
 
@@ -191,15 +844,35 @@ Supports the following properties
 &lt;/Resource&gt;
 </code></pre>
 
-<p>Declarable in properties via<div class="panel">}
-Foo = new://Resource?type=ActiveMQResourceAdapter<div class="panel">}
-Supports the following properties
-    || Property Name || Description ||</p>
+<p>Declarable in properties via</p>
+
+<pre><code>Foo = new://Resource?type=ActiveMQResourceAdapter
+</code></pre>
+
+<h2>Properties</h2>
+
+<h3>BrokerXmlConfig</h3>
+
+<p>Broker configuration</p>
+
+<h3>ServerUrl</h3>
 
-<p><div class="anchor">:Default JMS Connection Factory-resource}
-<a name="ContainersandResources-javax.jms.ConnectionFactory"></a></p>
+<p>Broker address</p>
 
-<h2>javax.jms.ConnectionFactory</h2>
+<h3>DataSource</h3>
+
+<p>DataSource for persistence messages</p>
+
+<h2>Default declaration</h2>
+
+<pre><code>&lt;Resource id="Default JMS Resource Adapter" type="ActiveMQResourceAdapter"&gt;
+    BrokerXmlConfig = broker:(tcp://localhost:61616)?useJmx=false
+    ServerUrl = vm://localhost?async=true
+    DataSource = Default Unmanaged JDBC Database
+&lt;/Resource&gt;
+</code></pre>
+
+<h1>javax.jms.ConnectionFactory <small>Resource </small></h1>
 
 <p>Declarable in openejb.xml via</p>
 
@@ -207,16 +880,51 @@ Supports the following properties
 &lt;/Resource&gt;
 </code></pre>
 
-<p>Declarable in properties via<div class="panel">}
-Foo = new://Resource?type=javax.jms.ConnectionFactory<div class="panel">}
-Supports the following properties
-    || Property Name || Description ||
-    | ResourceAdapter | Default value is <em>Default JMS Resource Adapter</em>.||</p>
+<p>Declarable in properties via</p>
+
+<pre><code>Foo = new://Resource?type=javax.jms.ConnectionFactory
+</code></pre>
+
+<h2>Properties</h2>
+
+<h3>ResourceAdapter</h3>
+
+<p>No description.</p>
+
+<h3>TransactionSupport</h3>
+
+<p>Specifies if the connection is enrolled in global transaction
+allowed values: xa, local or none</p>
+
+<h3>PoolMaxSize</h3>
+
+<p>Maximum number of physical connection to the ActiveMQ broker</p>
+
+<h3>PoolMinSize</h3>
 
-<p><div class="anchor">:Default Queue-resource}
-<a name="ContainersandResources-javax.jms.Queue"></a></p>
+<p>Minimum number of physical connection to the ActiveMQ broker</p>
 
-<h2>javax.jms.Queue</h2>
+<h3>ConnectionMaxWaitMilliseconds</h3>
+
+<p>Maximum amount of time to wait for a connection</p>
+
+<h3>ConnectionMaxIdleMinutes</h3>
+
+<p>Maximum amount of time a connection can be idle before being reclaimed</p>
+
+<h2>Default declaration</h2>
+
+<pre><code>&lt;Resource id="Default JMS Connection Factory" type="javax.jms.ConnectionFactory"&gt;
+    ResourceAdapter = Default JMS Resource Adapter
+    TransactionSupport = xa
+    PoolMaxSize = 10
+    PoolMinSize = 0
+    ConnectionMaxWaitMilliseconds = 5000
+    ConnectionMaxIdleMinutes = 15
+&lt;/Resource&gt;
+</code></pre>
+
+<h1>javax.jms.Queue <small>Resource </small></h1>
 
 <p>Declarable in openejb.xml via</p>
 
@@ -224,15 +932,25 @@ Supports the following properties
 &lt;/Resource&gt;
 </code></pre>
 
-<p>Declarable in properties via<div class="panel">}
-Foo = new://Resource?type=javax.jms.Queue<div class="panel">}
-Supports the following properties
-    || Property Name || Description ||
-    | destination | Specifies the name of the queue|
-<div class="anchor">:Default Topic-resource}
-<a name="ContainersandResources-javax.jms.Topic"></a></p>
+<p>Declarable in properties via</p>
+
+<pre><code>Foo = new://Resource?type=javax.jms.Queue
+</code></pre>
+
+<h2>Properties</h2>
+
+<h3>destination</h3>
+
+<p>Specifies the name of the queue</p>
+
+<h2>Default declaration</h2>
+
+<pre><code>&lt;Resource id="Default Queue" type="javax.jms.Queue"&gt;
+    destination = 
+&lt;/Resource&gt;
+</code></pre>
 
-<h2>javax.jms.Topic</h2>
+<h1>javax.jms.Topic <small>Resource </small></h1>
 
 <p>Declarable in openejb.xml via</p>
 
@@ -240,15 +958,25 @@ Supports the following properties
 &lt;/Resource&gt;
 </code></pre>
 
-<p>Declarable in properties via<div class="panel">}
-Foo = new://Resource?type=javax.jms.Topic<div class="panel">}
-Supports the following properties
-    || Property Name || Description ||
-    | destination | Specifies the name of the topic|
-<div class="anchor">:Default ORB-resource}
-<a name="ContainersandResources-org.omg.CORBA.ORB"></a></p>
+<p>Declarable in properties via</p>
+
+<pre><code>Foo = new://Resource?type=javax.jms.Topic
+</code></pre>
+
+<h2>Properties</h2>
+
+<h3>destination</h3>
+
+<p>Specifies the name of the topic</p>
+
+<h2>Default declaration</h2>
+
+<pre><code>&lt;Resource id="Default Topic" type="javax.jms.Topic"&gt;
+    destination = 
+&lt;/Resource&gt;
+</code></pre>
 
-<h2>org.omg.CORBA.ORB</h2>
+<h1>org.omg.CORBA.ORB <small>Resource </small></h1>
 
 <p>Declarable in openejb.xml via</p>
 
@@ -256,13 +984,14 @@ Supports the following properties
 &lt;/Resource&gt;
 </code></pre>
 
-<p>Declarable in properties via<div class="panel">}
-Foo = new://Resource?type=org.omg.CORBA.ORB<div class="panel">}
-No properties.
-<div class="anchor">:Default Mail Session-resource}
-<a name="ContainersandResources-javax.mail.Session"></a></p>
+<p>Declarable in properties via</p>
+
+<pre><code>Foo = new://Resource?type=org.omg.CORBA.ORB
+</code></pre>
+
+<p>No properties.</p>
 
-<h2>javax.mail.Session</h2>
+<h1>javax.mail.Session <small>Resource </small></h1>
 
 <p>Declarable in openejb.xml via</p>
 
@@ -270,9 +999,12 @@ No properties.
 &lt;/Resource&gt;
 </code></pre>
 
-<p>Declarable in properties via<div class="panel">}
-Foo = new://Resource?type=javax.mail.Session<div class="panel">}
-No properties.</p>
+<p>Declarable in properties via</p>
+
+<pre><code>Foo = new://Resource?type=javax.mail.Session
+</code></pre>
+
+<p>No properties.</p>
 
 
 



Mime
View raw message