Repository: tomee
Updated Branches:
refs/heads/master 42605b790 -> 22f7ae278
Fix codeblock formatting. Remove old CMS "{row" tags
Project: http://git-wip-us.apache.org/repos/asf/tomee/repo
Commit: http://git-wip-us.apache.org/repos/asf/tomee/commit/f7ee9b75
Tree: http://git-wip-us.apache.org/repos/asf/tomee/tree/f7ee9b75
Diff: http://git-wip-us.apache.org/repos/asf/tomee/diff/f7ee9b75
Branch: refs/heads/master
Commit: f7ee9b7593182a75c8543d66c4ee0517aac4f00a
Parents: 6b2e711
Author: David Blevins <[email protected]>
Authored: Fri Dec 7 17:21:15 2018 -0800
Committer: David Blevins <[email protected]>
Committed: Fri Dec 7 17:21:15 2018 -0800
----------------------------------------------------------------------
docs/embedded-configuration.adoc | 29 ++++++++++++++++-------------
1 file changed, 16 insertions(+), 13 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/tomee/blob/f7ee9b75/docs/embedded-configuration.adoc
----------------------------------------------------------------------
diff --git a/docs/embedded-configuration.adoc b/docs/embedded-configuration.adoc
index 47c4356..db81801 100644
--- a/docs/embedded-configuration.adoc
+++ b/docs/embedded-configuration.adoc
@@ -1,4 +1,4 @@
-# Embedded Configuration
+# OpenEJB Embedded Configuration
:index-group: Testing Techniques
:jbake-date: 2018-12-05
:jbake-type: page
@@ -18,20 +18,20 @@ several places to put your overrides and an a specific
order how they
are applied. Here they are in order of preference; 1 = highest, 5 =
lowest.
-\{row \{span8 *InitialContext*
+*InitialContext*
-[arabic]
. InitialContext properties
. jndi.properties from the classpath
. System properties
. openejb.xml declarations/properties
. service-jar.xml declarations/properties (internal concept) }
-\{span8 *EJBContainer API* 1. EJBContainer.createEJBContainer(Map)
-entries 1. System properties 1. openejb.xml declarations/properties 1.
-service-jar.xml declarations/properties (internal concept)
+*EJBContainer API*
-} }
+. EJBContainer.createEJBContainer(Map) entries
+. System properties
+. openejb.xml declarations/properties
+. service-jar.xml declarations/properties (internal concept)
It opens up some interesting possibilities in how you configure your
environment. You could do 100% of your configuration in your test case
@@ -66,7 +66,8 @@ link:properties-listing.html[OpenEJB Properties] for details
on those.
# Example of using InitialContext properties
-....
+[source,java]
+----
Properties p = new Properties();
// set the initial context factory
@@ -91,7 +92,7 @@ p.put("openejb.descriptors.output ", " true");
p.put("openejb.validation.output.level ", " verbose");
InitialContext initialContext = new InitialContext(p);
-....
+----
# Example of using jndi.properties
@@ -100,7 +101,8 @@ Here's an example of the same properties being specified
via a
classpath, not in a subdirectory of a path in the classpath such as
META-INF, but at the root of any of the paths in the classpath.
-....
+[source]
+----
# set the initial context factory
java.naming.factory.initial =
org.apache.openejb.client.LocalInitialContextFactory
@@ -121,15 +123,16 @@ movie-unit.hibernate.dialect =
org.hibernate.dialect.HSQLDialect
openejb.jndiname.format = {ejbName}/{interfaceClass}
openejb.descriptors.output = true
openejb.validation.output.level = verbose
-....
+----
Then OpenEJB can be booted via the `InitialContext` as normal.
Properties can still be used to override any of the above properties:
-....
+[source]
+----
Properties p = new Properties();
p.put("openejb.validation.output.level ", " medium");
InitialContext initialContext = new InitialContext(p);
-....
+----