You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tomee.apache.org by jl...@apache.org on 2018/12/06 08:52:54 UTC

[09/44] tomee git commit: TOMEE-2316 Convert Markdown files to Asciidoc in the docs folder - 5

http://git-wip-us.apache.org/repos/asf/tomee/blob/513cf17a/docs/jms-resources-and-mdb-container.adoc
----------------------------------------------------------------------
diff --git a/docs/jms-resources-and-mdb-container.adoc b/docs/jms-resources-and-mdb-container.adoc
new file mode 100644
index 0000000..9cf0e89
--- /dev/null
+++ b/docs/jms-resources-and-mdb-container.adoc
@@ -0,0 +1,356 @@
+# JMS Resources and MDB Container
+:index-group: Configuration
+:jbake-date: 2018-12-05
+:jbake-type: page
+:jbake-status: published
+
+
+== External ActiveMQ Broker
+
+....
+<tomee>
+    <Resource id="MyJmsResourceAdapter" type="ActiveMQResourceAdapter">
+        # Do not start the embedded ActiveMQ broker
+        BrokerXmlConfig  =
+        ServerUrl = tcp://someHostName:61616
+    </Resource>
+
+    <Resource id="MyJmsConnectionFactory" type="javax.jms.ConnectionFactory">
+        ResourceAdapter = MyJmsResourceAdapter
+    </Resource>
+
+    <Container id="MyJmsMdbContainer" ctype="MESSAGE">
+        ResourceAdapter = MyJmsResourceAdapter
+    </Container>
+
+    <Resource id="FooQueue" type="javax.jms.Queue"/>
+    <Resource id="BarTopic" type="javax.jms.Topic"/>
+</tomee>
+....
+
+The `ServerUrl` would be changed to point to the host and port of the
+ActiveMQ process. The various URL formats that ActiveMQ supports also
+work, such as 'failover:'.
+
+== Internal ActiveMQ Broker
+
+....
+<tomee>
+    <Resource id="MyJmsResourceAdapter" type="ActiveMQResourceAdapter">
+        BrokerXmlConfig =  broker:(tcp://someHostName:61616)
+        ServerUrl       =  tcp://someHostName:61616
+    </Resource>
+
+    <Resource id="MyJmsConnectionFactory" type="javax.jms.ConnectionFactory">
+        ResourceAdapter = MyJmsResourceAdapter
+    </Resource>
+
+    <Container id="MyJmsMdbContainer" ctype="MESSAGE">
+        ResourceAdapter = MyJmsResourceAdapter
+    </Container>
+
+    <Resource id="FooQueue" type="javax.jms.Queue"/>
+    <Resource id="BarTopic" type="javax.jms.Topic"/>
+</tomee>
+....
+
+The `BrokerXmlConfig` tells ActiveMQ to start on the tcp host/port
+`someHostName` and `61616`
+
+=== Internal ActiveMQ Broker with JDBC Persistence
+
+Adding the `DataSource` property to your `ActiveMQResourceAdapter`
+config will automatically setup JDBC Persistence using the
+`org.apache.activemq.store.jdbc.JDBCPersistenceAdapter`
+
+....
+<tomee>
+    <Resource id="MyJmsResourceAdapter" type="ActiveMQResourceAdapter">
+        BrokerXmlConfig =  broker:(tcp://someHostName:61616)
+        ServerUrl       =  tcp://someHostName:61616
+        DataSource      =  MyDataSource
+    </Resource>
+
+    <Resource id="MyDataSource" type="javax.sql.DataSource">
+        JdbcDriver  = org.hsqldb.jdbcDriver.
+        JdbcUrl     = jdbc:hsqldb:file:data/hsqldb/hsqldb.
+        UserName    = sa
+        Password    = foo
+    </Resource>
+</tomee>
+....
+
+=== Internal ActiveMQ Broker with activemq.xml
+
+The activemq.xml file format requires a number of Spring dependencies,
+and is therefore not included in the distribution by default. This is
+purley due to the fact that this ActiveMQ file format is parsed using
+Spring libraries and this is beyond our control. However, the advantage
+is opening up the door to the huge number of configuration options
+available found here: http://activemq.apache.org/xml-configuration.html.
+
+This support can be enabled by adding the right libraries and creating
+an link:activemq.xml[`[tomee]/conf/activemq.xml`] file (Click the link
+for a basic example).
+
+Add the following jars to the `tomee/lib/` directory:
+
+* http://repo1.maven.org/maven2/org/springframework/spring-beans/3.2.9.RELEASE/spring-beans-3.2.9.RELEASE.jar[spring-beans-3.2.9.RELEASE.jar]
+* http://repo1.maven.org/maven2/org/springframework/spring-context/3.2.9.RELEASE/spring-context-3.2.9.RELEASE.jar[spring-context-3.2.9.RELEASE.jar]
+* http://repo1.maven.org/maven2/org/springframework/spring-core/3.2.9.RELEASE/spring-core-3.2.9.RELEASE.jar[spring-core-3.2.9.RELEASE.jar]
+* http://repo1.maven.org/maven2/org/springframework/spring-web/3.2.9.RELEASE/spring-web-3.2.9.RELEASE.jar[spring-web-3.2.9.RELEASE.jar]
+* http://repo1.maven.org/maven2/org/apache/xbean/xbean-spring/3.2.9.RELEASE/xbean-spring-3.9.jar[xbean-spring-3.9.jar]
+
+Later versions should work, but have not been tested.
+
+Create an link:activemq.xml[activemq.xml file] a in
+`[tomee]/conf/activemq.xml`.
+
+Then use the `xbean:file:` url prefix in the `BrokerXmlConfig` as shown
+belog.
+
+....
+<tomee>
+    <Resource id="MyJmsResourceAdapter" type="ActiveMQResourceAdapter">
+        BrokerXmlConfig =  xbean:file:conf/activemq.xml
+        ServerUrl       =  tcp://someHostName:61616
+    </Resource>
+
+    <Resource id="MyJmsConnectionFactory" type="javax.jms.ConnectionFactory">
+        ResourceAdapter = MyJmsResourceAdapter
+    </Resource>
+
+    <Container id="MyJmsMdbContainer" ctype="MESSAGE">
+        ResourceAdapter = MyJmsResourceAdapter
+    </Container>
+
+    <Resource id="FooQueue" type="javax.jms.Queue"/>
+    <Resource id="BarTopic" type="javax.jms.Topic"/>
+</tomee>
+....
+
+Finally, restart the server.
+
+== Configuration via System properties
+
+The same can be done via properties in an embedded configuration, via
+the `conf/system.properties` file or on the command line via `-D` flags.
+
+....
+Properties p = new Properties();
+p.put(Context.INITIAL_CONTEXT_FACTORY, LocalInitialContextFactory.class.getName());
+
+p.put("MyJmsResourceAdapter", "new://Resource?type=ActiveMQResourceAdapter");
+p.put("MyJmsResourceAdapter.ServerUrl", "tcp://someHostName:61616");
+p.put("MyJmsResourceAdapter.BrokerXmlConfig", "");
+
+p.put("MyJmsConnectionFactory", "new://Resource?type=javax.jms.ConnectionFactory");
+p.put("MyJmsConnectionFactory.ResourceAdapter", "MyJmsResourceAdapter");
+
+p.put("MyJmsMdbContainer", "new://Container?type=MESSAGE");
+p.put("MyJmsMdbContainer.ResourceAdapter", "MyJmsResourceAdapter");
+
+p.put("FooQueue", "new://Resource?type=javax.jms.Queue");
+p.put("BarTopic", "new://Resource?type=javax.jms.Topic");
+
+InitialContext context = new InitialContext(p);
+....
+
+== Global lookup of JMS Resources
+
+From anywhere in the same VM as the EJB Container you could lookup the
+above resources like so:
+
+....
+javax.jms.ConnectionFactory cf = (ConnectionFactory)
+        context.lookup("openejb:Resource/MyJmsConnectionFactory");
+
+javax.jms.Queue queue = (Queue) context.lookup("openejb:Resource/FooQueue");
+javax.jms.Topic topic = (Topic) context.lookup("openejb:Resource/BarTopic");
+....
+
+== MDB ActivationConfig
+
+Here, the value for `destination` is the physical name of the desired
+destination. The value for `destinationType` is the class name that
+defines the type of destination. It should be `javax.jms.Queue` or
+`javax.jms.Topic`.
+
+The Activation Spec properties that can be configured are:
+
+Property Name
+
+Required
+
+Default Value
+
+Description
+
+acknowledgeMode
+
+no
+
+Auto-acknowledge
+
+The JMS Acknowledgement mode to use. Valid values are: Auto-acknowledge
+or Dups-ok-acknowledge
+
+clientId
+
+no
+
+set in resource adapter
+
+The JMS Client ID to use (only really required for durable topics)
+
+destinationType
+
+yes
+
+null
+
+The type of destination; a queue or topic
+
+destination
+
+yes
+
+null
+
+The destination name (queue or topic name)
+
+enableBatch
+
+no
+
+false
+
+Used to enable transaction batching for increased performance
+
+maxMessagesPerBatch
+
+no
+
+10
+
+The number of messages per transaction batch
+
+maxMessagesPerSessions
+
+no
+
+10
+
+This is actually the prefetch size for the subscription. (Yes, badly
+named).
+
+maxSessions
+
+no
+
+10
+
+The maximum number of concurrent sessions to use
+
+messageSelector
+
+no
+
+null
+
+Message Selector to use on the subscription to perform content based
+routing filtering the messages
+
+noLocal
+
+no
+
+false
+
+Only required for topic subscriptions; indicates if locally published
+messages should be included in the subscription or not
+
+password
+
+no
+
+set in resource adapter
+
+The password for the JMS connection
+
+subscriptionDurability
+
+no
+
+NonDurable
+
+Whether or not a durable (topic) subscription is required. Valid values
+are: Durable or NonDurable
+
+subscriptionName
+
+no
+
+null
+
+The name of the durable subscriber. Only used for durable topics and
+combined with the clientID to uniquely identify the durable topic
+subscription
+
+userName
+
+no
+
+set in resource adapter
+
+The user for the JMS connection
+
+useRAManagedTransaction
+
+no
+
+false
+
+Typically, a resource adapter delivers messages to an endpoint which is
+managed by a container. Normally, this container likes to be the one
+that wants to control the transaction that the inbound message is being
+delivered on. But sometimes, you want to deliver to a simpler container
+system that will not be controlling the inbound transaction. In these
+cases, if you set useRAManagedTransaction to true, the resource adapter
+will commit the transaction if no exception was generated from the
+MessageListener and rollback if an exception is thrown.
+
+initialRedeliveryDelay
+
+no
+
+1000
+
+The delay before redeliveries start. Also configurable on the
+ResourceAdapter
+
+maximumRedeliveries
+
+no
+
+5
+
+The maximum number of redeliveries or -1 for no maximum. Also
+configurable on the ResourceAdapter
+
+redeliveryBackOffMultiplier
+
+no
+
+5
+
+The multiplier to use if exponential back off is enabled. Also
+configurable on the ResourceAdapter
+
+redeliveryUseExponentialBackOff
+
+no
+
+false
+
+To enable exponential backoff. Also configurable on the ResourceAdapter

http://git-wip-us.apache.org/repos/asf/tomee/blob/513cf17a/docs/jms-resources-and-mdb-container.md
----------------------------------------------------------------------
diff --git a/docs/jms-resources-and-mdb-container.md b/docs/jms-resources-and-mdb-container.md
deleted file mode 100644
index bcb365d..0000000
--- a/docs/jms-resources-and-mdb-container.md
+++ /dev/null
@@ -1,283 +0,0 @@
-index-group=Configuration
-type=page
-status=published
-title=JMS Resources and MDB Container
-~~~~~~
-
-# External ActiveMQ Broker
-
-    <tomee>
-        <Resource id="MyJmsResourceAdapter" type="ActiveMQResourceAdapter">
-            # Do not start the embedded ActiveMQ broker
-            BrokerXmlConfig  =
-            ServerUrl = tcp://someHostName:61616
-        </Resource>
-
-        <Resource id="MyJmsConnectionFactory" type="javax.jms.ConnectionFactory">
-            ResourceAdapter = MyJmsResourceAdapter
-        </Resource>
-
-        <Container id="MyJmsMdbContainer" ctype="MESSAGE">
-            ResourceAdapter = MyJmsResourceAdapter
-        </Container>
-
-        <Resource id="FooQueue" type="javax.jms.Queue"/>
-        <Resource id="BarTopic" type="javax.jms.Topic"/>
-    </tomee>
-
-    
-The `ServerUrl` would be changed to point to the host and port of the
-ActiveMQ process.  The various URL formats that ActiveMQ supports also
-work, such as 'failover:'.
-
-# Internal ActiveMQ Broker
-    
-    <tomee>
-        <Resource id="MyJmsResourceAdapter" type="ActiveMQResourceAdapter">
-            BrokerXmlConfig =  broker:(tcp://someHostName:61616)
-            ServerUrl       =  tcp://someHostName:61616
-        </Resource>
-
-        <Resource id="MyJmsConnectionFactory" type="javax.jms.ConnectionFactory">
-            ResourceAdapter = MyJmsResourceAdapter
-        </Resource>
-
-        <Container id="MyJmsMdbContainer" ctype="MESSAGE">
-            ResourceAdapter = MyJmsResourceAdapter
-        </Container>
-
-        <Resource id="FooQueue" type="javax.jms.Queue"/>
-        <Resource id="BarTopic" type="javax.jms.Topic"/>
-    </tomee>
-
-The `BrokerXmlConfig` tells ActiveMQ to start on the tcp host/port `someHostName` and `61616`
-
-## Internal ActiveMQ Broker with JDBC Persistence
-
-Adding the `DataSource` property to your `ActiveMQResourceAdapter` config will automatically setup JDBC Persistence using the
-`org.apache.activemq.store.jdbc.JDBCPersistenceAdapter`
-
-    <tomee>
-        <Resource id="MyJmsResourceAdapter" type="ActiveMQResourceAdapter">
-            BrokerXmlConfig =  broker:(tcp://someHostName:61616)
-            ServerUrl       =  tcp://someHostName:61616
-            DataSource      =  MyDataSource
-        </Resource>
-
-        <Resource id="MyDataSource" type="javax.sql.DataSource">
-            JdbcDriver  = org.hsqldb.jdbcDriver.
-            JdbcUrl	    = jdbc:hsqldb:file:data/hsqldb/hsqldb.
-            UserName    = sa
-            Password    = foo
-        </Resource>
-    </tomee>
-
-
-
-## Internal ActiveMQ Broker with activemq.xml
-
-The [activemq.xml](activemq.xml) file format requires a number of Spring dependencies, and is therefore not included in the distribution by default. This is purley due to the fact that this ActiveMQ file format is parsed using Spring libraries and this is beyond our control. However, the advantage is opening up the door to the huge number of configuration options available found here: [http://activemq.apache.org/xml-configuration.html](http://activemq.apache.org/xml-configuration.html).
-
-This support can be enabled by adding the right libraries and creating an [`[tomee]/conf/activemq.xml`](activemq.xml) file (Click the link for a basic example).
-
-Add the following jars to the `tomee/lib/` directory:
-
-- [spring-beans-3.2.9.RELEASE.jar](http://repo1.maven.org/maven2/org/springframework/spring-beans/3.2.9.RELEASE/spring-beans-3.2.9.RELEASE.jar)
-- [spring-context-3.2.9.RELEASE.jar](http://repo1.maven.org/maven2/org/springframework/spring-context/3.2.9.RELEASE/spring-context-3.2.9.RELEASE.jar)
-- [spring-core-3.2.9.RELEASE.jar](http://repo1.maven.org/maven2/org/springframework/spring-core/3.2.9.RELEASE/spring-core-3.2.9.RELEASE.jar)
-- [spring-web-3.2.9.RELEASE.jar](http://repo1.maven.org/maven2/org/springframework/spring-web/3.2.9.RELEASE/spring-web-3.2.9.RELEASE.jar)
-- [xbean-spring-3.9.jar](http://repo1.maven.org/maven2/org/apache/xbean/xbean-spring/3.2.9.RELEASE/xbean-spring-3.9.jar)
-
-Later versions should work, but have not been tested.
-
-Create an [activemq.xml file](activemq.xml) a in `[tomee]/conf/activemq.xml`.
-
-Then use the `xbean:file:` url prefix in the `BrokerXmlConfig` as shown belog.
-
-
-    <tomee>
-        <Resource id="MyJmsResourceAdapter" type="ActiveMQResourceAdapter">
-            BrokerXmlConfig =  xbean:file:conf/activemq.xml
-            ServerUrl       =  tcp://someHostName:61616
-        </Resource>
-
-        <Resource id="MyJmsConnectionFactory" type="javax.jms.ConnectionFactory">
-            ResourceAdapter = MyJmsResourceAdapter
-        </Resource>
-
-        <Container id="MyJmsMdbContainer" ctype="MESSAGE">
-            ResourceAdapter = MyJmsResourceAdapter
-        </Container>
-
-        <Resource id="FooQueue" type="javax.jms.Queue"/>
-        <Resource id="BarTopic" type="javax.jms.Topic"/>
-    </tomee>
-
-Finally, restart the server.
-
-
-# Configuration via System properties
-
-The same can be done via properties in an embedded configuration, via the
-`conf/system.properties` file or on the command line via `-D` flags.
-
-
-    Properties p = new Properties();
-    p.put(Context.INITIAL_CONTEXT_FACTORY, LocalInitialContextFactory.class.getName());
-
-    p.put("MyJmsResourceAdapter", "new://Resource?type=ActiveMQResourceAdapter");
-    p.put("MyJmsResourceAdapter.ServerUrl", "tcp://someHostName:61616");
-    p.put("MyJmsResourceAdapter.BrokerXmlConfig", "");
-
-    p.put("MyJmsConnectionFactory", "new://Resource?type=javax.jms.ConnectionFactory");
-    p.put("MyJmsConnectionFactory.ResourceAdapter", "MyJmsResourceAdapter");
-
-    p.put("MyJmsMdbContainer", "new://Container?type=MESSAGE");
-    p.put("MyJmsMdbContainer.ResourceAdapter", "MyJmsResourceAdapter");
-
-    p.put("FooQueue", "new://Resource?type=javax.jms.Queue");
-    p.put("BarTopic", "new://Resource?type=javax.jms.Topic");
-
-    InitialContext context = new InitialContext(p);
-
-# Global lookup of JMS Resources
-
-From anywhere in the same VM as the EJB Container you could lookup the
-above resources like so:
-
-    javax.jms.ConnectionFactory cf = (ConnectionFactory)
-            context.lookup("openejb:Resource/MyJmsConnectionFactory");
-
-    javax.jms.Queue queue = (Queue) context.lookup("openejb:Resource/FooQueue");
-    javax.jms.Topic topic = (Topic) context.lookup("openejb:Resource/BarTopic");
-
-# MDB ActivationConfig
-
-
-Here, the value for `destination` is the physical name of the desired destination. The value for
-`destinationType` is the class name that defines the type of destination. It should be `javax.jms.Queue` or `javax.jms.Topic`.
-
-The Activation Spec properties that can be configured are:
-
-<TABLE><TBODY>
-<TR>
-<TH> Property Name </TH>
-<TH> Required </TH>
-<TH> Default Value </TH>
-<TH> Description </TH>
-</TR>
-<TR>
-<TD> acknowledgeMode </TD>
-<TD> no </TD>
-<TD> Auto-acknowledge </TD>
-<TD> The JMS Acknowledgement mode to use. Valid values are: Auto-acknowledge or Dups-ok-acknowledge </TD>
-</TR>
-<TR>
-<TD> clientId </TD>
-<TD> no </TD>
-<TD> set in resource adapter </TD>
-<TD> The JMS Client ID to use (only really required for durable topics) </TD>
-</TR>
-<TR>
-<TD> destinationType </TD>
-<TD> yes </TD>
-<TD> null </TD>
-<TD> The type of destination; a queue or topic </TD>
-</TR>
-<TR>
-<TD> destination </TD>
-<TD> yes </TD>
-<TD> null </TD>
-<TD> The destination name (queue or topic name) </TD>
-</TR>
-<TR>
-<TD> enableBatch </TD>
-<TD> no </TD>
-<TD> false </TD>
-<TD> Used to enable transaction batching for increased performance </TD>
-</TR>
-<TR>
-<TD> maxMessagesPerBatch </TD>
-<TD> no </TD>
-<TD> 10 </TD>
-<TD> The number of messages per transaction batch </TD>
-</TR>
-<TR>
-<TD> maxMessagesPerSessions </TD>
-<TD> no </TD>
-<TD> 10 </TD>
-<TD> This is actually the prefetch size for the subscription.  (Yes, badly named). </TD>
-</TR>
-<TR>
-<TD> maxSessions </TD>
-<TD> no </TD>
-<TD> 10 </TD>
-<TD> The maximum number of concurrent sessions to use </TD>
-</TR>
-<TR>
-<TD> messageSelector </TD>
-<TD> no </TD>
-<TD> null </TD>
-<TD>Message Selector</A> to use on the subscription to perform content based routing filtering the messages </TD>
-</TR>
-<TR>
-<TD> noLocal </TD>
-<TD> no </TD>
-<TD> false </TD>
-<TD> Only required for topic subscriptions; indicates if locally published messages should be included in the subscription or not </TD>
-</TR>
-<TR>
-<TD> password </TD>
-<TD> no </TD>
-<TD> set in resource adapter </TD>
-<TD> The password for the JMS connection </TD>
-</TR>
-<TR>
-<TD> subscriptionDurability </TD>
-<TD> no </TD>
-<TD> NonDurable </TD>
-<TD> Whether or not a durable (topic) subscription is required. Valid values are: Durable or NonDurable </TD>
-</TR>
-<TR>
-<TD> subscriptionName </TD>
-<TD> no </TD>
-<TD> null </TD>
-<TD> The name of the durable subscriber. Only used for durable topics and combined with the clientID to uniquely identify the durable topic subscription </TD>
-</TR>
-<TR>
-<TD> userName </TD>
-<TD> no </TD>
-<TD> set in resource adapter </TD>
-<TD> The user for the JMS connection </TD>
-</TR>
-<TR>
-<TD> useRAManagedTransaction </TD>
-<TD> no </TD>
-<TD> false </TD>
-<TD> Typically, a resource adapter delivers messages to an endpoint which is managed by a container.  Normally, this container likes to be the one that wants to control the transaction that the inbound message is being delivered on.  But sometimes, you want to deliver to a simpler container system that will not be controlling the inbound transaction.  In these cases, if you set useRAManagedTransaction to true, the resource adapter will commit the transaction if no exception was generated from the MessageListener and rollback if an exception is thrown. </TD>
-</TR>
-<TR>
-<TD> initialRedeliveryDelay </TD>
-<TD> no </TD>
-<TD> 1000 </TD>
-<TD> The delay before redeliveries start.  Also configurable on the ResourceAdapter </TD>
-</TR>
-<TR>
-<TD> maximumRedeliveries </TD>
-<TD> no </TD>
-<TD> 5 </TD>
-<TD> The maximum number of redeliveries or -1 for no maximum. Also configurable on the ResourceAdapter </TD>
-</TR>
-<TR>
-<TD> redeliveryBackOffMultiplier </TD>
-<TD> no </TD>
-<TD> 5 </TD>
-<TD> The multiplier to use if exponential back off is enabled. Also configurable on the ResourceAdapter </TD>
-</TR>
-<TR>
-<TD> redeliveryUseExponentialBackOff </TD>
-<TD> no </TD>
-<TD> false </TD>
-<TD> To enable exponential backoff. Also configurable on the ResourceAdapter </TD>
-</TR>
-</TBODY></TABLE>

http://git-wip-us.apache.org/repos/asf/tomee/blob/513cf17a/docs/jmsconnectionfactory-config.adoc
----------------------------------------------------------------------
diff --git a/docs/jmsconnectionfactory-config.adoc b/docs/jmsconnectionfactory-config.adoc
new file mode 100644
index 0000000..c0327e5
--- /dev/null
+++ b/docs/jmsconnectionfactory-config.adoc
@@ -0,0 +1,102 @@
+# JmsConnectionFactory Configuration
+:index-group: Unrevised
+:jbake-date: 2018-12-05
+:jbake-type: page
+:jbake-status: published
+
+
+A JmsConnectionFactory can be declared via xml in the
+`<tomee-home>/conf/tomee.xml` file or in a `WEB-INF/resources.xml` file
+using a declaration like the following. All properties in the element
+body are optional.
+
+....
+<Resource id="myJmsConnectionFactory" type="javax.jms.ConnectionFactory">
+    connectionMaxIdleTime = 15 Minutes
+    connectionMaxWaitTime = 5 seconds
+    poolMaxSize = 10
+    poolMinSize = 0
+    resourceAdapter = Default JMS Resource Adapter
+    transactionSupport = xa
+</Resource>
+....
+
+Alternatively, a JmsConnectionFactory can be declared via properties in
+the `<tomee-home>/conf/system.properties` file or via Java
+VirtualMachine `-D` properties. The properties can also be used when
+embedding TomEE via the `javax.ejb.embeddable.EJBContainer` API or
+`InitialContext`
+
+....
+myJmsConnectionFactory = new://Resource?type=javax.jms.ConnectionFactory
+myJmsConnectionFactory.connectionMaxIdleTime = 15 Minutes
+myJmsConnectionFactory.connectionMaxWaitTime = 5 seconds
+myJmsConnectionFactory.poolMaxSize = 10
+myJmsConnectionFactory.poolMinSize = 0
+myJmsConnectionFactory.resourceAdapter = Default JMS Resource Adapter
+myJmsConnectionFactory.transactionSupport = xa
+....
+
+Properties and xml can be mixed. Properties will override the xml
+allowing for easy configuration change without the need for $\{} style
+variable substitution. Properties are not case sensitive. If a property
+is specified that is not supported by the declared JmsConnectionFactory
+a warning will be logged. If a JmsConnectionFactory is needed by the
+application and one is not declared, TomEE will create one dynamically
+using default settings. Multiple JmsConnectionFactory declarations are
+allowed. # Supported Properties
+
+Property
+
+Type
+
+Default
+
+Description
+
+connectionMaxIdleTime
+
+time
+
+15 Minutes
+
+Maximum amount of time a connection can be idle before being reclaimed
+
+connectionMaxWaitTime
+
+time
+
+5 seconds
+
+Maximum amount of time to wait for a connection
+
+poolMaxSize
+
+int
+
+10
+
+Maximum number of physical connection to the ActiveMQ broker
+
+poolMinSize
+
+int
+
+0
+
+Minimum number of physical connection to the ActiveMQ broker
+
+resourceAdapter
+
+String
+
+Default JMS Resource Adapter
+
+transactionSupport
+
+String
+
+xa
+
+Specifies if the connection is enrolled in global transaction allowed
+values: xa, local or none

http://git-wip-us.apache.org/repos/asf/tomee/blob/513cf17a/docs/jmsconnectionfactory-config.md
----------------------------------------------------------------------
diff --git a/docs/jmsconnectionfactory-config.md b/docs/jmsconnectionfactory-config.md
deleted file mode 100644
index 4a43833..0000000
--- a/docs/jmsconnectionfactory-config.md
+++ /dev/null
@@ -1,87 +0,0 @@
-index-group=Unrevised
-type=page
-status=published
-title=JmsConnectionFactory Configuration
-~~~~~~
-
-
-A JmsConnectionFactory can be declared via xml in the `<tomee-home>/conf/tomee.xml` file or in a `WEB-INF/resources.xml` file using a declaration like the following.  All properties in the element body are optional.
-
-    <Resource id="myJmsConnectionFactory" type="javax.jms.ConnectionFactory">
-        connectionMaxIdleTime = 15 Minutes
-        connectionMaxWaitTime = 5 seconds
-        poolMaxSize = 10
-        poolMinSize = 0
-        resourceAdapter = Default JMS Resource Adapter
-        transactionSupport = xa
-    </Resource>
-
-Alternatively, a JmsConnectionFactory can be declared via properties in the `<tomee-home>/conf/system.properties` file or via Java VirtualMachine `-D` properties.  The properties can also be used when embedding TomEE via the `javax.ejb.embeddable.EJBContainer` API or `InitialContext`
-
-    myJmsConnectionFactory = new://Resource?type=javax.jms.ConnectionFactory
-    myJmsConnectionFactory.connectionMaxIdleTime = 15 Minutes
-    myJmsConnectionFactory.connectionMaxWaitTime = 5 seconds
-    myJmsConnectionFactory.poolMaxSize = 10
-    myJmsConnectionFactory.poolMinSize = 0
-    myJmsConnectionFactory.resourceAdapter = Default JMS Resource Adapter
-    myJmsConnectionFactory.transactionSupport = xa
-
-Properties and xml can be mixed.  Properties will override the xml allowing for easy configuration change without the need for ${} style variable substitution.  Properties are not case sensitive.  If a property is specified that is not supported by the declared JmsConnectionFactory a warning will be logged.  If a JmsConnectionFactory is needed by the application and one is not declared, TomEE will create one dynamically using default settings.  Multiple JmsConnectionFactory declarations are allowed.
-# Supported Properties
-<table class="mdtable">
-<tr>
-<th>Property</th>
-<th>Type</th>
-<th>Default</th>
-<th>Description</th>
-</tr>
-<tr>
-  <td>connectionMaxIdleTime</td>
-  <td><a href="configuring-durations.html">time</a></td>
-  <td>15&nbsp;Minutes</td>
-  <td>
-Maximum amount of time a connection can be idle before being reclaimed
-</td>
-</tr>
-<tr>
-  <td>connectionMaxWaitTime</td>
-  <td><a href="configuring-durations.html">time</a></td>
-  <td>5&nbsp;seconds</td>
-  <td>
-Maximum amount of time to wait for a connection
-</td>
-</tr>
-<tr>
-  <td>poolMaxSize</td>
-  <td>int</td>
-  <td>10</td>
-  <td>
-Maximum number of physical connection to the ActiveMQ broker
-</td>
-</tr>
-<tr>
-  <td>poolMinSize</td>
-  <td>int</td>
-  <td>0</td>
-  <td>
-Minimum number of physical connection to the ActiveMQ broker
-</td>
-</tr>
-<tr>
-  <td>resourceAdapter</td>
-  <td>String</td>
-  <td>Default&nbsp;JMS&nbsp;Resource&nbsp;Adapter</td>
-  <td>
-
-</td>
-</tr>
-<tr>
-  <td>transactionSupport</td>
-  <td>String</td>
-  <td>xa</td>
-  <td>
-Specifies if the connection is enrolled in global transaction
-allowed values: xa, local or none
-</td>
-</tr>
-</table>

http://git-wip-us.apache.org/repos/asf/tomee/blob/513cf17a/docs/jndi-names.adoc
----------------------------------------------------------------------
diff --git a/docs/jndi-names.adoc b/docs/jndi-names.adoc
new file mode 100644
index 0000000..916c3de
--- /dev/null
+++ b/docs/jndi-names.adoc
@@ -0,0 +1,390 @@
+# JNDI Names
+:index-group: Configuration
+:jbake-date: 2018-12-05
+:jbake-type: page
+:jbake-status: published
+
+
+# What's My Bean's JNDI Name? There are two things to keep in mind
+before you start reading:
+
+1 OpenEJB provides a default JNDI name to your EJB. +
+2 You can customize the JNDI name.
+
+== Default JNDI name The default JNDI name is in the following format:
+
+....
+{deploymentId}{interfaceType.annotationName}
+....
+
+Lets try and understand the above format. Both _deploymentId_ and
+_interfaceType.annotationName_ are pre-defined variables. There are
+other pre-defined variables available which you could use to customize
+the JNDI name format.
+
+# JNDI Name Formatting
+
+The _openejb.jndiname.format_ property allows you to supply a template
+for the global JNDI names of all your EJBs. With it, you have complete
+control over the structure of the JNDI layout can institute a design
+pattern just right for your client apps. See the
+link:service-locator.html[Service Locator] doc for clever ways to use
+the JNDI name formatting functionality in client code.
+
+variable
+
+description
+
+moduleId
+
+Typically the name of the ejb-jar file or the id value if specified
+
+ejbType
+
+STATEFUL, STATELESS, BMP_ENTITY, CMP_ENTITY, or MESSAGE_DRIVEN
+
+ejbClass
+
+for a class named org.acme.superfun.WidgetBean results in
+org.acme.superfun.WidgetBean
+
+ejbClass.simpleName
+
+for a class named org.acme.superfun.WidgetBean results in WidgetBean
+
+ejbClass.packageName
+
+for a class named org.acme.superfun.WidgetBean results in
+org.acme.superfun
+
+ejbName
+
+The ejb-name as specified in xml or via the 'name' attribute in an
+@Stateful, @Stateless, or @MessageDriven annotation
+
+deploymentId
+
+The unique system id for the ejb. Typically the ejbName unless specified
+in the openejb-jar.xml or via changing the openejb.deploymentId.format
+
+interfaceType
+
+see interfaceType.annotationName
+
+interfaceType.annotationName
+
+Following the EJB 3 annotations @RemoteHome, @LocalHome, @Remote and
+@Local RemoteHome (EJB 2 EJBHome) LocalHome (EJB 2 EJBLocalHome) Remote
+(EJB 3 Business Remote) Local (EJB 3 Business Local) Endpoint (EJB
+webservice endpoint)
+
+interfaceType.annotationNameLC
+
+This is the same as interfaceType.annotationName, but all in lower case.
+
+interfaceType.xmlName
+
+Following the ejb-jar.xml descriptor elements , , , , and : home (EJB 2
+EJBHome) local-home (EJB 2 EJBLocalHome) business-remote (EJB 3 Business
+Remote) business-local (EJB 3 Business Local) service-endpoint (EJB
+webservice endpoint)
+
+interfaceType.xmlNameCc
+
+Camel-case version of interfaceType.xmlName: Home (EJB 2 EJBHome)
+LocalHome (EJB 2 EJBLocalHome) BusinessRemote (EJB 3 Business Remote)
+BusinessLocal (EJB 3 Business Local) ServiceEndpoint (EJB webservice
+endpoint)
+
+interfaceType.openejbLegacyName
+
+Following the OpenEJB 1.0 hard-coded format: (empty string) (EJB 2
+EJBHome) Local (EJB 2 EJBLocalHome) BusinessRemote (EJB 3 Business
+Remote) BusinessLocal (EJB 3 Business Local) ServiceEndpoint (EJB
+webservice endpoint)
+
+interfaceClass
+
+(business) for a class named org.acme.superfun.WidgetRemote results in
+org.acme.superfun.WidgetRemote (home) for a class named
+org.acme.superfun.WidgetHome results in org.acme.superfun.WidgetHome
+
+interfaceClass.simpleName
+
+(business) for a class named org.acme.superfun.WidgetRemote results in
+WidgetRemote (home) for a class named org.acme.superfun.WidgetHome
+results in WidgetHome
+
+interfaceClass.packageName
+
+for a class named org.acme.superfun.WidgetRemote results in
+org.acme.superfun
+
+# Setting the JNDI name
+
+It's possible to set the desired jndi name format for the whole server
+level, an ejb-jar, an ejb, an ejb's "local" interface
+(local/remote/local-home/home), and for an individual interface the ejb
+implements. More specific jndi name formats act as an override to any
+more general formats. The most specific format dictates the jndi name
+that will be used for any given interface of an ejb. It's possible to
+specify a general format for your server, override it at an ejb level
+and override that further for a specific interface of that ejb.
+
+== Via System property
+
+The jndi name format can be set on a server level via a _system
+property_, for example:
+
+....
+$ ./bin/openejb start
+-Dopenejb.jndiname.format=\{ejbName}/\{interfaceClass}"
+....
+
+As usual, other ways of specifying system properties are via the
+conf/system.properties file in a standalone server, or via the
+InitialContext properties when embedded.
+
+== Via properties in the openejb-jar.xml
+
+It's possible to set the openejb.jndiname.format for an ejb-jar jar in a
+META-INF/openejb-jar.xml file as follows:
+
+....
+<openejb-jar>
+  <properties>
+     openejb.deploymentId.format = {ejbName}
+     openejb.jndiname.format = {deploymentId}{interfaceType.annotationName}
+  </properties>
+</openejb-jar>
+....
+
+== Via the tag for a specific ejb
+
+The following sets the name specifically for the interface
+org.superbiz.Foo.
+
+....
+<openejb-jar>
+  <ejb-deployment ejb-name="FooBean">
+    <jndi name="foo" interface="org.superbiz.Foo"/>  
+  </ejb-deployment>
+</openejb-jar>
+....
+
+Or more generally...
+
+....
+<openejb-jar>
+  <ejb-deployment ejb-name="FooBean">
+    <jndi name="foo" interface="Remote"/> 
+  </ejb-deployment>
+</openejb-jar>
+....
+
+Or more generally still...
+
+....
+<openejb-jar>
+  <ejb-deployment ejb-name="FooBean">
+    <jndi name="foo"/> 
+  </ejb-deployment>
+</openejb-jar>
+....
+
+The 'name' attribute can still use templates if it likes, such as:
+
+....
+<openejb-jar>
+  <ejb-deployment ejb-name="FooBean">
+    <jndi name="ejb/{interfaceClass.simpleName}" interface="org.superbiz.Foo"/> 
+  </ejb-deployment>
+</openejb-jar>
+....
+
+=== Multiple tags
+
+Multiple tags are allowed making it possible for you to be as specific
+as you need about the jndi name of each interface or each logical group
+of iterfaces (Local, Remote, LocalHome, RemoteHome).
+
+Given an ejb, FooBean, with the following interfaces: - business-local:
+org.superbiz.LocalOne - business-local: org.superbiz.LocalTwo -
+business-remote: org.superbiz.RemoteOne - business-remote:
+org.superbiz.RemoteTwo - home: org.superbiz.FooHome - local-home:
+org.superbiz.FooLocalHome
+
+The following four examples would yield the same jndi names. The
+intention with these examples is to show the various ways you can
+isolate specific interfaces or types of interfaces to gain more specific
+control on how they are named.
+
+....
+<openejb-jar>
+  <ejb-deployment ejb-name="FooBean">
+    <jndi name="LocalOne" interface="org.superbiz.LocalOne"/>
+    <jndi name="LocalTwo" interface="org.superbiz.LocalTwo"/>
+    <jndi name="RemoteOne" interface="org.superbiz.RemoteOne"/>
+    <jndi name="RemoteTwo" interface="org.superbiz.RemoteTwo"/>
+    <jndi name="FooHome" interface="org.superbiz.FooHome"/>
+    <jndi name="FooLocalHome" interface="org.superbiz.FooLocalHome"/>
+  </ejb-deployment>
+</openejb-jar>
+....
+
+Or
+
+....
+<openejb-jar>
+  <ejb-deployment ejb-name="FooBean">
+    <!-- applies to LocalOne and LocalTwo -->
+    <jndi name="{interfaceClass.simpleName}" interface="Local"/> 
+
+    <!-- applies to RemoteOne and RemoteTwo -->
+    <jndi name="{interfaceClass.simpleName}" interface="Remote"/> 
+
+    <!-- applies to FooHome -->
+    <jndi name="{interfaceClass.simpleName}" interface="RemoteHome"/> 
+
+    <!-- applies to FooLocalHome -->
+    <jndi name="{interfaceClass.simpleName}" interface="LocalHome"/> 
+  </ejb-deployment>
+</openejb-jar>
+....
+
+Or
+
+....
+<openejb-jar>
+  <ejb-deployment ejb-name="FooBean">
+    <!-- applies to RemoteOne, RemoteTwo, FooHome, and FooLocalHome -->
+    <jndi name="{interfaceClass.simpleName}"/>
+
+    <!-- these two would count as an override on the above format -->
+    <jndi name="LocalOne" interface="org.superbiz.LocalOne"/>
+    <jndi name="LocalTwo" interface="org.superbiz.LocalTwo"/>
+  </ejb-deployment>
+</openejb-jar>
+....
+
+or
+
+....
+<openejb-jar>
+  <ejb-deployment ejb-name="FooBean">
+    <!-- applies to LocalOne, LocalTwo, RemoteOne, RemoteTwo, FooHome, and FooLocalHome -->
+    <jndi name="{interfaceClass.simpleName}"/> 
+  </ejb-deployment>
+</openejb-jar>
+....
+
+# Changing the Default Setting
+
+_You are responsible for ensuring the names don't conflict._
+
+=== Conservative settings
+
+A very conservative setting such as
+
+"\{deploymentId}/\{interfaceClass}"
+
+would guarantee that each and every single interface is bound to JNDI.
+If your bean had a legacy EJBObject interface, three business remote
+interfaces, and two business local interfaces, this pattern would result
+in +
+_six_ proxies bound into JNDI. +
+
+Bordeline optimistic: +
+
+The above two settings would work if you the interface wasn't shared by
+other beans.
+
+=== Pragmatic settings
+
+A more middle ground setting such as
+"\{deploymentId}/\{interfaceType.annotationName}" would guarantee that
+at least one proxy of each interface type is bound to JNDI. If your bean
+had a legacy EJBObject interface, three business remote interfaces, and
+two business local interfaces, this pattern would result in _three_
+proxies bound into JNDI: one proxy dedicated to your EJBObject
+interface; one proxy implementing all three business remote interfaces;
+one proxy implementing the two business local interfaces.
+
+Similarly pragmatic settings would be +
+
+=== Optimistic settings
+
+A very optimistic setting such as "\{deploymentId}" would guarantee only
+one proxy for the bean will be bound to JNDI. This would be fine if you
+knew you only had one type of interface in your beans. For example, only
+business remote interfaces, or only business local interfaces, or only
+an EJBObject interface, or only an EJBLocalObject interface.
+
+If a bean in the app did have more than one interface type, one business
+local and one business remote for example, by default OpenEJB will
+reject the app when it detects that it cannot bind the second interface.
+This strict behavior can be disabled by setting the
+_openejb.jndiname.failoncollision_ system property to _false_. When this
+property is set to false, we will simply log an error that the second
+proxy cannot be bound to JNDI, tell you which ejb is using that name,
+and continue loading your app.
+
+Similarly optimistic settings would be: +
+
+=== Advanced Details on EJB 3.0 Business Proxies (the simple part)
+
+If you implement your business interfaces, your life is simple as your
+proxies will also implement your business interfaces of the same type.
+Meaning any proxy OpenEJB creates for a business local interface will
+also implement your other business local interfaces. Similarly, any
+proxy OpenEJB creates for a business remote interface will also
+implement your other business remote interfaces.
+
+=== Advanced Details on EJB 3.0 Business Proxies (the complicated part)
+
+_Who should read?_ +
+Read this section of either of these two apply to you: +
+- You do not implement your business interfaces in your bean class +
+- One or more of your business remote interfaces extend from
+javax.rmi.Remote
+
+If neither of these two items describe your apps, then there is no need
+to read further. Go have fun.
+
+=== Not implementing business interfaces
+
+If you do not implement your business interfaces it may not be possible
+for us to implement all your business interfaces in a single interface.
+Conflicts in the throws clauses and the return values can occur as
+detailed link:multiple-business-interface-hazzards.html[here] . When
+creating a proxy for an interface we will detect and remove any other
+business interfaces that would conflict with the main interface.
+
+=== Business interfaces extending javax.rmi.Remote
+
+Per spec rules many runtime exceptions (container or connection related)
+are thrown from javax.rmi.Remote proxies as java.rmi.RemoteException
+which is not a runtime exception and must be throwable via the proxy as
+a checked exception. The issue is that conflicting throws clauses are
+actually removed for two interfaces sharing the same method signature.
+For example two methods such as these: +
+- InterfaceA: void doIt() throws Foo; +
+- InterfaceB: void doIt() throws RemoteException;
+
+can be implemented by trimming out the conflicting throws clauses as
+follows: +
+- Implementation: void doIt()\{}
+
+This is fine for a bean class as it does not need to throw the RMI
+required javax.rmi.RemoteException. However if we create a proxy from
+these two interfaces it will also wind up with a 'doIt()\{}' method that
+cannot throw javax.rmi.RemoteException. This is very bad as the
+container does need to throw RemoteException to any business interfaces
+extending java.rmi.Remote for any container related issues or connection
+issues. If the container attempts to throw a RemoteException from the
+proxies 'doIt()\{}' method, it will result in an
+UndeclaredThrowableException thrown by the VM.
+
+The only way to guarantee the proxy has the 'doIt() throws
+RemoteException \{}' method of InterfaceB is to cut out InterfaceA when
+we create the proxy dedicated to InterfaceB.

http://git-wip-us.apache.org/repos/asf/tomee/blob/513cf17a/docs/jndi-names.md
----------------------------------------------------------------------
diff --git a/docs/jndi-names.md b/docs/jndi-names.md
deleted file mode 100644
index 6e73234..0000000
--- a/docs/jndi-names.md
+++ /dev/null
@@ -1,372 +0,0 @@
-index-group=Configuration
-type=page
-status=published
-title=JNDI Names
-~~~~~~
-
-<a name="JNDINames-What'sMyBean'sJNDIName?"></a>
-# What's My Bean's JNDI Name?
-There are two things to keep in mind before you start reading:
-       
-1   OpenEJB provides a default JNDI name to your EJB.     
-2   You can customize the JNDI name.
-
-<a name="JNDINames-DefaultJNDIname"></a>
-## Default JNDI name 
-The default JNDI name is in the following format:
-
-    {deploymentId}{interfaceType.annotationName}
-
-Lets try and understand the above format. Both *deploymentId* and
-*interfaceType.annotationName* are pre-defined variables. There are other
-pre-defined variables available which you could use to customize the JNDI
-name format.
-
-<a name="JNDINames-JNDINameFormatting"></a>
-#  JNDI Name Formatting
-
-The *openejb.jndiname.format* property allows you to supply a template for
-the global JNDI names of all your EJBs.  With it, you have complete control
-over the structure of the JNDI layout can institute a design pattern just
-right for your client apps.  See the [Service Locator](service-locator.html)
- doc for clever ways to use the JNDI name formatting functionality in
-client code.
-<table class="mdtable">
-<tr><td>variable</td><td>	 description</td></tr>
-<tr><td>moduleId</td><td>	 Typically the name of the ejb-jar file<br> or the <ejb-jar id=""> id value if specified</td></tr>
-<tr><td>ejbType</td><td>	 STATEFUL, STATELESS, BMP_ENTITY, CMP_ENTITY, or MESSAGE_DRIVEN</td></tr>
-<tr><td>ejbClass</td><td>	 for a class named org.acme.superfun.WidgetBean results in org.acme.superfun.WidgetBean</td></tr>
-<tr><td>ejbClass.simpleName</td><td>	 for a class named org.acme.superfun.WidgetBean results in WidgetBean</td></tr>
-<tr><td>ejbClass.packageName</td><td>	 for a class named org.acme.superfun.WidgetBean results in org.acme.superfun</td></tr>
-<tr><td>ejbName</td><td>	 The ejb-name as specified in xml or via the 'name' attribute in an @Stateful, @Stateless, or @MessageDriven annotation</td></tr>
-<tr><td>deploymentId</td><td>	 The unique system id for the ejb. Typically the ejbName unless specified in the openejb-jar.xml or via changing the openejb.deploymentId.format</td></tr>
-<tr><td>interfaceType</td><td>	 see interfaceType.annotationName</td></tr>
-<tr><td>interfaceType.annotationName</td><td>	 Following the EJB 3 annotations @RemoteHome, @LocalHome, @Remote and @Local
-RemoteHome (EJB 2 EJBHome)
-LocalHome (EJB 2 EJBLocalHome)
-Remote (EJB 3 Business Remote)
-Local (EJB 3 Business Local)
-Endpoint (EJB webservice endpoint)</td></tr>
-<tr><td>interfaceType.annotationNameLC</td><td>	 This is the same as interfaceType.annotationName, but all in lower case.</td></tr>
-<tr><td>interfaceType.xmlName</td><td>	 Following the ejb-jar.xml descriptor elements <home>, <local-home>, <business-remote>, <business-local>, and <service-endpoint>:
-home (EJB 2 EJBHome)
-local-home (EJB 2 EJBLocalHome)
-business-remote (EJB 3 Business Remote)
-business-local (EJB 3 Business Local)
-service-endpoint (EJB webservice endpoint)</td></tr>
-<tr><td>interfaceType.xmlNameCc</td><td>	 Camel-case version of interfaceType.xmlName:
-Home (EJB 2 EJBHome)
-LocalHome (EJB 2 EJBLocalHome)
-BusinessRemote (EJB 3 Business Remote)
-BusinessLocal (EJB 3 Business Local)
-ServiceEndpoint (EJB webservice endpoint)</td></tr>
-<tr><td>interfaceType.openejbLegacyName</td><td>Following the OpenEJB 1.0 hard-coded format:
-(empty string) (EJB 2 EJBHome)
-Local (EJB 2 EJBLocalHome)
-BusinessRemote (EJB 3 Business Remote)
-BusinessLocal (EJB 3 Business Local)
-ServiceEndpoint (EJB webservice endpoint)</td></tr>
-<tr><td>interfaceClass</td><td>	
-(business) for a class named org.acme.superfun.WidgetRemote results in org.acme.superfun.WidgetRemote<br>
-(home) for a class named org.acme.superfun.WidgetHome results in org.acme.superfun.WidgetHome</td></tr>
-<tr><td>interfaceClass.simpleName</td><td>
-(business) for a class named org.acme.superfun.WidgetRemote results in WidgetRemote
-(home) for a class named org.acme.superfun.WidgetHome results in WidgetHome</td></tr>
-<tr><td>interfaceClass.packageName</td><td>	 for a class named org.acme.superfun.WidgetRemote results in org.acme.superfun</td></tr>
-</table>
-<a name="JNDINames-SettingtheJNDIname"></a>
-#  Setting the JNDI name
-
-It's possible to set the desired jndi name format for the whole server
-level, an ejb-jar, an ejb, an ejb's "local" interface
-(local/remote/local-home/home), and for an individual interface the ejb
-implements.  More specific jndi name formats act as an override to any more
-general formats.  The most specific format dictates the jndi name that will
-be used for any given interface of an ejb.  It's possible to specify a
-general format for your server, override it at an ejb level and override
-that further for a specific interface of that ejb.
-
-<a name="JNDINames-ViaSystemproperty"></a>
-## Via System property
-
-The jndi name format can be set on a server level via a _system property_,
-for example:
-
-
-    $ ./bin/openejb start
-    -Dopenejb.jndiname.format=\{ejbName}/\{interfaceClass}"
-
-
-As usual, other ways of specifying system properties are via the
-conf/system.properties file in a standalone server, or via the
-InitialContext properties when embedded.
-
-<a name="JNDINames-Viapropertiesintheopenejb-jar.xml"></a>
-## Via properties in the openejb-jar.xml
-
-It's possible to set the openejb.jndiname.format for an ejb-jar jar in a
-META-INF/openejb-jar.xml file as follows:
-
-
-    <openejb-jar>
-      <properties>
-         openejb.deploymentId.format = {ejbName}
-         openejb.jndiname.format = {deploymentId}{interfaceType.annotationName}
-      </properties>
-    </openejb-jar>
-
-
-<a name="JNDINames-Viathe<jndi>tagforaspecificejb"></a>
-## Via the <jndi> tag for a specific ejb
-
-The following sets the name specifically for the interface
-org.superbiz.Foo.
-
-
-    <openejb-jar>
-      <ejb-deployment ejb-name="FooBean">
-        <jndi name="foo" interface="org.superbiz.Foo"/>  
-      </ejb-deployment>
-    </openejb-jar>
-
-
-Or more generally...
-
-
-    <openejb-jar>
-      <ejb-deployment ejb-name="FooBean">
-        <jndi name="foo" interface="Remote"/> 
-      </ejb-deployment>
-    </openejb-jar>
-
-
-Or more generally still...
-
-
-    <openejb-jar>
-      <ejb-deployment ejb-name="FooBean">
-        <jndi name="foo"/> 
-      </ejb-deployment>
-    </openejb-jar>
-
-
-The 'name' attribute can still use templates if it likes, such as: 
-
-
-    <openejb-jar>
-      <ejb-deployment ejb-name="FooBean">
-        <jndi name="ejb/{interfaceClass.simpleName}" interface="org.superbiz.Foo"/> 
-      </ejb-deployment>
-    </openejb-jar>
-
-
-<a name="JNDINames-Multiple<jndi>tags"></a>
-###  Multiple <jndi> tags
-
-Multiple <jndi> tags are allowed making it possible for you to be as
-specific as you need about the jndi name of each interface or each logical
-group of iterfaces (Local, Remote, LocalHome, RemoteHome).  
-
-Given an ejb, FooBean, with the following interfaces:
- - business-local: org.superbiz.LocalOne
- - business-local: org.superbiz.LocalTwo
- - business-remote: org.superbiz.RemoteOne
- - business-remote: org.superbiz.RemoteTwo
- - home: org.superbiz.FooHome
- - local-home: org.superbiz.FooLocalHome
-
-The following four examples would yield the same jndi names.  The intention
-with these examples is to show the various ways you can isolate specific
-interfaces or types of interfaces to gain more specific control on how they
-are named.
-
-    <openejb-jar>
-      <ejb-deployment ejb-name="FooBean">
-        <jndi name="LocalOne" interface="org.superbiz.LocalOne"/>
-        <jndi name="LocalTwo" interface="org.superbiz.LocalTwo"/>
-        <jndi name="RemoteOne" interface="org.superbiz.RemoteOne"/>
-        <jndi name="RemoteTwo" interface="org.superbiz.RemoteTwo"/>
-        <jndi name="FooHome" interface="org.superbiz.FooHome"/>
-        <jndi name="FooLocalHome" interface="org.superbiz.FooLocalHome"/>
-      </ejb-deployment>
-    </openejb-jar>
-
-Or
-
-    <openejb-jar>
-      <ejb-deployment ejb-name="FooBean">
-        <!-- applies to LocalOne and LocalTwo -->
-        <jndi name="{interfaceClass.simpleName}" interface="Local"/> 
-    
-        <!-- applies to RemoteOne and RemoteTwo -->
-        <jndi name="{interfaceClass.simpleName}" interface="Remote"/> 
-    
-        <!-- applies to FooHome -->
-        <jndi name="{interfaceClass.simpleName}" interface="RemoteHome"/> 
-    
-        <!-- applies to FooLocalHome -->
-        <jndi name="{interfaceClass.simpleName}" interface="LocalHome"/> 
-      </ejb-deployment>
-    </openejb-jar>
-
-Or
-
-    <openejb-jar>
-      <ejb-deployment ejb-name="FooBean">
-        <!-- applies to RemoteOne, RemoteTwo, FooHome, and FooLocalHome -->
-        <jndi name="{interfaceClass.simpleName}"/>
-
-        <!-- these two would count as an override on the above format -->
-        <jndi name="LocalOne" interface="org.superbiz.LocalOne"/>
-        <jndi name="LocalTwo" interface="org.superbiz.LocalTwo"/>
-      </ejb-deployment>
-    </openejb-jar>
-
-or
-    
-    <openejb-jar>
-      <ejb-deployment ejb-name="FooBean">
-        <!-- applies to LocalOne, LocalTwo, RemoteOne, RemoteTwo, FooHome, and FooLocalHome -->
-        <jndi name="{interfaceClass.simpleName}"/> 
-      </ejb-deployment>
-    </openejb-jar>
-
-
-<a name="JNDINames-ChangingtheDefaultSetting"></a>
-# Changing the Default Setting
-
-*You are responsible for ensuring the names don't conflict.*  
- 
-<a name="JNDINames-Conservativesettings"></a>
-### Conservative settings
-
-A very conservative setting such as    
-
- "{deploymentId}/{interfaceClass}"    
-
-would guarantee that each and every single interface is bound to JNDI.	If
-your bean had a legacy EJBObject interface, three business remote
-interfaces, and two business local interfaces, this pattern would result in    
-*six* proxies bound into JNDI.      
-<pre>  
- - {deploymentId}/{interfaceClass.simpleName}    
- - {moduleId}/{ejbName}/{interfaceClass}    
- - {ejbName}/{interfaceClass}    
- - {moduleId}/{ejbClass}/{interfaceClass}    
- - {ejbClass}/{interfaceClass}    
- - {ejbClass}/{interfaceClass.simpleName}    
- - {ejbClass.simpleName}/{interfaceClass.simpleName}    
- - {interfaceClass}/{ejbName}    
-</pre>
-Bordeline optimistic:    
-<pre>
- - {moduleId}/{interfaceClass}    
- - {interfaceClass}    
-</pre>
-The above two settings would work if you the interface wasn't shared by
-other beans.
-
-<a name="JNDINames-Pragmaticsettings"></a>
-### Pragmatic settings    
-
-A more middle ground setting such as
-"{deploymentId}/{interfaceType.annotationName}" would guarantee that at
-least one proxy of each interface type is bound to JNDI.  If your bean had
-a legacy EJBObject interface, three business remote interfaces, and two
-business local interfaces, this pattern would result in *three* proxies
-bound into JNDI: one proxy dedicated to your EJBObject interface; one proxy
-implementing all three business remote interfaces; one proxy implementing
-the two business local interfaces.
-
-Similarly pragmatic settings would be    
-<pre>
- - {moduleId}/{ejbClass}/{interfaceType.annotationName}    
- - {ejbClass}/{interfaceType.xmlName}    
- - {ejbClass.simpleName}/{interfaceType.xmlNameCc}    
- - {interfaceType}/{ejbName}    
- - {interfaceType}/{ejbClass}    
-</pre>
-<a name="JNDINames-Optimisticsettings"></a>
-### Optimistic settings
-
-A very optimistic setting such as "{deploymentId}" would guarantee only
-one proxy for the bean will be bound to JNDI.  This would be fine if you
-knew you only had one type of interface in your beans.	For example, only
-business remote interfaces, or only business local interfaces, or only an
-EJBObject interface, or only an EJBLocalObject interface.
-
-If a bean in the app did have more than one interface type, one business
-local and one business remote for example, by default OpenEJB will reject
-the app when it detects that it cannot bind the second interface.  This
-strict behavior can be disabled by setting the
-*openejb.jndiname.failoncollision* system property to _false_.	When this
-property is set to false, we will simply log an error that the second proxy
-cannot be bound to JNDI, tell you which ejb is using that name, and
-continue loading your app.
-
-Similarly optimistic settings would be:    
-<pre>
- - {ejbName}    
- - {ejbClass}    
- - {ejbClass.simpleName}    
- - {moduleId}/{ejbClass.simpleName}    
- - {moduleId}/{ejbName}    
-</pre>
-<a name="JNDINames-AdvancedDetailsonEJB3.0BusinessProxies(thesimplepart)"></a>
-### Advanced Details on EJB 3.0 Business Proxies (the simple part)
-
-If you implement your business interfaces, your life is simple as your
-proxies will also implement your business interfaces of the same type. 
-Meaning any proxy OpenEJB creates for a business local interface will also
-implement your other business local interfaces.  Similarly, any proxy
-OpenEJB creates for a business remote interface will also implement your
-other business remote interfaces.
-
-<a name="JNDINames-AdvancedDetailsonEJB3.0BusinessProxies(thecomplicatedpart)"></a>
-### Advanced Details on EJB 3.0 Business Proxies (the complicated part)
-
-*Who should read?*    
-Read this section of either of these two apply to you:    
- - You do not implement your business interfaces in your bean class    
- - One or more of your business remote interfaces extend from javax.rmi.Remote
-
-If neither of these two items describe your apps, then there is no need to
-read further.  Go have fun.
-
-<a name="JNDINames-Notimplementingbusinessinterfaces"></a>
-### Not implementing business interfaces
-
-If you do not implement your business interfaces it may not be possible for
-us to implement all your business interfaces in a single interface. 
-Conflicts in the throws clauses and the return values can occur as detailed [here](multiple-business-interface-hazzards.html)
-.  When creating a proxy for an interface we will detect and remove any
-other business interfaces that would conflict with the main interface.
-
-<a name="JNDINames-Businessinterfacesextendingjavax.rmi.Remote"></a>
-### Business interfaces extending javax.rmi.Remote
-
-Per spec rules many runtime exceptions (container or connection related)
-are thrown from javax.rmi.Remote proxies as java.rmi.RemoteException which
-is not a runtime exception and must be throwable via the proxy as a checked
-exception. The issue is that conflicting throws clauses are actually
-removed for two interfaces sharing the same method signature.  For example
-two methods such as these:    
- - InterfaceA: void doIt() throws Foo;   
- - InterfaceB: void doIt() throws RemoteException;    
-
-can be implemented by trimming out the conflicting throws clauses as
-follows:    
-  - Implementation: void doIt(){}    
-
-This is fine for a bean class as it does not need to throw the RMI required
-javax.rmi.RemoteException. However if we create a proxy from these two
-interfaces it will also wind up with a 'doIt(){}' method that cannot throw
-javax.rmi.RemoteException.  This is very bad as the container does need to
-throw RemoteException to any business interfaces extending java.rmi.Remote
-for any container related issues or connection issues.	If the container
-attempts to throw a RemoteException from the proxies 'doIt(){}' method, it
-will result in an UndeclaredThrowableException thrown by the VM.
-
-The only way to guarantee the proxy has the 'doIt() throws RemoteException
-{}' method of InterfaceB is to cut out InterfaceA when we create the proxy
-dedicated to InterfaceB.

http://git-wip-us.apache.org/repos/asf/tomee/blob/513cf17a/docs/jpa-concepts.adoc
----------------------------------------------------------------------
diff --git a/docs/jpa-concepts.adoc b/docs/jpa-concepts.adoc
new file mode 100644
index 0000000..0c74735
--- /dev/null
+++ b/docs/jpa-concepts.adoc
@@ -0,0 +1,223 @@
+# JPA Concepts 
+:index-group: JPA
+:jbake-date: 2018-12-05
+:jbake-type: page
+:jbake-status: published
+
+# JPA 101
+
+If there's one thing you have to understand to successfully use JPA
+(Java Persistence API) it's the concept of a _Cache_. Almost everything
+boils down to the Cache at one point or another. Unfortunately the Cache
+is an internal thing and not exposed via the JPA API classes, so it not
+easy to touch or feel from a coding perspective.
+
+Here's a quick cheat sheet of the JPA world:
+
+* A *Cache* is a *copy of data*, copy meaning pulled from but living
+outside the database.
+* *Flushing* a Cache is the act of putting modified data back into the
+database.
+* A *PersistenceContext* is essentially a Cache. It also tends to have
+it's own non-shared database connection.
+* An *EntityManager* represents a PersistenceContext (and therefore a
+Cache)
+* An *EntityManagerFactory* creates an EntityManager (and therefore a
+PersistenceContext/Cache)
+
+Comparing `RESOURCE_LOCAL` and `JTA` persistence contexts
+
+With <persistence-unit transaction-type="*RESOURCE_LOCAL*"> *you* are
+responsible for EntityManager (PersistenceContext/Cache) creating and
+tracking...
+
+* You *must* use the *EntityManagerFactory* to get an EntityManager
+* The resulting *EntityManager* instance *is* a PersistenceContext/Cache
+* An *EntityManagerFactory* can be injected via the *@PersistenceUnit*
+annotation only (not @PersistenceContext)
+* You are *not* allowed to use @PersistenceContext to refer to a unit of
+type RESOURCE_LOCAL
+* You *must* use the *EntityTransaction* API to begin/commit around
+*every* call to your EntityManger
+* Calling entityManagerFactory.createEntityManager() twice results in
+*two* separate EntityManager instances and therefor *two* separate
+PersistenceContexts/Caches.
+* It is *almost never* a good idea to have more than one *instance* of
+an EntityManager in use (don't create a second one unless you've
+destroyed the first)
+
+With <persistence-unit transaction-type="*JTA*"> the *container* will do
+EntityManager (PersistenceContext/Cache) creating and tracking...
+
+* You *cannot* use the *EntityManagerFactory* to get an EntityManager
+* You can only get an *EntityManager* supplied by the *container*
+* An *EntityManager* can be injected via the *@PersistenceContext*
+annotation only (not @PersistenceUnit)
+* You are *not* allowed to use @PersistenceUnit to refer to a unit of
+type JTA
+* The *EntityManager* given by the container is a *reference* to the
+PersistenceContext/Cache associated with a JTA Transaction.
+* If no JTA transaction is in progress, the EntityManager *cannot be
+used* because there is no PersistenceContext/Cache.
+* Everyone with an EntityManager reference to the *same unit* in the
+*same transaction* will automatically have a reference to the *same
+PersistenceContext/Cache*
+* The PersistenceContext/Cache is *flushed* and cleared at JTA *commit*
+time
+
+# Cache == PersistenceContext
+
+The concept of a database cache is an extremely important concept to be
+aware of. Without a copy of the data in memory (i.e. a cache) when you
+call account.getBalance() the persistence provider would have to go read
+the value from the database. Calling account.getBalance() several times
+would cause several trips to the database. This would obviously be a big
+waste of resources. The other side of having a cache is that when you
+call account.setBalance(5000) it also doesn't hit the database
+(usually). When the cache is "flushed" the data in it is sent to the
+database via as many SQL updates, inserts and deletes as are required.
+That is the basics of java persistence of any kind all wrapped in a
+nutshell. If you can understand that, you're good to go in nearly any
+persistence technology java has to offer.
+
+Complications can arise when there is more than one
+PersistenceContext/Cache relating the same data in the same transaction.
+In any given transaction you want exactly one PersistenceContext/Cache
+for a given set of data. Using a JTA unit with an EntityManager created
+by the container will always guarantee that this is the case. With a
+RESOURCE_LOCAL unit and an EntityManagerFactory you should create and
+use exactly one EntityManager instance in your transaction to ensure
+there is only one active PersistenceContext/Cache for the given set of
+data active against the current transaction.
+
+# Caches and Detaching
+
+Detaching is the concept of a persistent object *leaving* the
+PersistenceContext/Cache. Leaving means that any updates made to the
+object are *not* reflected in the PersistenceContext/Cache. An object
+will become Detached if it somehow *lives longer* or is *used outside*
+the scope of the PersistenceContext/Cache.
+
+For a JTA unit, the PersistenceContext/Cache will live as long as the
+transaction does. When a transaction completes (commits or rollsback)
+all objects that were in the PersistenceContext/Cache are Detached. You
+can still use them, but they are no longer associated with a
+PersistenceContext/Cache and modifications on them will *not* be
+reflected in a PersistenceContext/Cache and therefore not the database
+either.
+
+Serializing objects that are currently in a PersistenceContext/Cache
+will also cause them to Detach.
+
+In some cases objects or collections of objects that become Detached may
+not have all the data you need. This can be because of lazy loading.
+With lazy loading, data isn't pulled from the database and into the
+PersistenceContext/Cache until it is requested in code. In many cases
+the Collections of persistent objects returned from an
+javax.persistence.Query.getResultList() call are completely empty until
+you iterate over them. A side effect of this is that if the Collection
+becomes Detached before it's been fully read it will be permanently
+empty and of no use and calling methods on the Detached Collection can
+cause strange errors and exceptions to be thrown. If you wish to Detach
+a Collection of persistent objects it is always a good idea to iterate
+over the Collection at least once.
+
+You *cannot* call EntityManager.persist() or EntityManager.remove() on a
+Detached object.
+
+Calling EntityManager.merge() will re-attach a Detached object.
+
+# Valid RESOURCE_LOCAL Unit usage
+
+Servlets and EJBs can use RESOURCE_LOCAL persistence units through the
+EntityManagerFactory as follows:
+
+....
+<?xml version="1.0" encoding="UTF-8" ?>
+<persistence xmlns="http://java.sun.com/xml/ns/persistence" version="1.0">
+
+  <!-- Tutorial "unit" -->
+  <persistence-unit name="Tutorial" transaction-type="RESOURCE_LOCAL">
+    <non-jta-data-source>myNonJtaDataSource</non-jta-data-source>
+    <class>org.superbiz.jpa.Account</class>
+  </persistence-unit>
+
+</persistence>
+....
+
+And referenced as follows
+
+....
+import javax.persistence.EntityManagerFactory;
+import javax.persistence.EntityManager;
+import javax.persistence.EntityTransaction;
+import javax.persistence.PersistenceUnit;
+
+public class MyEjbOrServlet ... {
+
+    @PersistenceUnit(unitName="Tutorial")
+    private EntityManagerFactory factory;
+
+    // Proper exception handling left out for simplicity
+    public void ejbMethodOrServletServiceMethod() throws Exception {
+        EntityManager entityManager = factory.createEntityManager();
+
+        EntityTransaction entityTransaction = entityManager.getTransaction();
+
+        entityTransaction.begin();
+
+        Account account = entityManager.find(Account.class, 12345);
+
+        account.setBalance(5000);
+
+        entityTransaction.commit();
+    }
+
+    ...
+}
+....
+
+== Valid JTA Unit usage
+
+EJBs can use JTA persistence units through the EntityManager as follows:
+
+....
+<?xml version="1.0" encoding="UTF-8" ?>
+<persistence xmlns="http://java.sun.com/xml/ns/persistence" version="1.0">
+
+  <!-- Tutorial "unit" -->
+  <persistence-unit name="Tutorial" transaction-type="JTA">
+    <jta-data-source>myJtaDataSource</jta-data-source>
+    <non-jta-data-source>myNonJtaDataSource</non-jta-data-source>
+    <class>org.superbiz.jpa.Account</class>
+  </persistence-unit>
+    
+</persistence>
+....
+
+And referenced as follows
+
+....
+import javax.ejb.Stateless;
+import javax.ejb.TransactionAttribute;
+import javax.ejb.TransactionAttributeType;
+import javax.persistence.EntityManager;
+import javax.persistence.PersistenceContext;
+
+@Stateless
+public class MyEjb implements MyEjbInterface {
+
+    @PersistenceContext(unitName = "Tutorial")
+    private EntityManager entityManager;
+
+    // Proper exception handling left out for simplicity
+    @TransactionAttribute(TransactionAttributeType.REQUIRED)
+    public void ejbMethod() throws Exception {
+
+    Account account = entityManager.find(Account.class, 12345);
+
+    account.setBalance(5000);
+
+    }
+}
+....

http://git-wip-us.apache.org/repos/asf/tomee/blob/513cf17a/docs/jpa-concepts.md
----------------------------------------------------------------------
diff --git a/docs/jpa-concepts.md b/docs/jpa-concepts.md
deleted file mode 100644
index 1d7788e..0000000
--- a/docs/jpa-concepts.md
+++ /dev/null
@@ -1,220 +0,0 @@
-index-group=JPA
-type=page
-status=published
-title=JPA Concepts
-~~~~~~
-<a name="JPAConcepts-JPA101"></a>
-# JPA 101
-
-If there's one thing you have to understand to successfully use JPA (Java
-Persistence API) it's the concept of a *Cache*.  Almost everything boils
-down to the Cache at one point or another.  Unfortunately the Cache is an
-internal thing and not exposed via the JPA API classes, so it not easy to
-touch or feel from a coding perspective.
-
-Here's a quick cheat sheet of the JPA world:
-
- - A **Cache** is a **copy of data**, copy meaning pulled from but living
-outside the database.
- - **Flushing** a Cache is the act of putting modified data back into the
-database.
- - A **PersistenceContext** is essentially a Cache. It also tends to have
-it's own non-shared database connection.
- - An **EntityManager** represents a PersistenceContext (and therefore a
-Cache)
- - An **EntityManagerFactory** creates an EntityManager (and therefore a
-PersistenceContext/Cache)
-
-Comparing `RESOURCE_LOCAL` and `JTA` persistence contexts
-
-With &lt;persistence-unit transaction-type="**RESOURCE_LOCAL**"> **you** are
-responsible for EntityManager (PersistenceContext/Cache) creating and
-tracking...
-
-- You **must** use the **EntityManagerFactory** to get an EntityManager
-- The resulting **EntityManager** instance **is** a
-PersistenceContext/Cache
-- An **EntityManagerFactory** can be injected via the **@PersistenceUnit**
-annotation only (not @PersistenceContext)
-- You are **not** allowed to use @PersistenceContext to refer to a unit
-of type RESOURCE_LOCAL
-- You **must** use the **EntityTransaction** API to begin/commit around
-**every** call to your EntityManger
-- Calling entityManagerFactory.createEntityManager() twice results in
-**two** separate EntityManager instances and therefor **two** separate
-PersistenceContexts/Caches.
-- It is **almost never** a good idea to have more than one **instance** of
-an EntityManager in use (don't create a second one unless you've destroyed
-the first)
-
-With &lt;persistence-unit transaction-type="**JTA**"> the **container**
-will do EntityManager (PersistenceContext/Cache) creating and tracking...
-
-- You **cannot** use the **EntityManagerFactory** to get an EntityManager
-- You can only get an **EntityManager** supplied by the **container**
-- An **EntityManager** can be injected via the **@PersistenceContext**
-annotation only (not @PersistenceUnit)
-- You are **not** allowed to use @PersistenceUnit to refer to a unit of
-type JTA
-- The **EntityManager** given by the container is a **reference** to the
-PersistenceContext/Cache associated with a JTA Transaction.
-- If no JTA transaction is in progress, the EntityManager **cannot be
-used** because there is no PersistenceContext/Cache.
-- Everyone with an EntityManager reference to the **same unit** in the
-**same transaction** will automatically have a reference to the **same
-PersistenceContext/Cache**
-- The PersistenceContext/Cache is **flushed** and cleared at JTA
-**commit** time
-
-<a name="JPAConcepts-Cache==PersistenceContext"></a>
-#  Cache == PersistenceContext
-
-The concept of a database cache is an extremely important concept to be
-aware of.  Without a copy of the data in memory (i.e. a cache) when you
-call account.getBalance() the persistence provider would have to go read
-the value from the database.  Calling account.getBalance() several times
-would cause several trips to the database.  This would obviously be a big
-waste of resources.  The other side of having a cache is that when you call
-account.setBalance(5000) it also doesn't hit the database (usually).  When
-the cache is "flushed" the data in it is sent to the database via as many
-SQL updates, inserts and deletes as are required.  That is the basics of
-java persistence of any kind all wrapped in a nutshell.  If you can
-understand that, you're good to go in nearly any persistence technology
-java has to offer.
-
-Complications can arise when there is more than one
-PersistenceContext/Cache relating the same data in the same transaction. 
-In any given transaction you want exactly one PersistenceContext/Cache for
-a given set of data.  Using a JTA unit with an EntityManager
-created by the container will always guarantee that this is the case.  With
-a RESOURCE_LOCAL unit and an EntityManagerFactory you should create and use
-exactly one EntityManager instance in your transaction to ensure there is
-only one active PersistenceContext/Cache for the given set of data active
-against the current transaction.
-
-<a name="JPAConcepts-CachesandDetaching"></a>
-# Caches and Detaching
-
-Detaching is the concept of a persistent object **leaving** the
-PersistenceContext/Cache.  Leaving means that any updates made to the
-object are **not** reflected in the PersistenceContext/Cache.  An object will
-become Detached if it somehow **lives longer** or is **used outside** the scope
-of the PersistenceContext/Cache.  
-
-For a JTA unit, the PersistenceContext/Cache will live as long as
-the transaction does.  When a transaction completes (commits or rollsback)
-all objects that were in the PersistenceContext/Cache are Detached.  You
-can still use them, but they are no longer associated with a
-PersistenceContext/Cache and modifications on them will **not** be reflected
-in a PersistenceContext/Cache and therefore not the database either.
-
-Serializing objects that are currently in a PersistenceContext/Cache will
-also cause them to Detach.
-
-In some cases objects or collections of objects that become Detached may
-not have all the data you need.  This can be because of lazy loading.  With
-lazy loading, data isn't pulled from the database and into the
-PersistenceContext/Cache until it is requested in code.  In many cases the
-Collections of persistent objects returned from an
-javax.persistence.Query.getResultList() call are completely empty until you
-iterate over them.  A side effect of this is that if the Collection becomes
-Detached before it's been fully read it will be permanently empty and of no
-use and calling methods on the Detached Collection can cause strange errors
-and exceptions to be thrown.  If you wish to Detach a Collection of
-persistent objects it is always a good idea to iterate over the Collection
-at least once.
-
-You **cannot** call EntityManager.persist() or EntityManager.remove() on a
-Detached object.
-
-Calling EntityManager.merge() will re-attach a Detached object.
-
-<a name="JPAConcepts-ValidRESOURCE_LOCALUnitusage"></a>
-#  Valid RESOURCE_LOCAL Unit usage
-
-Servlets and EJBs can use RESOURCE_LOCAL persistence units through the
-EntityManagerFactory as follows:
-
-    <?xml version="1.0" encoding="UTF-8" ?>
-    <persistence xmlns="http://java.sun.com/xml/ns/persistence" version="1.0">
-
-      <!-- Tutorial "unit" -->
-      <persistence-unit name="Tutorial" transaction-type="RESOURCE_LOCAL">
-        <non-jta-data-source>myNonJtaDataSource</non-jta-data-source>
-        <class>org.superbiz.jpa.Account</class>
-      </persistence-unit>
-
-    </persistence>
-
-And referenced as follows
-
-    import javax.persistence.EntityManagerFactory;
-    import javax.persistence.EntityManager;
-    import javax.persistence.EntityTransaction;
-    import javax.persistence.PersistenceUnit;
-
-    public class MyEjbOrServlet ... {
-
-        @PersistenceUnit(unitName="Tutorial")
-        private EntityManagerFactory factory;
-
-        // Proper exception handling left out for simplicity
-        public void ejbMethodOrServletServiceMethod() throws Exception {
-            EntityManager entityManager = factory.createEntityManager();
-
-            EntityTransaction entityTransaction = entityManager.getTransaction();
-
-            entityTransaction.begin();
-
-            Account account = entityManager.find(Account.class, 12345);
-
-            account.setBalance(5000);
-
-            entityTransaction.commit();
-        }
-
-        ...
-    }
-
-    
-#  Valid JTA Unit usage
-
-EJBs can use JTA persistence units through the EntityManager as
-follows:
-    
-    <?xml version="1.0" encoding="UTF-8" ?>
-    <persistence xmlns="http://java.sun.com/xml/ns/persistence" version="1.0">
-    
-      <!-- Tutorial "unit" -->
-      <persistence-unit name="Tutorial" transaction-type="JTA">
-        <jta-data-source>myJtaDataSource</jta-data-source>
-        <non-jta-data-source>myNonJtaDataSource</non-jta-data-source>
-        <class>org.superbiz.jpa.Account</class>
-      </persistence-unit>
-    	
-    </persistence>
-
-And referenced as follows
-
-    import javax.ejb.Stateless;
-    import javax.ejb.TransactionAttribute;
-    import javax.ejb.TransactionAttributeType;
-    import javax.persistence.EntityManager;
-    import javax.persistence.PersistenceContext;
-    
-    @Stateless
-    public class MyEjb implements MyEjbInterface {
-    
-        @PersistenceContext(unitName = "Tutorial")
-        private EntityManager entityManager;
-    
-        // Proper exception handling left out for simplicity
-        @TransactionAttribute(TransactionAttributeType.REQUIRED)
-        public void ejbMethod() throws Exception {
-    
-    	Account account = entityManager.find(Account.class, 12345);
-    
-    	account.setBalance(5000);
-    
-        }
-    }

http://git-wip-us.apache.org/repos/asf/tomee/blob/513cf17a/docs/jpa-usage.adoc
----------------------------------------------------------------------
diff --git a/docs/jpa-usage.adoc b/docs/jpa-usage.adoc
new file mode 100644
index 0000000..21e0210
--- /dev/null
+++ b/docs/jpa-usage.adoc
@@ -0,0 +1,48 @@
+# JPA Usage
+:index-group: JPA
+:jbake-date: 2018-12-05
+:jbake-type: page
+:jbake-status: published
+
+# Things to watch out for
+
+== Critical: Always set jta-data-source and non-jta-data-source
+
+Always set the value of jta-data-source and non-jta-data-source in your
+persistence.xml file. Regardless if targeting your EntityManager usage
+for transaction-type="RESOURCE_LOCAL" or transaction-type="TRANSACTION",
+it's very difficult to guarantee one or the other will be the only one
+needed. Often times the JPA Provider itself will require both internally
+to do various optimizations or other special features.
+
+* The _jta-data-source_ should always have it's OpenEJB-specific
+'_JtaManaged_' property set to '_true_' (this is the default)
+* The _non-jta-data-source_ should always have it's OpenEJB-specific
+'_JtaManaged_' property set to '_false_'.
+
+See link:containers-and-resources.html[Containers and Resources] for how
+to configure 'JtaManaged' and a full list of properties for DataSources.
+
+== Be detach aware
+
+A warning for any new JPA user is by default all objects will detach at
+the end of a transaction. People typically discover this when the go to
+remove or update an object they fetched previously and get an exception
+like "You cannot perform operation delete on detached object".
+
+All ejb methods start a transaction unless a) you
+link:transaction-annotations.html[configure them otherwise] , or b) the
+caller already has a transaction in progress when it calls the bean. If
+you're in a test case or a servlet, it's most likely B that is biting
+you. You're asking an ejb for some persistent objects, it uses the
+EntityManager in the scope of the transaction started around it's method
+and returns some persistent objects, by the time you get them the
+transaction has completed and now the objects are detached.
+
+=== Solutions 1. Call EntityManager.merge(..) inside the bean code to
+reattach your object. 1. Use PersistenceContextType.EXTENDED as in
+'@PersistenceContext(unitName = "movie-unit", type =
+PersistenceContextType.EXTENDED)' for EntityManager refs instead of the
+default of PersistenceContextType.TRANSACTION. 1. If testing, use a
+technique to execute transactions in your test code. That's described
+here in link:unit-testing-transactions.html[Unit testing transactions]

http://git-wip-us.apache.org/repos/asf/tomee/blob/513cf17a/docs/jpa-usage.md
----------------------------------------------------------------------
diff --git a/docs/jpa-usage.md b/docs/jpa-usage.md
deleted file mode 100644
index 6b8f8a8..0000000
--- a/docs/jpa-usage.md
+++ /dev/null
@@ -1,52 +0,0 @@
-index-group=JPA
-type=page
-status=published
-title=JPA Usage
-~~~~~~
-<a name="JPAUsage-Thingstowatchoutfor"></a>
-# Things to watch out for
-
-<a name="JPAUsage-Critical:Alwayssetjta-data-sourceandnon-jta-data-source"></a>
-## Critical: Always set jta-data-source and non-jta-data-source
-
-Always set the value of jta-data-source and non-jta-data-source in your
-persistence.xml file.  Regardless if targeting your EntityManager usage for
-transaction-type="RESOURCE_LOCAL" or transaction-type="TRANSACTION", it's
-very difficult to guarantee one or the other will be the only one needed. 
-Often times the JPA Provider itself will require both internally to do
-various optimizations or other special features.  
-
-* The *jta-data-source* should always have it's OpenEJB-specific
-'*JtaManaged*' property set to '*true*'  (this is the default)
-* The *non-jta-data-source* should always have it's OpenEJB-specific
-'*JtaManaged*' property set to '*false*'.
-
-See [Containers and Resources](containers-and-resources.html)
- for how to configure 'JtaManaged' and a full list of <Resource> properties
-for DataSources.
-
-<a name="JPAUsage-Bedetachaware"></a>
-## Be detach aware
-
-A warning for any new JPA user is by default all objects will detach at the
-end of a transaction.  People typically discover this when the go to remove
-or update an object they fetched previously and get an exception like "You
-cannot perform operation delete on detached object".
-
-All ejb methods start a transaction unless a) you [configure them otherwise](transaction-annotations.html)
-, or b) the caller already has a transaction in progress when it calls the
-bean.  If you're in a test case or a servlet, it's most likely B that is
-biting you.  You're asking an ejb for some persistent objects, it uses the
-EntityManager in the scope of the transaction started around it's method
-and returns some persistent objects, by the time you get them the
-transaction has completed and now the objects are detached.
-
-<a name="JPAUsage-Solutions"></a>
-### Solutions
-1. Call EntityManager.merge(..) inside the bean code to reattach your
-object.
-1. Use PersistenceContextType.EXTENDED as in '@PersistenceContext(unitName
-= "movie-unit", type = PersistenceContextType.EXTENDED)' for EntityManager
-refs instead of the default of PersistenceContextType.TRANSACTION.
-1. If testing, use a technique to execute transactions in your test code. 
-That's described here in [Unit testing transactions](unit-testing-transactions.html)