You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tomee.apache.org by db...@apache.org on 2011/07/11 01:52:50 UTC
svn commit: r1144987 - in /openejb/site/trunk/content:
configuring-persistenceunits-in-tests.mdtext local-client-injection.mdtext
Author: dblevins
Date: Sun Jul 10 23:52:50 2011
New Revision: 1144987
URL: http://svn.apache.org/viewvc?rev=1144987&view=rev
Log:
perl -i -pe 's/{quote}(.*){quote}/`$1`/g' *.mdtext
Modified:
openejb/site/trunk/content/configuring-persistenceunits-in-tests.mdtext
openejb/site/trunk/content/local-client-injection.mdtext
Modified: openejb/site/trunk/content/configuring-persistenceunits-in-tests.mdtext
URL: http://svn.apache.org/viewvc/openejb/site/trunk/content/configuring-persistenceunits-in-tests.mdtext?rev=1144987&r1=1144986&r2=1144987&view=diff
==============================================================================
--- openejb/site/trunk/content/configuring-persistenceunits-in-tests.mdtext (original)
+++ openejb/site/trunk/content/configuring-persistenceunits-in-tests.mdtext Sun Jul 10 23:52:50 2011
@@ -25,62 +25,61 @@ if we had to adjust the DataSources of y
You can override any property in your test setup via either system
properties or the initial context properties. The format is:
-{quote}<unit-name>.<property>=<value>{quote}
+`<unit-name>.<property>=<value>`
So for example with the following persistence.xml:
-{code:xml|title=persistence.xml}
-<persistence>
- <persistence-unit name="movie-unit">
- <provider>org.hibernate.ejb.HibernatePersistence</provider>
- <jta-data-source>movieDatabase</jta-data-source>
- <non-jta-data-source>movieDatabaseUnmanaged</non-jta-data-source>
- <properties>
- <property name="hibernate.hbm2ddl.auto" value="create-drop"/>
- <property name="hibernate.max_fetch_depth" value="3"/>
- </properties>
- </persistence-unit>
-</persistence>
+ <persistence>
+ <persistence-unit name="movie-unit">
+ <provider>org.hibernate.ejb.HibernatePersistence</provider>
+ <jta-data-source>movieDatabase</jta-data-source>
+ <non-jta-data-source>movieDatabaseUnmanaged</non-jta-data-source>
+ <properties>
+ <property name="hibernate.hbm2ddl.auto" value="create-drop"/>
+ <property name="hibernate.max_fetch_depth" value="3"/>
+ </properties>
+ </persistence-unit>
+ </persistence>
- You can override and add persistence unit properties in your test case.
+You can override and add persistence unit properties in your test case.
There are currently no facilities for removing them (if you have a need for
that let us know -- it hasn't really come up so far).
-Properties p = new Properties();
-p.put(Context.INITIAL_CONTEXT_FACTORY,"org.apache.openejb.client.LocalInitialContextFactory");
+ Properties p = new Properties();
+ p.put(Context.INITIAL_CONTEXT_FACTORY,"org.apache.openejb.client.LocalInitialContextFactory");
-p.put("movie-unit.hibernate.hbm2ddl.auto", "update");
-p.put("movie-unit.hibernate.dialect", "org.hibernate.dialect.HSQLDialect");
+ p.put("movie-unit.hibernate.hbm2ddl.auto", "update");
+ p.put("movie-unit.hibernate.dialect", "org.hibernate.dialect.HSQLDialect");
-context = new InitialContext(p);
+ context = new InitialContext(p);
- The overriding order is as follows: 1 = highest, 4 = lowest.
+The overriding order is as follows: 1 = highest, 4 = lowest.
# InitialContext properties
# jndi.properties from the classpath
# System properties
# persistence.xml properties
- By default there are no overrides in 1-3, so #4 is the only source of
+By default there are no overrides in 1-3, so #4 is the only source of
information.
- In the above example there would be exactly three properties for the
-"movie-unit" persistence unit:
- - hibernate.hbm2ddl.auto = update
- - hibernate.max_fetch_depth = 3
- - hibernate.dialect = org.hibernate.dialect.HSQLDialect
+In the above example there would be exactly three properties for the "movie-unit" persistence unit:
+
+ - hibernate.hbm2ddl.auto = update
+ - hibernate.max_fetch_depth = 3
+ - hibernate.dialect = org.hibernate.dialect.HSQLDialect
- These properties would be passed by OpenEJB directly to the persistence
+These properties would be passed by OpenEJB directly to the persistence
provider (in this case Hibernate). With one exception OpenEJB does not
understand or modify these properties. Details on that one exception
below.
h3. No need to specify a "transaction lookup" property
- All vendors have such a property for getting a reference to the container's
+All vendors have such a property for getting a reference to the container's
TransactionManager and nothing works if this is not set correctly to the
OpenEJB specific class. To make the lives of users easier, OpenEJB will
take the liberty of setting it for you.
Modified: openejb/site/trunk/content/local-client-injection.mdtext
URL: http://svn.apache.org/viewvc/openejb/site/trunk/content/local-client-injection.mdtext?rev=1144987&r1=1144986&r2=1144987&view=diff
==============================================================================
--- openejb/site/trunk/content/local-client-injection.mdtext (original)
+++ openejb/site/trunk/content/local-client-injection.mdtext Sun Jul 10 23:52:50 2011
@@ -81,6 +81,6 @@ If you encounter this try setting this o
annotations will be treated specially and always loaded by the parent
classloader
-{quote}openejb.tempclassloader.skip=annotations{quote}
+`openejb.tempclassloader.skip=annotations`