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 2018/11/30 23:04:28 UTC

[13/20] tomee git commit: Docs old and new

http://git-wip-us.apache.org/repos/asf/tomee/blob/f779264f/docs/ejbd-transport.mdtext
----------------------------------------------------------------------
diff --git a/docs/ejbd-transport.mdtext b/docs/ejbd-transport.mdtext
new file mode 100644
index 0000000..f6eedb5
--- /dev/null
+++ b/docs/ejbd-transport.mdtext
@@ -0,0 +1,132 @@
+Title: Ejbd Transport
+
+The Ejbd Transport allows to remotely access EJBs that have a remote interface.
+Nevertheless it is not based on IIOP.
+
+Ejbd Transport is different using TomEE or OpenEJB.
+
+In OpenEJB it uses openejb http layer and ejbd is configured through ejbd service (same for ejbds).
+So to activate/deactivate them use conf/ejbd(s).properties files. You can set property disabled to true
+if you don't want them to be started.
+
+In TomEE the transport is the Tomcat one. It uses a servlet brought by TomEE webapp.
+Here is the servlet as defined in TomEE webapp:
+
+    <servlet>
+        <servlet-name>ServerServlet</servlet-name>
+        <servlet-class>org.apache.openejb.server.httpd.ServerServlet</servlet-class>
+    </servlet>
+
+    <servlet-mapping>
+        <servlet-name>ServerServlet</servlet-name>
+        <url-pattern>/ejb/*</url-pattern>
+    </servlet-mapping>
+
+
+You can easily remove it if you don't use remote EJBs. Another way is to deactivate the servlet
+using the "activated" init parameter of the servlet.
+
+Finally you can move this servlet in your own webapp if you want to use a provider url
+containing your webapp context. Simply copy paste the servlet definition in your web.xml
+and set the url mapping to what you want (let say /foo/*). Then use the provider url
+http://&lt;host&gt;:&lt;port&gt;/&lt;webapp context name&gt;/foo
+
+### Remote communication and serialization
+
+Remotely calling EJBs, independent of using Ejbd or other RMI/IIOP based protocols, involves serialization and deserialization of objects.
+Deserializing unknown content coming from an untrusted source imposes a security risk as the stream could be manipulated.
+A much publicized [vulnerability](http://www.kb.cert.org/vuls/id/576313) was found in the commons-collections library which allowed to remotely execute arbitrary code simply by deserializing instances of the class `InvokerTransformer`.
+
+To prevent this risk TomEE and the OpenEJB client since 1.7.4 before deserializing every object checks its class against a configurable blacklist and a whitelist.
+The default black list is defined as `*`, meaning that requests cannot be deserialized at all and the Ejbd transport in fact cannot be used.
+
+The blacklist and whitelist is configured via the system properties:
+
+- `tomee.serialization.class.whitelist`
+- `tomee.serialization.class.blacklist`
+
+You will also find these properties in [System Properties Listing](properties-listing.html)
+
+These rules apply for the whitelist:
+
+- The whitelist has a lower priority than the blacklist. That means a class that is part of the blacklist cannot be whitelisted and will always be refused.
+- If a whitelist is not defined, either by not defining the property at all or defining it with an empty value, every class is on the whitelist. In this case only the blacklist applies.
+- If a whitelist is defined it must be a comma separated list of prefixes of fully qualified class names. Then deserialization of an object fails if its class is not part of this whitelist. A class is on the whitelist if its fully qualified classname is prefixed by one of the values in the whitelist.
+
+These rules apply for the blacklist:
+
+- If the blacklist should be deactivated it must be configured to the value `-`. This will open your system to the serialization vulnerability if you don't configure a whitelist!
+- If the blacklist is not configured its default value is `org.codehaus.groovy.runtime.,org.apache.commons.collections.functors.,org.apache.xalan,java.lang.Process` so that for example the class `org.apache.commons.collections.functors.InvokerTransformer` cannot be deserialized.
+- If the blacklist is configured with an empty value the blacklist is effectively `*`, therefore preventing any Ejbd communication.
+- If you want to blacklist certain classes the property must be configured to a comma separated list of prefixes of fully qualified class names. A class is on the blacklist if its fully qualified classname is prefixed by one of the values in the blacklist.
+
+The default for `tomee.serialization.class.whitelist` is empty, the default for `tomee.serialization.class.blacklist` is `*` since TomEE 1.7.4.
+
+If an EJB request fails because a class is not whitelisted you will find this log entry:
+
+    WARN - "null OEJP/4.7" FAIL "Security error - foo.Bar is not whitelisted as deserializable, prevented before loading it." - Debug for StackTrace
+
+If you trust this class and want to support serialization in remote communication you have to configure these properties appropriately both on server side as well as on client side.
+
+If you only want to support serialization of the classes `foo.Bar` and `foo.Baz` you can configure the properties like this:
+
+    tomee.serialization.class.whitelist = foo.Bar,foo.Baz
+    tomee.serialization.class.blacklist = -
+
+If you trust all classes in the package `foo` define the properties like this:
+
+    tomee.serialization.class.whitelist = foo.
+    tomee.serialization.class.blacklist = -
+
+(Don't forget the trailing `.` after foo, as it will also whitelist all classes in the package `foo2` otherwise.)
+
+If you trust all classes in the package `foo` except the class `foo.Bar` you have to configure the properties like this:
+
+    tomee.serialization.class.whitelist = foo.
+    tomee.serialization.class.blacklist = foo.Bar
+
+
+
+#### Revert to behavior of TomEE 1.7.3
+
+TomEE 1.7.3 already contained a fixed blacklist that was not configurable and contained the packages org.codehaus.groovy.runtime, org.apache.commons.collections.functors and org.apache.xalan including subpackages and the class java.lang.Process.
+If you know that your applications runs on TomEE 1.7.3 but does not on TomEE 1.7.4 showing the aforementioned log message, you can define the configuration so that the serialization will work in the same way as it did with TomEE 1.7.3:
+
+    tomee.serialization.class.whitelist = 
+    tomee.serialization.class.blacklist = org.codehaus.groovy.runtime.,org.apache.commons.collections.functors.,org.apache.xalan,java.lang.Process
+
+Please note that with this configuration your server may be vulnerable to Java serialization attacks not yet identified by the Zero Day initiative. 
+Also note that the following versions of the affected libraries have been patched and approved by the Zero Day initiative and *may* be safe to deserialize.
+
+- Groovy 2.4.4
+- Commons Collections 3.2.2
+- Xalan 2.7.2
+
+As Ejbd transport is tunneled over HTTP please make sure that the `ServerServlet` is not publicly accessible.
+When the applications running on TomEE do not package the `ServerServlet` themselves ensure that the URL http://&lt;host&gt;:&lt;port&gt;/tomee/ejb is not accessible from untrusted sources.
+
+If your applications package declare it in their own web.xml make sure that the respective URL is not accessible from untrusted sources.
+
+#### Revert to behavior of TomEE 1.7.2
+
+TomEE 1.7.2 did not have any kind of blacklist when deserializing objects over Ejbd.
+If you want to revert to this behavior you can simply deactivate the blacklist with this configuration:
+
+    tomee.serialization.class.whitelist =
+    tomee.serialization.class.blacklist = -
+
+Note that this configuration makes your system highly vulnerable to serialization attacks!
+Consider your system as unsafe!
+
+#### Remote communication and Arquillian tests
+
+The mechanism described above principally also works when running Arquillian tests.
+As the Ejbd transport is already used for deploying applications all Arquillian tests would fail with the default settings.
+
+Therefore the TomEE Arquillian adapter automatically starts the container so that all classes except for a set of well-know dangerous classes are whitelisted.
+
+As Ejbd is by default disabled since TomEE 7.0.0, the TomEE Arquillian adapter automatically activates it when starting a remote container.
+
+#### Remote communication and the TomEE Maven Plugin
+
+The same mentioned above on Arquillian and TomEE is also valid when using the TomEE Maven Plugin.
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/tomee/blob/f779264f/docs/embedded-and-remotable.mdtext
----------------------------------------------------------------------
diff --git a/docs/embedded-and-remotable.mdtext b/docs/embedded-and-remotable.mdtext
new file mode 100644
index 0000000..916432c
--- /dev/null
+++ b/docs/embedded-and-remotable.mdtext
@@ -0,0 +1,179 @@
+Title: Embedded and Remotable
+<a name="EmbeddedandRemotable-Overview"></a>
+# Overview
+
+This example shows how to use OpenEJB3's remoting capabilities in an
+embedded scenario.  By remoting we mean that you wish to allow *clients in
+other vms* access your ejbs.  _Note, you do not need to go to this extreme
+to unit test ejbs with remote interfaces._
+
+The basic recipe is the same for a standard embedded scenario but with
+these added ingreditents:
+
+  * *openejb.embedded.remotable* property
+  * *openejb-ejbd* jar
+
+While creating the InitialContext, pass in the openejb.embedded.remotable
+property with the value of "true".  When this is seen by the
+LocalInitialContextFactory, it will boot up the Server ServiceManager in
+the VM which will in turn look for ServerServices in the classpath.
+
+Provided you have the openejb-ejbd jar in your classpath along with it's
+dependencies (openejb-server, openejb-client, openejb-core), then those
+services will be brought online and remote clients will be able to connect
+into your vm and invoke beans.
+
+If you want to add more ServerServices such as the http version of the ejbd
+protocol you'd simply add the openejb-httpejbd jar to your classpath.  A
+number of ServerServices are available currently:
+
+  * openejb-ejbd
+  * openejb-http
+  * openejb-telnet
+  * openejb-derbynet
+  * openejb-hsql
+  * openejb-activemq
+
+_The source for this example is in the "telephone-stateful" directory
+located in the [openejb-examples.zip](openejb:download.html)
+ available on the [download page](http://tomee.apache.org/downloads.html)._
+
+{note}
+If your goal is simply to unit test beans with remote interfaces, this is
+*not* the right example for you.  The LocalInitialContextFactory completely
+supports remote interfaces and all spec required pass-by-value
+(serialization) semantics without the need for network sockets.  This
+example shows the use of OpenEJB in an embedded environment where
+connection *outside* the 
+vm is required.{note}
+
+<a name="EmbeddedandRemotable-TheCode"></a>
+# The Code
+
+For this example we have a simple Stateful bean called TelephoneBean as
+defined below.	As a simple way of demonstrating the state we have to
+methods: speak and listen.  You call _speak_ and pass in some text, then
+you call _listen_ to get your answer.
+
+<a name="EmbeddedandRemotable-bean"></a>
+## bean
+
+{snippet:id=code|url=openejb3/examples/telephone-stateful/src/main/java/org/superbiz/telephone/TelephoneBean.java|lang=java}
+
+<a name="EmbeddedandRemotable-businessinterface"></a>
+## business interface
+
+{snippet:id=code|url=openejb3/examples/telephone-stateful/src/main/java/org/superbiz/telephone/Telephone.java|lang=java}
+
+{tip:title=EJB3 Notes}
+The bean class uses the annotation *@Remote* but does not specify a list of
+interfaces as is normally required.  Per EJB3 rules, if the bean implements
+exactly *one business interface* it may use @Remote with no other values
+and that business interface is then implied to be a remote business
+interface.  The same rule applies to identical usage of @Local.
+
+The critical thing to know is that if you add another interface the rules
+change and require that you specify both interfaces in the @Remote
+annotation as in @Remote(\{Telephone.class, SecondInterface.class\}).
+{tip}
+
+<a name="EmbeddedandRemotable-Embedding"></a>
+# Embedding
+
+We're going to embed OpenEJB3 into a plain JUnit TestCase as a simple means
+of demonstrating the remote capabilities.  We'll do the embedding in our
+test setUp method, then will make two test methods: 
+ - one for invoking the bean's remote interface via the
+*LocalInitialContextFactory* which goes straight against the embedded
+container system
+ - one for invoking the bean's remote interface via the
+*RemoteInitialContextFactory* which connects to a Socket and communicates
+to the embedded container system over the ejbd protocol.
+
+<a name="EmbeddedandRemotable-setUp"></a>
+## setUp
+
+{snippet:id=setup|url=openejb3/examples/telephone-stateful/src/test/java/org/superbiz/telephone/TelephoneTest.java|lang=java}
+
+## LocalInitialContextFactory: making in-vm calls to a remote business
+interface
+
+{snippet:id=localcontext|url=openejb3/examples/telephone-stateful/src/test/java/org/superbiz/telephone/TelephoneTest.java|lang=java}
+
+## RemoteInitialContextFactory: making networked calls to a remote
+business interface
+
+This is the part you would want to do in apps that are running a different
+VM than the one in which the ejb container is embedded.  These "client" VMs
+need only have the the *openejb-client jar* in their classpath and connect
+to OpenEJB via the RemoteInitialContextFactory like any other remote EJB
+client.
+
+{snippet:id=remotecontext|url=openejb3/examples/telephone-stateful/src/test/java/org/superbiz/telephone/TelephoneTest.java|lang=java}
+
+<a name="EmbeddedandRemotable-Mavensetup"></a>
+#  Maven setup
+
+{snippet:id=desc|url=openejb3/examples/telephone-stateful/pom.xml}
+
+{snippet:id=openejbdep|url=openejb3/examples/telephone-stateful/pom.xml|lang=xml}
+
+
+<a name="EmbeddedandRemotable-Running"></a>
+#  Running
+
+Running the example is fairly simple.  In the "telephone-stateful"
+directory of the [examples zip](openejb:download.html)
+, just run:
+
+$ mvn clean install
+
+Which should create output like the following.
+
+
+    -------------------------------------------------------
+     T E S T S
+    -------------------------------------------------------
+    Running org.superbiz.telephone.TelephoneTest
+    Apache OpenEJB 3.0    build: 20080408-04:13
+    http://tomee.apache.org/
+    INFO - openejb.home =
+/Users/dblevins/work/openejb-3.0/examples/telephone-stateful
+    INFO - openejb.base =
+/Users/dblevins/work/openejb-3.0/examples/telephone-stateful
+    INFO - Configuring Service(id=Default Security Service,
+type=SecurityService, provider-id=Default Security Service)
+    INFO - Configuring Service(id=Default Transaction Manager,
+type=TransactionManager, provider-id=Default Transaction Manager)
+    INFO - Configuring Service(id=Default JDK 1.3 ProxyFactory,
+type=ProxyFactory, provider-id=Default JDK 1.3 ProxyFactory)
+    INFO - Found EjbModule in classpath:
+/Users/dblevins/work/openejb-3.0/examples/telephone-stateful/target/classes
+    INFO - Configuring app:
+/Users/dblevins/work/openejb-3.0/examples/telephone-stateful/target/classes
+    INFO - Configuring Service(id=Default Stateful Container, type=Container,
+provider-id=Default Stateful Container)
+    INFO - Auto-creating a container for bean TelephoneBean:
+Container(type=STATEFUL, id=Default Stateful Container)
+    INFO - Loaded Module:
+/Users/dblevins/work/openejb-3.0/examples/telephone-stateful/target/classes
+    INFO - Assembling app:
+/Users/dblevins/work/openejb-3.0/examples/telephone-stateful/target/classes
+    INFO - Jndi(name=TelephoneBeanRemote) --> Ejb(deployment-id=TelephoneBean)
+    INFO - Created Ejb(deployment-id=TelephoneBean, ejb-name=TelephoneBean,
+container=Default Stateful Container)
+    INFO - Deployed
+Application(path=/Users/dblevins/work/openejb-3.0/examples/telephone-stateful/target/classes)
+      ** Starting Services **
+      NAME		       IP	       PORT  
+      ejbd		       127.0.0.1       4201  
+      admin thread	       127.0.0.1       4200  
+    -------
+    Ready!
+    Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.89 sec
+    
+    Results :
+    
+    Tests run: 2, Failures: 0, Errors: 0, Skipped: 0
+
+

http://git-wip-us.apache.org/repos/asf/tomee/blob/f779264f/docs/embedded-configuration.mdtext
----------------------------------------------------------------------
diff --git a/docs/embedded-configuration.mdtext b/docs/embedded-configuration.mdtext
new file mode 100644
index 0000000..601719d
--- /dev/null
+++ b/docs/embedded-configuration.mdtext
@@ -0,0 +1,132 @@
+Title: Embedded Configuration
+
+<a name="EmbeddedConfiguration-Defaults,OverridesandOrder"></a>
+#  Defaults, Overrides and Order
+
+When booting up OpenEJB for testing via the `LocalInitialContextFactory`
+or the newer `EJBContainer.createEJBContainer()` API part of EJB 3.1 there
+is quite a bit of flexibility to how things are configured.
+
+OpenEJB will function fine with no configuration at all and will happily
+create things as needed and select defaults for everything.  So in a real
+sense configuration is all about overriding those defaults.  There are
+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**
+
+1. InitialContext properties
+1. jndi.properties from the classpath
+1. System properties
+1. openejb.xml declarations/properties
+1. 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)
+
+}
+}
+
+It opens up some interesting possibilities in how you configure your
+environment.  You could do 100% of your configuration in your test case via
+InitialContext propertes, or you could do say 80% in a jndi.properties file
+or openejb.xml file and 20% in your test case via InitialContext
+properties.  You can put 100% of your configuration in a `jndi.properties` or
+`openejb.xml` file and override them via `InitialContext` properties.
+
+You can manage the properties how you wish and there is no need for
+redundant definitions if you do not want them.
+
+<a name="EmbeddedConfiguration-Whatisconfigurable?"></a>
+#  What is configurable?
+
+Everything you can configure via an openejb.xml (minus the <Deployment>
+element) can be configured/overridden via properties. See [Configuring Containers in Tests](configuring-containers-in-tests.html)
+ and [Configuring DataSources in Tests](configuring-datasources-in-tests.html).
+
+Everything in your logging.properties can be configured/overridden via
+properties.  See [Configuring Logging in Tests](configuring-logging-in-tests.html).
+
+The properties of persistence units declared in a persistence.xml can be
+configured/overridden via properties.  See [Configuring PersistenceUnits in Tests](configuring-persistenceunits-in-tests.html).
+
+OpenEJB has many flags that can also be set as properties.  See [OpenEJB Properties](properties-listing.html)
+ for details on those.
+
+<a name="EmbeddedConfiguration-ExampleofusingInitialContextproperties"></a>
+# Example of using InitialContext properties
+
+
+    Properties p = new Properties();
+    
+    // set the initial context factory
+    p.put("java.naming.factory.initial ", "org.apache.openejb.client.LocalInitialContextFactory");
+    
+    // change some logging
+    p.put("log4j.category.OpenEJB.options ", " debug");
+    p.put("log4j.category.OpenEJB.startup ", " debug");
+    p.put("log4j.category.OpenEJB.startup.config ", " debug");
+    
+    // create some resources
+    p.put("movieDatabase", "new://Resource?type=DataSource");
+    p.put("movieDatabase.JdbcDriver ", " org.hsqldb.jdbcDriver");
+    p.put("movieDatabase.JdbcUrl ", " jdbc:hsqldb:mem:moviedb");
+    
+    // override properties on your "movie-unit" persistence unit
+    p.put("movie-unit.hibernate.dialect ", "org.hibernate.dialect.HSQLDialect");
+    
+    // set some openejb flags
+    p.put("openejb.jndiname.format ", " {ejbName}/{interfaceClass}");
+    p.put("openejb.descriptors.output ", " true");
+    p.put("openejb.validation.output.level ", " verbose");
+    
+    InitialContext initialContext = new InitialContext(p);
+
+
+<a name="EmbeddedConfiguration-Exampleofusingjndi.properties"></a>
+# Example of using jndi.properties
+
+Here's an example of the same properties being specified via a
+`jndi.properties file`.  This file just needs to be placed in the 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.
+
+    # set the initial context factory
+    java.naming.factory.initial = org.apache.openejb.client.LocalInitialContextFactory
+    
+    # change some logging
+    log4j.category.OpenEJB.options = debug
+    log4j.category.OpenEJB.startup = debug
+    log4j.category.OpenEJB.startup.config = debug
+    
+    # create some resources
+    movieDatabase = new://Resource?type=DataSource
+    movieDatabase.JdbcDriver = org.hsqldb.jdbcDriver
+    movieDatabase.JdbcUrl = jdbc:hsqldb:mem:moviedb
+    
+    # override properties on your "movie-unit" persistence unit
+    movie-unit.hibernate.dialect = org.hibernate.dialect.HSQLDialect
+    
+    # set some openejb flags
+    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:
+
+
+    Properties p = new Properties();
+    
+    p.put("openejb.validation.output.level ", " medium");
+    
+    InitialContext initialContext = new InitialContext(p);
+

http://git-wip-us.apache.org/repos/asf/tomee/blob/f779264f/docs/embedding.mdtext
----------------------------------------------------------------------
diff --git a/docs/embedding.mdtext b/docs/embedding.mdtext
new file mode 100644
index 0000000..d6f26e2
--- /dev/null
+++ b/docs/embedding.mdtext
@@ -0,0 +1,26 @@
+Title: Embedding
+The basic process for embedding OpenEJB:
+
+1. Add the OpenEJB libraries to your classpath
+1. Ensure your EJB modules are discoverable
+1. Use the LocalInitialContextFactory to boot OpenEJB
+
+
+<a name="Embedding-Importantdocs"></a>
+## Important docs
+
+- [Application discovery via the classpath](application-discovery-via-the-classpath.html)
+- [Embedded Configuration](embedded-configuration.html)
+- [Configuring DataSources in Tests](configuring-datasources-in-tests.html)
+- [Configuring PersistenceUnits in Tests](configuring-persistenceunits-in-tests.html)
+- [Configuring Containers in Tests](configuring-containers-in-tests.html)
+- [Configuring Logging in Tests](configuring-logging-in-tests.html)
+- [Alternate Descriptors](alternate-descriptors.html)
+- [Unit Testing Transactions](unit-testing-transactions.html)
+- [TestCase with TestBean inner-class](testcase-with-testbean-inner-class.html)
+- [TestCase Injection (@LocalClient)](local-client-injection.html)
+
+<a name="Embedding-Examples"></a>
+## Examples
+
+{include:Examples Table}

http://git-wip-us.apache.org/repos/asf/tomee/blob/f779264f/docs/failover-logging.mdtext
----------------------------------------------------------------------
diff --git a/docs/failover-logging.mdtext b/docs/failover-logging.mdtext
new file mode 100644
index 0000000..160069c
--- /dev/null
+++ b/docs/failover-logging.mdtext
@@ -0,0 +1,38 @@
+Setting the following logging category to "debug" will open up some new logging information.
+
+    log4j.category.OpenEJB.server.discovery = debug
+
+Or more specifically as:
+
+    log4j.category.OpenEJB.server.discovery.multipoint = debug
+    log4j.category.OpenEJB.server.discovery.multicast = debug
+
+The nature of the debug output is to display all configuration information at startup:
+
+    DEBUG - Using default 'heart_rate=500'
+    DEBUG - Using default 'max_missed_heartbeats=10'
+    DEBUG - Using default 'max_reconnect_delay=30000'
+    DEBUG - Using default 'reconnect_delay=5000'
+    DEBUG - Using default 'exponential_backoff=0'
+    DEBUG - Using default 'max_reconnect_attempts=10'
+    INFO - Created Tracker{group='default', groupPrefix='default:', heartRate=500, maxMissedHeartbeats=10, reconnectDelay=5000, maxReconnectDelay=30000, maxReconnectAttempts=10, exponentialBackoff=0, useExponentialBackOff=false, registeredServices=0, discoveredServices=0}
+
+Changing the configuration should reflect in the logging as follows:
+
+    INFO - Using 'heart_rate=200'
+    INFO - Using 'max_missed_heartbeats=2'
+    DEBUG - Using default 'max_reconnect_delay=30000'
+    DEBUG - Using default 'reconnect_delay=5000'
+    DEBUG - Using default 'exponential_backoff=0'
+    DEBUG - Using default 'max_reconnect_attempts=10'
+    INFO - Created Tracker{group='default', groupPrefix='default:', heartRate=200, maxMissedHeartbeats=2, reconnectDelay=5000, maxReconnectDelay=30000, maxReconnectAttempts=10, exponentialBackoff=0, useExponentialBackOff=false, registeredServices=0, discoveredServices=0}
+
+As well as any events at runtime:
+
+    DEBUG - Expired Service{uri=green://localhost:0, broadcastString='default:green://localhost:0&#39;} Timeout{lastSeen=-5005, threshold=5000}
+
+    DEBUG - Added Service{uri=green://localhost:0}
+
+    DEBUG - Removed Service{uri=green://localhost:0}
+
+

http://git-wip-us.apache.org/repos/asf/tomee/blob/f779264f/docs/faq.mdtext
----------------------------------------------------------------------
diff --git a/docs/faq.mdtext b/docs/faq.mdtext
new file mode 100644
index 0000000..dea9cf5
--- /dev/null
+++ b/docs/faq.mdtext
@@ -0,0 +1,96 @@
+Title: FAQ
+<a name="FAQ-&nbsp;General"></a>
+## &nbsp;General
+
+&nbsp;
+
+<a name="FAQ-WhatspecversiondoesOpenEJBsupport?"></a>
+### What spec version does OpenEJB support?
+
+OpenEJB supports the Enterprise JavaBeans 3.0 specification and previous
+versions 2.1, 2.0 and 1.1.
+
+<a name="FAQ-Idon'tplantouseEJBs,sowhywouldIembedOpenEJBintoTomcat."></a>
+###  I don't plan to use EJBs, so why would I embed OpenEJB into Tomcat.
+
+Adding OpenEJB to Tomcat gives servlets several new Java EE 5 capabilities
+such as JPA, JAX-WS, JMS, J2EE Connectors, transactions, and more as well
+as enhancing the injection features of Tomcat 6 to now support injection of
+JavaEE objects like Topics, Queues, EntityManagers, JMS
+ConnectionFactories, JavaMail Sessions, as well as simpler data types such
+as Dates, Classes, URI, URL, List, Map, Set, Properties, and more.  In the
+case of Tomcat 5.5 which doesn't support dependency injection at all, even
+more is gained.
+
+<a name="FAQ-CanIrunOpenEJBwithaJVMforanyvendor?"></a>
+### Can I run OpenEJB with a JVM for any vendor?
+
+The Sun, Mac, and IBM vms are regularly tested, however any vm should work.
+
+<a name="FAQ-WhichversionofJavaisrequiredtorunOpenEJB?"></a>
+### Which version of Java is required to run OpenEJB?
+
+Java versions 5 or 6, aka Java 1.5 or 1.6.
+
+<a name="FAQ-DoIneedApacheMaventoworkwithOpenEJB?"></a>
+### Do I need Apache Maven to work with OpenEJB?
+
+Definitely not. Most of the examples include both Maven and Ant build
+files.	OpenEJB is usable as a plain library, much like an embedded
+database like Derby, so it is usable in any application regardless if that
+application is run via Maven, Ant, Intellij, Eclipse, NetBeans, JUnit,
+TestNG, etc.
+
+### Can I start and stop OpenEJB from an IDE? If yes, which IDE is
+supported by OpenEJB?
+
+The short answer is yes.  The basic approach for all embedding scenarios is
+to 1) add OpenEJB to your classpath, and 2) construct your InitialContext
+using org.apache.openejb.client.LocalInitialContextFactory.  The
+LocalInitialContextFactory will boot OpenEJB in your vm and all ejb
+applications visible in the classpath will be deployed. See
+http://tomee.apache.org/embedding-openejb.html for details on how to
+embed openejb in your application and IDE.  See [Application discovery via the classpath](openejbx30:application-discovery-via-the-classpath.html)
+ for various ways to have your applications discovered. 
+
+
+###  During embedded testing, how can I externalize all my DataSource
+configuration? 
+
+Create an openejb.xml file in any directory that gets added to your test
+classpath. For maven, something that winds up directly under
+"target/classes/" or "target/test-classes/" will work just fine.  Then in
+your test case do this:
+
+       protected void setUp() throws Exception {
+           Properties properties = new Properties();
+           properties.setProperty(Context.INITIAL_CONTEXT_FACTORY, 
+"org.apache.openejb.client.LocalInitialContextFactory");
+    
+           URL config =
+this.getClass().getClassLoader().getResource("openejb.xml");
+           properties.setProperty("openejb.configuration",
+config.toExternalForm());
+    
+           initialContext = new InitialContext(properties);
+       }
+
+The file itself doesn't have to be called "openejb.xml", you could have a
+few different files like that for different testing scenarios each with a
+name that describes the basic setup.
+
+<a name="FAQ-Container-ManagedPersistence"></a>
+## Container-Managed Persistence
+
+<a name="FAQ-WhatenginedoesOpenEJBuseforCMP?"></a>
+### What engine does OpenEJB use for CMP?
+
+The CMP engine is written as a layer over JPA with OpenJPA doing the
+persistence work.
+
+<a name="FAQ-WhatistheformatfortheCMPmappingfiles?"></a>
+### What is the format for the CMP mapping files?
+
+The standard JPA mapping file and annotations are also used for CMP
+mappings.
+

http://git-wip-us.apache.org/repos/asf/tomee/blob/f779264f/docs/faq_openejb-jar.html.mdtext
----------------------------------------------------------------------
diff --git a/docs/faq_openejb-jar.html.mdtext b/docs/faq_openejb-jar.html.mdtext
new file mode 100644
index 0000000..82b03b7
--- /dev/null
+++ b/docs/faq_openejb-jar.html.mdtext
@@ -0,0 +1,2 @@
+Title: faq_openejb-jar.html
+Need Complete stes to deploy a bean using openejb

http://git-wip-us.apache.org/repos/asf/tomee/blob/f779264f/docs/features.mdtext
----------------------------------------------------------------------
diff --git a/docs/features.mdtext b/docs/features.mdtext
new file mode 100644
index 0000000..72b8e33
--- /dev/null
+++ b/docs/features.mdtext
@@ -0,0 +1 @@
+Title: Features

http://git-wip-us.apache.org/repos/asf/tomee/blob/f779264f/docs/from-glassfish-to-tomee.mdtext
----------------------------------------------------------------------
diff --git a/docs/from-glassfish-to-tomee.mdtext b/docs/from-glassfish-to-tomee.mdtext
new file mode 100644
index 0000000..b6aa58d
--- /dev/null
+++ b/docs/from-glassfish-to-tomee.mdtext
@@ -0,0 +1,3 @@
+# From Glassfish Application Server to TomEE (plus)
+
+This page aims at reporting feedback from users while migrating from Glassfish to Apache TomEE.

http://git-wip-us.apache.org/repos/asf/tomee/blob/f779264f/docs/functional-testing-with-openejb,-jetty-and-selenium.mdtext
----------------------------------------------------------------------
diff --git a/docs/functional-testing-with-openejb,-jetty-and-selenium.mdtext b/docs/functional-testing-with-openejb,-jetty-and-selenium.mdtext
new file mode 100644
index 0000000..78a3523
--- /dev/null
+++ b/docs/functional-testing-with-openejb,-jetty-and-selenium.mdtext
@@ -0,0 +1,236 @@
+Title: Functional testing with OpenEJB, Jetty and Selenium
+Obviously, OpenEJB is great for unit testing EJBs, but I wondered whether I
+might also be able to use this embedded functionality to functionally test
+my application. You can use tools like Selenium, or HtmlUnit to run
+functional tests as if the user were sat at their browser typing text, and
+clicking links and buttons. This however means you have to have your app
+running on your app server, and you need to have consistent test data -
+otherwise a test might pass on one developers machine, but fail on another.
+Here's one approach that you could take to completely deploy your webapp
+within a test, and functionally test it with a tool like Selenium. There's
+also some sample code demonstrating this, available [here](http://people.apache.org/~jgallimore/PersonApp.zip)
+.
+
+
+<a name="FunctionaltestingwithOpenEJB,JettyandSelenium-Creatinganembeddedserver"></a>
+### Creating an embedded server
+
+I created a class to start my embedded OpenEJB and Jetty instances and
+configure them to see the EJB and WAR modules of my application:
+
+
+    public class EmbeddedServer {
+        private static EmbeddedServer instance = new EmbeddedServer();
+        private Server server;
+    
+        private EmbeddedServer() {
+    	try {
+    	    // initialize OpenEJB & add some test data
+    	    Properties properties = new Properties();
+    	    properties.put(Context.INITIAL_CONTEXT_FACTORY, "org.apache.openejb.client.LocalInitialContextFactory");
+    	    InitialContext ic = new InitialContext(properties);
+    	    PeopleFacade facade = (PeopleFacade) ic.lookup("PeopleFacadeEJBRemote");
+    	    new TestFixture(facade).addTestData();
+    
+    	    // setup web app
+    	    WebAppContext context = new WebAppContext();
+    	    context.setWar(computeWarPath());
+    	    InitialContext initialContext = setupJndi(context);
+    
+    	    // start the server
+    	    context.setServletHandler(new EmbeddedServerServletHandler(initialContext));
+    	    context.setContextPath("/");
+    	    server = new Server(9091);
+    	    server.addHandler(context);
+    
+    	    server.start();
+    	} catch (Exception e) {
+    	    e.printStackTrace();
+    	}
+        }
+    
+        private InitialContext setupJndi(WebAppContext context) throws NamingException {
+    	// setup local JNDI
+    	InitialContext initialContext = new InitialContext();
+    	WebApp webApp = getWebApp(context);
+    	Collection<EjbRef> refs = webApp.getEjbRef();
+    	for (EjbRef ref : refs) {
+    	    String ejbLink = ref.getEjbLink();
+    
+    	    // get enterprise bean info
+    	    EnterpriseBeanInfo beanInfo = new EJBHelper().getEJBInfo(ejbLink);
+    	    if (beanInfo.jndiNames != null && beanInfo.jndiNames.size() > 0) {
+    		String jndiName = "java:openejb/ejb/" + beanInfo.jndiNames.get(0);
+    		initialContext.bind("java:comp/env/" + ref.getEjbRefName(), new LinkRef(jndiName));
+    	    }
+    	}
+    	return initialContext;
+        }
+    
+        private String computeWarPath() {
+    	String currentPath = new File(".").getAbsolutePath();
+    	String warPath;
+    
+            String[]  pathParts = currentPath.split("(\\\\|/)+");
+    
+    	int webPart = Arrays.asList(pathParts).indexOf("PersonWEB");
+    	if (webPart == -1) {
+    	    warPath = "PersonWEB/src/main/webapp";
+    	} else {
+    	    StringBuffer buffer = new StringBuffer();
+    
+    	    for (int i = 0; i < webPart; i++) {
+                    buffer.append(pathParts[i]);
+    		buffer.append(File.separator);
+    	    }
+    
+    	    buffer.append("PersonWEB/src/main/webapp");
+    	    warPath = buffer.toString();
+    	}
+    	return warPath;
+        }
+    
+        public static EmbeddedServer getInstance() {
+    	return instance;
+        }
+    
+        public Server getServer() {
+    	return server;
+        }
+    
+        public static void main(String[]  args) {
+    	try {
+    	    EmbeddedServer.getInstance().getServer().join();
+    	} catch (Exception e) {
+    	    e.printStackTrace();
+    	}
+        }
+    
+        private WebApp getWebApp(WebAppContext context) {
+    	WebApp webApp = null;
+    
+    	try {
+    	    FileInputStream is = new FileInputStream(new File(context.getWar() + "/WEB-INF/web.xml").getAbsolutePath());
+    	    webApp = (WebApp) JaxbJavaee.unmarshal(WebApp.class, is);
+    	} catch (Exception e) {
+    	    e.printStackTrace();
+    	}
+    	return webApp;
+        }
+    } 
+
+
+This class sets up an embedded instance of Jetty, running on port 9091.
+You'll notice the setupJndi() method. This looks through the ejb-ref
+entries in web.xml (which we deserialize using the openejb-jee library),
+and adds relevant LinkRefs to the JNDI tree, so you can lookup beans using
+the java:comp/env/bean format. I've added a main() method here for
+convenience, so you can run this straight from an IDE, and record tests
+using tools like the Selenium Firefox plugin.
+
+<a name="FunctionaltestingwithOpenEJB,JettyandSelenium-Supporting@EJBDependencyinjection"></a>
+### Supporting @EJB Dependency injection
+
+In the last code sample, we also set up a custom ServletHandler in Jetty -
+this is to perform dependency injection. The custom ServletHandler looks
+like this:
+
+
+    public class EmbeddedServerServletHandler extends ServletHandler {
+        private InitialContext initialContext;
+    
+        public EmbeddedServerServletHandler(InitialContext initialContext) {
+    	this.initialContext = initialContext;
+        }
+    
+        public Servlet customizeServlet(Servlet servlet) throws Exception {
+    	Class<? extends Servlet> servletClass = servlet.getClass();
+            Field[]
+ declaredFields = servletClass.getDeclaredFields();
+    
+    	for (Field declaredField : declaredFields) {
+                Annotation[]
+ annotations = declaredField.getAnnotations();
+    
+    	    for (Annotation annotation : annotations) {
+    		if (EJB.class.equals(annotation.annotationType())) {
+    		    // inject into this field
+    		    Class<?> fieldType = declaredField.getType();
+    		    EnterpriseBeanInfo beanInfo = getBeanFor(fieldType);
+    		    if (beanInfo == null) {
+    			continue;
+    		    }
+                       
+    		    String jndiName = "java:openejb/ejb/" + beanInfo.jndiNames.get(0);
+    		    Object o = initialContext.lookup(jndiName);
+    
+    		    declaredField.setAccessible(true);
+    		    declaredField.set(servlet, o);
+    		}
+    	    }
+    	}
+    
+    	return super.customizeServlet(servlet);
+        }
+    
+        private EnterpriseBeanInfo getBeanFor(Class<?> fieldType) {
+    	return new EJBHelper().getBeanInfo(fieldType);
+        }
+    } 
+    
+
+
+This looks up deployed beans that match the field type, and uses reflection
+to set the field.
+
+<a name="FunctionaltestingwithOpenEJB,JettyandSelenium-WritingaFunctionaltest"></a>
+### Writing a Functional test
+
+We can now write a functional test. I use a base abstract class to make
+sure the Embedded server is running, and start Selenium:
+
+
+    public abstract class FunctionalTestCase extends TestCase {
+        protected DefaultSelenium selenium;
+    
+        protected void setUp() throws Exception {
+    	super.setUp();
+    	EmbeddedServer.getInstance();
+    	selenium = new DefaultSelenium("localhost", 4444, "*iexplore", "http://localhost:9091/");
+    	selenium.start();
+        }
+    
+        protected void tearDown() throws Exception {
+    	selenium.stop();
+        }
+    }
+
+
+and I can then I write a test like this:
+
+
+    public class AddPersonTest extends FunctionalTestCase {
+        public void testShouldAddAPerson() throws Exception {
+    	selenium.open("/People");
+    	selenium.type("firstname", "Jonathan");
+    	selenium.type("lastname", "Gallimore");
+            selenium.click("//input[@name='add' and @value='Add']");
+    	selenium.waitForPageToLoad("30000");
+    	selenium.type("filter", "gallimore");
+    	selenium.click("submit");
+    	selenium.waitForPageToLoad("30000");
+            assertEquals(1, selenium.getXpathCount("//div[@id='people']/ul/li").intValue());
+            assertEquals("Jonathan Gallimore", selenium.getText("//div[@id='people']/ul/li[1]"));
+    
+        }
+    } 
+
+
+<a name="FunctionaltestingwithOpenEJB,JettyandSelenium-Samplecode"></a>
+### Sample code
+
+I've made a sample project which demonstrates this, source is available [here](http://people.apache.org/~jgallimore/PersonApp.zip)
+. You'll need Maven to build it, and you can build it and run the tests by
+running 'mvn clean install'. If want to run the tests from your IDE, you'll
+need to have a Selenium server running, which you can do by running 'mvn
+selenium:start-server'. 

http://git-wip-us.apache.org/repos/asf/tomee/blob/f779264f/docs/generating-ejb-3-annotations.mdtext
----------------------------------------------------------------------
diff --git a/docs/generating-ejb-3-annotations.mdtext b/docs/generating-ejb-3-annotations.mdtext
new file mode 100644
index 0000000..4f849f8
--- /dev/null
+++ b/docs/generating-ejb-3-annotations.mdtext
@@ -0,0 +1,57 @@
+Title: Generating EJB 3 annotations
+<a name="GeneratingEJB3annotations-GeneratingEJB3annotations"></a>
+# Generating EJB 3 annotations
+
+The OpenEJB Eclipse plugin is able to provide some assistance in helping
+you migrate EJB 2.x projects to EJB 3.0, by analyzing your ejb-jar.xml
+file, and adding EJB annotations to your source code. This page will show
+you how to use this functionality.
+
+First of all you will need to add the EJB 3.0 API jars to the classpath of
+your project. If you are using Maven, you can add the following to your POM
+(you will need to update your Eclipse project using mvn eclipse:eclipse
+afterwards)
+
+
+      <dependencies>
+        ...
+        <dependency>
+          <groupId>org.apache.openejb</groupId>
+          <artifactId>javaee-api</artifactId>
+          <version>5.0-1</version>
+          <scope>provided</scope>
+        </dependency>
+      </dependencies>
+
+
+Alternatively, import the API jars into your project, and add them to your
+build path.
+
+Next, click the 'OpenEJB' menu on the menubar, and select 'Generate
+Annotations'.
+
+!http://www.jrg.me.uk/openejb/annotations_step_1.jpg!
+
+Select the project you would like to work with, if it isn't already
+selected. Click 'Next'.
+
+!http://www.jrg.me.uk/openejb/annotations_step_2.jpg!
+
+Select your ejb-jar.xml and (optionally) your openejb-jar.xml files. Select
+or deselect the other options as appropriate, and select 'Next'.
+
+Options:
+
+    * Alter SessionBean interfaces - This option makes your session beans
+implement your remote / local interfaces as opposed to
+javax.ejb.SessionBean, and stops your remote / local interfaces extending
+javax.ejb.EJBObject.
+    * Add @Remote and @RemoteHome annotations - This adds @Remote and
+@RemoteHome annotations appropriately
+    * Convert entity beans to POJOs - This options converts abstract CMP
+classes to POJOs generating simple getters and setters.
+
+!http://www.jrg.me.uk/openejb/annotations_step_3.jpg!
+
+Review the changes that the plugin will make to your source code. Uncheck
+any changes you don't want to apply, and click 'Finish'.

http://git-wip-us.apache.org/repos/asf/tomee/blob/f779264f/docs/getting-started.mdtext
----------------------------------------------------------------------
diff --git a/docs/getting-started.mdtext b/docs/getting-started.mdtext
new file mode 100644
index 0000000..e3b8ab1
--- /dev/null
+++ b/docs/getting-started.mdtext
@@ -0,0 +1,169 @@
+Title: Getting Started
+##The following instructions are written using Eclipse 3.2. We will
+refer to the install location of OpenEJB as OPENEJB_HOME
+
+Here are some basic steps you need to perform to get started with OpenEJB
+1. Download and install OpenEJB
+1. Setup your development environment
+1. Write an EJB
+1. Write an EJB client
+1. Start the server
+1. Deploy the EJB
+1. Run the client
+1. Stop the server
+
+> 
+
+<a name="GettingStarted-&nbsp;1.DownloadandInstallOpenEJB"></a>
+##1. Download and Install OpenEJB
+
+Follow these&nbsp;[instructions](http://cwiki.apache.org/confluence/display/OPENEJB/Quickstart)
+
+<a name="GettingStarted-&nbsp;2.Setupyourdevelopmentenvironment"></a>
+##2. Setup your development environment
+
+
+<a name="GettingStarted-&nbsp;Eclipse"></a>
+###Eclipse
+
+- Open eclipse and create a new java project. Name it EJBProject
+- Add the following jars to the build path of your project
+-- OPENEJB_HOME/lib/geronimo-ejb_3.0_spec-1.0.jar
+- Now create another project named EJBClient. This is where we will write a test client
+- Add the following jars to the build path of this project
+-- OPENEJB_HOME/lib/openejb-client-3.0.0-SNAPSHOT.jar
+- Add the EJBProject to the classpath of the EJBClient project
+
+<a name="GettingStarted-&nbsp;3.StarttheServer"></a>
+##3. Start the Server
+
+Open the command prompt and run the following command:
+
+    d:\openejb-3.0.0-SNAPSHOT\bin\openejb start
+
+You will get the following message on the console:
+
+    D:\openejb-3.0.0-SNAPSHOT>bin\openejb start
+    Apache OpenEJB 3.0.0-SNAPSHOT	 build: 20070830-07:53
+    http://tomee.apache.org/
+    OpenEJB ready.
+    [OPENEJB:init]
+     OpenEJB Remote Server
+          ** Starting Services **
+          NAME		       IP	       PORT
+          httpejbd	       0.0.0.0	       4204
+          admin thread	       0.0.0.0	       4200
+          ejbd		       0.0.0.0	       4201
+          hsql		       0.0.0.0	       9001
+          telnet	       0.0.0.0	       4202
+        -------
+        Ready!
+
+
+<a name="GettingStarted-&nbsp;4.WriteanEJB"></a>
+##4. Write an EJB
+
+In the EJB project create a new interface named Greeting
+
+    package com.myejbs;
+    
+    import javax.ejb.Remote;
+    
+    @Remote
+    public interface Greeting {
+      public String greet();
+    }
+
+Now create a new class named GreetingBean which implements the above
+interface (shown below)
+
+    package com.myejbs;
+    
+    import javax.ejb.Stateless;
+    
+    @Stateless
+    public class GreetingBean implements Greeting {
+    
+    	public String greet() {
+    		return "My First Remote Stateless Session Bean";
+    	}
+    
+    }
+
+
+<a name="GettingStarted-&nbsp;5.DeploytheEJB"></a>
+## 5. Deploy the EJB
+
+1. Export the EJBProject as a jar file. Name it greeting.jar and put it in
+the OPENEJB_HOME/apps directory.
+1. Open the command prompt and type in the following command:
+
+
+    d:\openejb-3.0.0-SNAPSHOT > bin\openejb deploy apps\greeting.jar
+
+This should give you the following output:
+
+    D:\openejb-3.0.0-SNAPSHOT>bin\openejb deploy apps\greeting.jar
+    
+    Application deployed successfully at \{0\}
+    
+    App(id=D:\openejb-3.0.0-SNAPSHOT\apps\greeting.jar)
+    
+        EjbJar(id=greeting.jar, path=D:\openejb-3.0.0-SNAPSHOT\apps\greeting.jar)
+    
+    	Ejb(ejb-name=GreetingBean, id=GreetingBean)
+    
+    	    Jndi(name=GreetingBeanRemote)
+
+{color:#330000}{*}Notice the Jndi(name=GreetingBeanRemote) information.
+Keep this handy as this is the JNDI name of the bean which the client will
+use for lookup{*}{color}
+
+<a name="GettingStarted-&nbsp;6.WritetheClient"></a>
+##6. Write the Client
+
+In the EJBClient project, create a class named Client (shown below)
+
+    package com.myclient;
+    
+    import com.myejbs.Greeting;
+    
+    import javax.naming.InitialContext;
+    import java.util.Properties;
+    
+    public class Client {
+        public static void main(String[] args) {
+    
+            try {
+                Properties p = new Properties();
+                p.put("java.naming.factory.initial", "org.openejb.client.RemoteInitialContextFactory");
+                p.put("java.naming.provider.url", "ejbd://127.0.0.1:4201");
+                InitialContext ctx = new InitialContext(p);
+                Greeting greeter = (Greeting) ctx.lookup("GreetingBeanRemote");
+                String message = greeter.greet();
+                System.out.println(message);
+            } catch (Exception e) {
+                e.printStackTrace();
+            }
+        }
+    }
+
+
+<a name="GettingStarted-&nbsp;7.RuntheClient"></a>
+##7. Run the Client
+
+Open Client.java in eclipse and run it as a java application. You should
+see the following message in the console view:
+
+    My First Remote Stateless Session Bean
+
+
+<a name="GettingStarted-&nbsp;8.Stoptheserver"></a>
+##8. Stop the server
+
+There are two ways to stop the server:
+1. You can press Ctrl+c on the command prompt to stop the server
+1. On the command prompt type in the following command:
+
+    D:\openejb-3.0.0-SNAPSHOT>bin\openejb stop
+

http://git-wip-us.apache.org/repos/asf/tomee/blob/f779264f/docs/hello-world.mdtext
----------------------------------------------------------------------
diff --git a/docs/hello-world.mdtext b/docs/hello-world.mdtext
new file mode 100644
index 0000000..ab23e37
--- /dev/null
+++ b/docs/hello-world.mdtext
@@ -0,0 +1,246 @@
+Title: Hello World
+This page shows the basic steps required to create, build, and run an EJB
+and EJB client in its most minimum form.  It does not hide steps or rely on
+special build tools or IDEs and is about the most stripped down you can
+get.
+
+_See the [Examples](examples.html)
+ page for a full list of examples that range from [@Stateles|Simple Stateless Example]
+ and [@Stateful|Simple Stateful Example]
+ beans, to [Dependency Injection|Injection of env-entry Example]
+, JDBC [DataSources|Injection of DataSource Example]
+, JPA [EntityManagers|Injection of EntityManager Example]
+ and more._
+
+<a name="HelloWorld-AbasicEJBexample"></a>
+## A basic EJB example
+
+Here are some basic steps you need to perform to get started with OpenEJB
+
+1. Download and install OpenEJB
+1. Setup your development environment
+1. Write an EJB
+1. Write an EJB client
+1. Start the server
+1. Deploy the EJB
+1. Run the client
+1. Stop the server
+
+<a name="HelloWorld-DownloadandinstallOpenEJB"></a>
+## Download and install OpenEJB
+
+This example pertains to OpenEJB 3.0 which can be [downloaded here](http://archive.apache.org/dist/openejb/3.0)
+.  Once you have downloaded OpenEJB, you can then simply extract the
+contents of the downloaded file to whichever directory you want to install
+OpenEJB in. 
+
+After extracting the file contents, you should now see a directory named
+openejb-3.0. If you look under this directory, you will find a few more
+directories:
+- *bin*: Contains commands to start/stop the server (You can also do a lot
+of other stuff like deploy/undeploy, but we will just talk about things
+needed to get you started)
+- *lib*: Contains several jar files (you only need of few of these jars in
+your classpath to do EJB development)
+- *apps*: Once you create your EJB's and jar them up, you can place your
+jar file in this directory and start the server. The server will
+automatically deploy all the EJB's contained in this JAR.
+- *conf*: This directory contains all the configuration files. Although you
+may not see any file except for a README.txt file right now, but after you
+start the server, the required configuration files will be automatically
+created. It is highly recommeded to read the README.txt file under this
+directory
+- *logs*: Contains log files. 
+
+<a name="HelloWorld-Setupyourdevelopmentenvironment"></a>
+## Setup your development environment
+
+<a name="HelloWorld-Createaworkingdirectory"></a>
+### Create a working directory
+Assuming you are in your home directory, create a directory named projects
+
+    karan@poweredge:~$ mkdir projects
+
+Go to the projects directory
+
+    karan@poweredge:~$ cd projects
+
+We will do all our work in this directory.
+<a name="HelloWorld-InstallJava"></a>
+### Install Java
+Download and install Java (version 5 or higher). Also set it up so that you
+can run the java and javac commands from any directory
+<a name="HelloWorld-SetOPENEJB_HOME"></a>
+### Set OPENEJB_HOME
+We will setup this variable to refer to the openejb install location.
+
+    karan@poweredge:~/projects$ export
+OPENEJB_HOME=/home/karan/install/openejb-3.0
+
+<a name="HelloWorld-WriteanEJB"></a>
+## Write an EJB
+Whatever files you create should be placed under the projects directory
+<a name="HelloWorld-CreatetheRemoteInterface"></a>
+### Create the Remote Interface
+Using your favorite editor, create a file named Hello.java (shown below)
+
+    package org.acme;
+    import javax.ejb.Remote;
+    @Remote
+    public interface Hello{
+    	public String sayHello();
+    }
+    
+
+<a name="HelloWorld-CreatetheBeanClass"></a>
+### Create the Bean Class
+Now create a file named HelloBean.java (shown below)
+
+    package org.acme;
+    import javax.ejb.Stateless;
+    @Stateless
+    public class HelloBean implements Hello{
+    	public String sayHello(){
+    		return "Hello World!!!!";
+    	}
+    }
+    
+
+<a name="HelloWorld-Compilethesourcecode"></a>
+### Compile the source code
+Since we have imported the javax.ejb.Stateless and javax.ejb.Remote
+annotations, we need these in our classpath to compile our source code.
+These annotations can be found in the $OPENEJB_HOME/lib/javaee-5.0-1.jar.
+Lets compile our source (make sure you are in the projects directory)
+
+    karan@poweredge:~/projects$ javac -cp $OPENEJB_HOME/lib/javaee-5.0-1.jar -d
+. *.java
+
+The above will compile all the .java files and also create the required
+packages. You should now see a package named org under the projects
+directory. All class files should be under org/acme directory.
+<a name="HelloWorld-PackagetheEJB"></a>
+### Package the EJB
+To package the EJB into a JAR, run the following command while you are in
+the projects directory
+
+    karan@poweredge:~/projects$ jar cvf hello.jar org
+
+The above command will package everything under the org directory
+(including the org directory itself) into a jar file named hello.jar. Below
+is the output from running the above command:
+
+    karan@poweredge:~/projects$ jar cvf hello.jar org
+    added manifest
+    adding: org/(in = 0) (out= 0)(stored 0%)
+    adding: org/acme/(in = 0) (out= 0)(stored 0%)
+    adding: org/acme/Hello.class(in = 203) (out= 168)(deflated 17%)
+    adding: org/acme/HelloBean.class(in = 383) (out= 275)(deflated 28%)
+
+<a name="HelloWorld-WriteanEJBClient"></a>
+## Write an EJB Client
+Now we will write a Client class which will lookup the EJB , invoke the
+sayHello() business method and print the value returned from the method.
+While you are in the projects directory, create a new file named
+HelloClient.java . Add the following to this file:
+
+    package org.acme;
+    import java.util.Properties;
+    import javax.naming.InitialContext;
+    import javax.naming.Context;
+    import javax.rmi.PortableRemoteObject;
+    public class HelloClient{
+            public static void main(String[]
+ args) throws Exception{
+    		Properties props = new Properties();
+    	       
+props.put(Context.INITIAL_CONTEXT_FACTORY,"org.apache.openejb.client.RemoteInitialContextFactory");
+    		props.put(Context.PROVIDER_URL,"ejbd://127.0.0.1:4201");
+    		Context ctx = new InitialContext(props);
+    		Object ref = ctx.lookup("HelloBeanRemote");
+    		Hello h =
+(Hello)PortableRemoteObject.narrow(ref,Hello.class);
+    		String result = h.sayHello();
+    		System.out.println(result);
+    	}
+    }
+    
+
+<a name="HelloWorld-CompileHelloClient.java"></a>
+### Compile HelloClient.java
+Run the following command:
+
+    karan@poweredge:~/projects$ javac  -d . HelloClient.java
+
+<a name="HelloWorld-StarttheServer"></a>
+## Start the Server
+Go to the OpenEJB install directory (i.e. OPENEJB_HOME) and run the
+following command:
+
+    karan@poweredge:~/install/openejb-3.0$ bin/openejb start
+
+Once the Server starts, you will see an output similar to the below in your
+console:
+
+    karan@poweredge:~/install/openejb-3.0$ bin/openejb start
+    Apache OpenEJB 3.0    build: 20070926-12:34
+    http://tomee.apache.org/
+    OpenEJB ready.
+    [OPENEJB:init]
+ OpenEJB Remote Server
+      ** Starting Services **
+      NAME		       IP	       PORT  
+      httpejbd	       0.0.0.0	       4204  
+      telnet	       0.0.0.0	       4202  
+      ejbd		       0.0.0.0	       4201  
+      hsql		       0.0.0.0	       9001  
+      admin thread	       0.0.0.0	       4200  
+    -------
+    Ready!
+
+Take out a minute to browse through the conf and logs directories. You
+should now see some configuration and log files under the respective
+directories. 
+<a name="HelloWorld-DeploytheEJB"></a>
+## Deploy the EJB
+We will now use the deploy command to deploy the EJB in hello.jar. While
+you are in the projects directory, run the following command:
+
+    karan@poweredge:~/projects$ $OPENEJB_HOME/bin/openejb deploy hello.jar
+
+The above command should give you the following output:
+
+    karan@poweredge:~/projects$ $OPENEJB_HOME/bin/openejb deploy hello.jar
+    Application deployed successfully at "hello.jar"
+    App(id=/home/karan/projects/hello.jar)
+        EjbJar(id=hello.jar, path=/home/karan/projects/hello.jar)
+    	Ejb(ejb-name=HelloBean, id=HelloBean)
+    	    Jndi(name=HelloBeanRemote)
+
+Notice how the output neatly lays out various deployment details. One thing
+you might want to note from the output is the JNDI name. This is the JNDI
+name we used in the client to lookup the EJB
+<a name="HelloWorld-RuntheClient"></a>
+## Run the Client
+While you are in the projects directory, run the following command to run
+the client:
+
+    karan@poweredge:~/projects$ java -cp
+$OPENEJB_HOME/lib/openejb-client-3.0.jar:$OPENEJB_HOME/lib/javaee-5.0-1.jar:.
+ org.acme.HelloClient
+
+The above should give you the following output:
+
+    Hello World!!!!
+
+<a name="HelloWorld-Help!,itdidn'tworkforme!!."></a>
+## Help! , it didn't work for me!!.
+No problem, we are here to help. Just send us an email at
+users@tomee.apache.org. If possible, send us the contents of
+logs/openejb.log file in the email. 
+
+<a name="HelloWorld-Lookingformore?"></a>
+#  Looking for more?
+
+More EJB 3.0 examples, sample applications, tutorials and howtos available [here](examples.html)
+.

http://git-wip-us.apache.org/repos/asf/tomee/blob/f779264f/docs/hibernate.mdtext
----------------------------------------------------------------------
diff --git a/docs/hibernate.mdtext b/docs/hibernate.mdtext
new file mode 100644
index 0000000..f56a1b3
--- /dev/null
+++ b/docs/hibernate.mdtext
@@ -0,0 +1,94 @@
+Title: Hibernate
+<a name="Hibernate-Samplepersistence.xml"></a>
+# Sample persistence.xml
+
+For a unit called "movie-unit" using two datasources called "movieDatabase"
+and "movieDatabaseUnmanaged" the following persistence.xml would work.
+
+    <persistence version="1.0"
+           xmlns="http://java.sun.com/xml/ns/persistence"
+           xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+           xsi:schemaLocation="http://java.sun.com/xml/ns/persistence
+           http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd">
+
+      <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.transaction.manager_lookup_class"
+                    value="org.apache.openejb.hibernate.TransactionManagerLookup"/>
+        </properties>
+      </persistence-unit>
+    </persistence>
+
+    
+Note that as of OpenEJB 3.1 you do not need to set the
+`hibernate.transaction.manager_lookup_class` as it will be set for you
+automatically and will overwrite any "org.hibernate.transaction." strategy
+class already set while leaving any custom strategy class you may have
+implemented untouched.
+
+The result is that you can leave your
+`hibernate.transaction.manager_lookup_class` property configured to your
+production environment and OpenEJB will update it just for the scope
+testing.  On the other hand if you have implemented a custom
+`org.hibernate.transaction.TransactionManagerLookup` strategy it will
+always be used and never replaced by OpenEJB.
+
+Note that if you need more functionality in this area we are always happy
+to add it.
+    
+# Not using OpenEJB in production?
+    
+If you're using OpenEJB 3.0 which does not support the dynamic switching of
+the `hibernate.transaction.manager_lookup_class` this is one way to achieve
+it.
+
+A custom implementation of Hibernate's *TransactionManagerLookup* strategy
+like the following will do the trick.  This
+"DynamicTransactionManagerLookup" class can be packed in your jar and
+deployed with your app.
+    
+    import org.hibernate.HibernateException;
+    import org.hibernate.transaction.TransactionManagerLookup;
+    import javax.transaction.TransactionManager;
+    import java.util.Properties;
+
+    public class DynamicTransactionManagerLookup implements TransactionManagerLookup {
+
+        private TransactionManagerLookup impl;
+
+        public DynamicTransactionManagerLookup() {
+            String[] strategies = {
+                    "org.apache.openejb.hibernate.TransactionManagerLookup",
+                    "org.hibernate.transaction.JBossTransactionManagerLookup"
+            };
+
+            for (String className : strategies) {
+                try {
+                    Class<?> clazz = this.getClass().getClassLoader().loadClass(className);
+                    impl = (TransactionManagerLookup) clazz.newInstance();
+                    break;
+                } catch (Exception e) {
+                }
+            }
+
+            if (impl == null) throw new IllegalStateException("No TransactionManagerLookup available");
+        }
+
+        public TransactionManager getTransactionManager(Properties properties) throws HibernateException {
+            return impl.getTransactionManager(properties);
+        }
+
+        public String getUserTransactionName() {
+            return impl.getUserTransactionName();
+        }
+    }
+
+
+Then set the Hibernate specific configuration property
+*hibernate.transaction.manager_lookup_class* to the name of the factory
+that you just created.

http://git-wip-us.apache.org/repos/asf/tomee/blob/f779264f/docs/initialcontext-config.mdtext
----------------------------------------------------------------------
diff --git a/docs/initialcontext-config.mdtext b/docs/initialcontext-config.mdtext
new file mode 100644
index 0000000..e9a1bad
--- /dev/null
+++ b/docs/initialcontext-config.mdtext
@@ -0,0 +1,24 @@
+Title: InitialContext Configuration
+
+
+A InitialContext 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.
+
+    <JndiProvider id="myInitialContext" type="javax.naming.InitialContext">
+    </JndiProvider>
+
+Alternatively, a InitialContext 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`
+
+    myInitialContext = new://JndiProvider?type=javax.naming.InitialContext
+
+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 InitialContext a warning will be logged.  If a InitialContext is needed by the application and one is not declared, TomEE will create one dynamically using default settings.  Multiple InitialContext declarations are allowed.
+# Supported Properties
+<table>
+<tr>
+<th>Property</th>
+<th>Type</th>
+<th>Default</th>
+<th>Description</th>
+</tr>
+</table>
+
+

http://git-wip-us.apache.org/repos/asf/tomee/blob/f779264f/docs/installation-drop-in-war.mdtext
----------------------------------------------------------------------
diff --git a/docs/installation-drop-in-war.mdtext b/docs/installation-drop-in-war.mdtext
new file mode 100644
index 0000000..34a3d42
--- /dev/null
+++ b/docs/installation-drop-in-war.mdtext
@@ -0,0 +1,41 @@
+Title: Installing TomEE using the drop-in .war approach
+Notice:    Licensed to the Apache Software Foundation (ASF) under one
+           or more contributor license agreements.  See the NOTICE file
+           distributed with this work for additional information
+           regarding copyright ownership.  The ASF licenses this file
+           to you under the Apache License, Version 2.0 (the
+           "License"); you may not use this file except in compliance
+           with the License.  You may obtain a copy of the License at
+           .
+             http://www.apache.org/licenses/LICENSE-2.0
+           .
+           Unless required by applicable law or agreed to in writing,
+           software distributed under the License is distributed on an
+           "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+           KIND, either express or implied.  See the License for the
+           specific language governing permissions and limitations
+           under the License.
+
+If you prefer, TomEE can be setup by deploying a .war file into an existing Tomcat 7.x installation, as opposed to using the all-in-one bundle. This guide provides a set of step-by-step instructions to this approach. Please note that TomEE 1.7.x does not recommend Tomcat versions less than 7.0.54. Tomcat 8 is not currently supported in the released version, but you can check out the developer branch to see progress [here](dev/source-code.html).
+
+ - Download the Apache Tomcat 7.0.55 server. <a href="http://tomcat.apache.org/download-70.cgi" target="_blank">http://tomcat.apache.org/download-70.cgi</a>
+ - Unzip the Tomcat distribution file.
+ - Update $CATALINA_HOME/conf/tomcat-users.xml to add a tomee user to allow access to the installer page.
+
+        <!-- Activate/create these lines to get access to TomEE GUI -->
+    	<role rolename="tomee-admin" />
+    	<user username="tomee" password="tomee" roles="tomee-admin" />
+
+ - Download the .war file you wish to use - either the tomee-webapp-1.7.1.war (for the webprofile installation) or tomee-webapp-plus-1.7.1.war (for the plus version).
+ - Copy and rename the .war file to $CATALINA_HOME/webapps/tomee.war (the .war filename is important).
+ - Start Tomcat.
+ - Go to the TomEE installer webapp (<a href="http://localhost:8080/tomee/">http://localhost:8080/tomee/</a>) and login with the user you added to tomcat-users.xml.
+ - Verify the values and click "Confirm".
+
+  ![alt text][1]
+ 
+ - Restart Tomcat.
+ - Your TomEE installation is now complete!
+
+
+  [1]: http://people.apache.org/~tveronezi/tomee/tomee_site/tomee_installer.png
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/tomee/blob/f779264f/docs/installation.mdtext
----------------------------------------------------------------------
diff --git a/docs/installation.mdtext b/docs/installation.mdtext
new file mode 100644
index 0000000..609a8ee
--- /dev/null
+++ b/docs/installation.mdtext
@@ -0,0 +1,30 @@
+Title: Installation
+<a name="Installation-Installation"></a>
+# Installation
+
+Installation is easiest from an update site. In Eclipse, select Help,
+Software Updates, Find and install...
+
+!http://jrg.me.uk/openejb/install_step_1.jpg!
+
+Select 'Search for new features to install'
+
+!http://jrg.me.uk/openejb/install_step_2.jpg!
+
+Select 'New Remote site'. Enter 'OpenEJB' for the name and
+http://people.apache.org/~jgallimore/update-site/ for the URL. Click 'Ok'
+and make sure your new update site is selected. Then select 'Finish'
+
+!http://jrg.me.uk/openejb/install_step_3.jpg!
+
+Check the box to install the OpenEJB feature. Click 'Next'
+
+!http://jrg.me.uk/openejb/install_step_4.jpg!
+
+
+Read and make sure you're happy with the license agreement.
+
+Check the installation location, and change it if you wish to. Select
+'Finish'.
+
+Restarting the workbench when the installation is finished is recommended.

http://git-wip-us.apache.org/repos/asf/tomee/blob/f779264f/docs/installing-tomee.mdtext
----------------------------------------------------------------------
diff --git a/docs/installing-tomee.mdtext b/docs/installing-tomee.mdtext
new file mode 100644
index 0000000..948208d
--- /dev/null
+++ b/docs/installing-tomee.mdtext
@@ -0,0 +1,67 @@
+Title: Installing TomEE
+Notice:    Licensed to the Apache Software Foundation (ASF) under one
+           or more contributor license agreements.  See the NOTICE file
+           distributed with this work for additional information
+           regarding copyright ownership.  The ASF licenses this file
+           to you under the Apache License, Version 2.0 (the
+           "License"); you may not use this file except in compliance
+           with the License.  You may obtain a copy of the License at
+           .
+             http://www.apache.org/licenses/LICENSE-2.0
+           .
+           Unless required by applicable law or agreed to in writing,
+           software distributed under the License is distributed on an
+           "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+           KIND, either express or implied.  See the License for the
+           specific language governing permissions and limitations
+           under the License.
+
+# Downloading a Distribution Archive
+
+Download a distribution archive of the latest TomEE release from the [Downloads](downloads.html) page. 
+If you are not sure which one to use, take apache-tomee-webprofile-x.y.z.zip.
+
+If you want to try out the latest development snapshot (e.g. to test a bugfix which has not yet been released), then download an
+archive directly from the [Apache Maven Snapshots Repository][1] instead.
+
+The instructions on this page work with the webprofile distribution but apply to all TomEE distributions (webprofile, jaxrs or plus). 
+If you work with the jaxrs or plus distribution, simply replace the name where appropriate.
+
+# Unpacking the Archive
+
+Unpack the archive in any directory. The top-level directory of the unpacked archive is called apache-tomee-webprofile-x.y.z/.
+We refer to this directory as $CATALINA_HOME in the following.
+
+# Prerequisites for Running TomEE
+
+* A Java 6 or 7 runtime environment is in your PATH.
+* TCP ports 8080, 8005 and 8009 are free.
+
+# Starting TomEE
+
+To start TomEE as a background process, invoke
+
+    $CATALINA_HOME/bin/startup.sh
+
+To start TomEE in foreground, invoke
+
+    $CATALINA_HOME/bin/catalina.sh run
+
+# Log Messages
+
+When running TomEE in foreground, it will print all log messages to the console.
+
+When running TomEE in background, it will only print a couple of environment variables. The log messages go to a file
+
+    $CATALINA_HOME/logs/catalina.out
+
+# Stopping TomEE
+
+To stop TomEE, invoke
+
+    $CATALINA_HOME/bin/shutdown.sh
+
+If you started TomEE in foreground via `catalina.sh run`, it is safe to simply type `Ctrl-C`. 
+
+
+  [1]: https://repository.apache.org/content/groups/snapshots/org/apache/openejb/apache-tomee
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/tomee/blob/f779264f/docs/java7.mdtext
----------------------------------------------------------------------
diff --git a/docs/java7.mdtext b/docs/java7.mdtext
new file mode 100644
index 0000000..1db752f
--- /dev/null
+++ b/docs/java7.mdtext
@@ -0,0 +1,36 @@
+Title: TomEE and Java 7
+Notice:    Licensed to the Apache Software Foundation (ASF) under one
+           or more contributor license agreements.  See the NOTICE file
+           distributed with this work for additional information
+           regarding copyright ownership.  The ASF licenses this file
+           to you under the Apache License, Version 2.0 (the
+           "License"); you may not use this file except in compliance
+           with the License.  You may obtain a copy of the License at
+           .
+             http://www.apache.org/licenses/LICENSE-2.0
+           .
+           Unless required by applicable law or agreed to in writing,
+           software distributed under the License is distributed on an
+           "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+           KIND, either express or implied.  See the License for the
+           specific language governing permissions and limitations
+           under the License.
+
+If you compile your applications on JDK7 you have to run Apache TomEE 1.0 on jdk7
+
+Configuring TomEE to use JDK7
+-------
+If you have multiple JDK installed on your system you should set JAVA_HOME in your stratup scripts.
+For example if your `JAVA_HOME` is `/usr/local/java/current` edit `catalina.sh`
+and add a line
+
+`JAVA_HOME=/usr/local/java/current/bin`
+
+Alternatively, set `JAVA_HOME` as an environment variable prior to calling `<tomee-home>/bin/startup.sh`
+
+Endorsed libraries directory
+-------
+TomEE 1.0 package comes with and "endorsed" direcotry which contains updates for core JDK6 libraries.
+If you are running JDK7 you should remove al files in this directory.
+
+TomEE 1.1  will detect JDK7 and will not load those files

http://git-wip-us.apache.org/repos/asf/tomee/blob/f779264f/docs/javaagent-with-maven-surefire.mdtext
----------------------------------------------------------------------
diff --git a/docs/javaagent-with-maven-surefire.mdtext b/docs/javaagent-with-maven-surefire.mdtext
new file mode 100644
index 0000000..5429d6b
--- /dev/null
+++ b/docs/javaagent-with-maven-surefire.mdtext
@@ -0,0 +1,54 @@
+Title: JavaAgent with Maven Surefire
+<a name="JavaAgentwithMavenSurefire-Maven2"></a>
+##  Maven2
+
+In maven2 you can enable the javaagent for your tests by adding this to
+your pom.xml file:
+
+
+    <build>
+      <plugins>
+        <!-- this configures the surefire plugin to run your tests with the
+javaagent enabled -->
+        <plugin>
+          <groupId>org.apache.maven.plugins</groupId>
+          <artifactId>maven-surefire-plugin</artifactId>
+          <configuration>
+    	<forkMode>pertest</forkMode>
+           
+<argLine>-javaagent:${basedir}/target/openejb-javaagent-3.0.jar</argLine>
+    	<workingDirectory>${basedir}/target</workingDirectory>
+          </configuration>
+        </plugin>
+    
+        <!-- this tells maven to copy the openejb-javaagent jar into your
+target/ directory -->
+        <!-- where surefire can see it -->
+        <plugin>
+          <groupId>org.apache.maven.plugins</groupId>
+          <artifactId>maven-dependency-plugin</artifactId>
+          <executions>
+    	<execution>
+    	  <id>copy</id>
+    	  <phase>process-resources</phase>
+    	  <goals>
+    	    <goal>copy</goal>
+    	  </goals>
+    	  <configuration>
+    	    <artifactItems>
+    	      <artifactItem>
+    		<groupId>org.apache.openejb</groupId>
+    		<artifactId>openejb-javaagent</artifactId>
+    		<version>3.0</version>
+    	       
+<outputDirectory>${project.build.directory}</outputDirectory>
+    	      </artifactItem>
+    	    </artifactItems>
+    	  </configuration>
+    	</execution>
+          </executions>
+        </plugin>
+    
+      </plugins>
+    </build>
+

http://git-wip-us.apache.org/repos/asf/tomee/blob/f779264f/docs/javaagent.mdtext
----------------------------------------------------------------------
diff --git a/docs/javaagent.mdtext b/docs/javaagent.mdtext
new file mode 100644
index 0000000..0469c98
--- /dev/null
+++ b/docs/javaagent.mdtext
@@ -0,0 +1,57 @@
+Title: JavaAgent
+
+<a name="JavaAgent-AddingaJavaAgent"></a>
+#  Adding a JavaAgent
+
+NOTE: The java agent is only required if using OpenJPA as your persistence
+provider or if using CMP.
+
+Adding a java agent is done via a vm parameter as follows:
+
+    java -javaagent:openejb-javaagent-4.6.0.jar _\[other params...](other-params....html)
+
+<a name="JavaAgent-Maven2"></a>
+##  Maven2
+
+In maven2 you can enable the javaagent for your tests by adding this to
+your pom.xml file:
+
+    <build>
+      <plugins>
+        <!-- this configures the surefire plugin to run your tests with the javaagent enabled -->
+        <plugin>
+          <groupId>org.apache.maven.plugins</groupId>
+          <artifactId>maven-surefire-plugin</artifactId>
+          <configuration>
+            <forkMode>pertest</forkMode>
+            <argLine>-javaagent:${project.basedir}/target/openejb-javaagent-4.6.0.jar</argLine>
+            <workingDirectory>${project.basedir}/target</workingDirectory>
+          </configuration>
+        </plugin>
+        <!-- this tells maven to copy the openejb-javaagent jar into your target/ directory -->
+        <!-- where surefire can see it -->
+        <plugin>
+          <groupId>org.apache.maven.plugins</groupId>
+          <artifactId>maven-dependency-plugin</artifactId>
+          <executions>
+            <execution>
+              <id>copy</id>
+              <phase>process-resources</phase>
+              <goals>
+                <goal>copy</goal>
+              </goals>
+              <configuration>
+                <artifactItems>
+                  <artifactItem>
+                    <groupId>org.apache.openejb</groupId>
+                    <artifactId>openejb-javaagent</artifactId>
+                    <version>4.6.0</version>
+                    <outputDirectory>${project.build.directory}</outputDirectory>
+                  </artifactItem>
+                </artifactItems>
+              </configuration>
+            </execution>
+          </executions>
+        </plugin>
+      </plugins>
+    </build>

http://git-wip-us.apache.org/repos/asf/tomee/blob/f779264f/docs/javaee7-status.mdtext
----------------------------------------------------------------------
diff --git a/docs/javaee7-status.mdtext b/docs/javaee7-status.mdtext
new file mode 100644
index 0000000..bbd0504
--- /dev/null
+++ b/docs/javaee7-status.mdtext
@@ -0,0 +1,182 @@
+Title: Java EE 7 Implementation Status
+
+This page shows the current implementation status for the Java EE 7 specification compabitility of Apache Tomme 7.0.0-M1. Currently, we are working on the certification for Java EE 7.
+
+<table>
+    <tr>
+        <th></th>
+        <th>Version</th>
+        <th>JSR</th>
+        <th>TomEE</th>
+        <th>TomEE+</th>
+    </tr>
+
+    <tr>
+        <td>Java Servlets</td>
+        <td>3.1</td>
+        <td><a href="http://jcp.org/en/jsr/detail?id=340">340</a></td>
+        <td>(/)</td>
+        <td>(/)</td>
+    </tr>
+
+    <tr>
+        <td>JavaServer Pages (JSP)</td>
+        <td>2.3</td>
+        <td><a href="http://jcp.org/en/jsr/detail?id=245">245</a></td>
+        <td>(/)</td>
+        <td>(/)</td>
+    </tr>
+
+    <tr>
+        <td>Expression Language (EL)</td>
+        <td>3.0</td>
+        <td><a href="http://jcp.org/en/jsr/detail?id=341">341</a></td>
+        <td>(/)</td>
+        <td>(/)</td>
+    </tr>
+
+    <tr>
+        <td>JavaServer Faces (JSF)</td>
+        <td>2.2</td>
+        <td><a href="http://jcp.org/en/jsr/detail?id=344">344</a></td>
+        <td>(/)</td>
+        <td>(/)</td>
+    </tr>
+
+    <tr>
+        <td>Java API for Websocket</td>
+        <td>1.0</td>
+        <td><a href="http://jcp.org/en/jsr/detail?id=356">356</a></td>
+        <td>(/)</td>
+        <td>(/)</td>
+    </tr>
+
+    <tr>
+        <td>Java API for JSON Processing (JSON-P)</td>
+        <td>1.0</td>
+        <td><a href="http://jcp.org/en/jsr/detail?id=353">353</a></td>
+        <td>(/)</td>
+        <td>(/)</td>
+    </tr>
+
+    <tr>
+        <td>Batch Applications for the Java Platform</td>
+        <td>1.0</td>
+        <td><a href="http://jcp.org/en/jsr/detail?id=352">352</a></td>
+        <td></td>
+        <td>(/)</td>
+    </tr>
+
+    <tr>
+        <td>Concurrency Utilities for Java EE</td>
+        <td>1.0</td>
+        <td><a href="http://jcp.org/en/jsr/detail?id=236">236</a></td>
+        <td></td>
+        <td>(/)</td>
+    </tr>
+
+    <tr>
+        <td>Contexts and Dependency Injection (CDI)</td>
+        <td>1.1</td>
+        <td><a href="http://jcp.org/en/jsr/detail?id=346">346</a></td>
+        <td>(/)</td>
+        <td>(/)</td>
+    </tr>
+
+    <tr>
+        <td>Bean Validation</td>
+        <td>1.1</td>
+        <td><a href="http://jcp.org/en/jsr/detail?id=349">349</a></td>
+        <td>(/)</td>
+        <td>(/)</td>
+    </tr>
+
+    <tr>
+        <td>Enterprise JavaBeans (EJB)</td>
+        <td>3.2</td>
+        <td><a href="http://jcp.org/en/jsr/detail?id=345">345</a></td>
+        <td>(/)</td>
+        <td>(/)</td>
+    </tr>
+
+    <tr>
+        <td>Interceptors</td>
+        <td>1.2</td>
+        <td><a href="http://jcp.org/en/jsr/detail?id=318">318</a></td>
+        <td>(/)</td>
+        <td>(/)</td>
+    </tr>
+
+    <tr>
+        <td>Java EE Connector Architecture</td>
+        <td>1.6</td>
+        <td><a href="http://jcp.org/en/jsr/detail?id=322">322</a></td>
+        <td></td>
+        <td>1.7 not supported yet</td>
+    </tr>
+
+    <tr>
+        <td>Java Persistence API (JPA)</td>
+        <td>2.1</td>
+        <td><a href="http://jcp.org/en/jsr/detail?id=338">338</a></td>
+        <td>API 2.1 supported, default provider still 2.0.</td>
+        <td>API 2.1 supported, default provider still 2.0.</td>
+    </tr>
+
+    <tr>
+        <td>Java Messaging Service (JMS)</td>
+        <td>1.1</td>
+        <td><a href="http://jcp.org/en/jsr/detail?id=343">343</a></td>
+        <td></td>
+        <td>2.0 not supported yet.</td>
+    </tr>
+
+    <tr>
+        <td>Java Transaction API (JTA)</td>
+        <td>1.2</td>
+        <td><a href="http://jcp.org/en/jsr/detail?id=907">907</a></td>
+        <td>(/)</td>
+        <td>(/)</td>
+    </tr>
+
+    <tr>
+        <td>JavaMail API</td>
+        <td>1.5</td>
+        <td><a href="http://jcp.org/en/jsr/detail?id=919">919</a></td>
+        <td>(/)</td>
+        <td>(/)</td>
+    </tr>
+
+    <tr>
+        <td>Java API for RESTful Web Services (JAX-RS)</td>
+        <td>2.0</td>
+        <td><a href="http://jcp.org/en/jsr/detail?id=339">339</a></td>
+        <td>(/)</td>
+        <td>(/)</td>
+    </tr>
+
+    <tr>
+        <td>Java API for XML Web Services (JAX-WS)</td>
+        <td>2.2</td>
+        <td><a href="http://jcp.org/en/jsr/detail?id=224">224</a></td>
+        <td></td>
+        <td>(/)</td>
+    </tr>
+
+    <tr>
+        <td>Java Authentication Service Provider Interface for Containers (JAAS)</td>
+        <td>1.1</td>
+        <td><a href="http://jcp.org/en/jsr/detail?id=196">196</a></td>
+        <td>(/)</td>
+        <td>(/)</td>
+    </tr>
+
+    <tr>
+        <td>Java Authorization Contract for Coners (JACC)</td>
+        <td>1.5</td>
+        <td><a href="http://jcp.org/en/jsr/detail?id=115">115</a></td>
+        <td>(/)</td>
+        <td>(/)</td>
+    </tr>
+</table>
+

http://git-wip-us.apache.org/repos/asf/tomee/blob/f779264f/docs/javamailsession-config.mdtext
----------------------------------------------------------------------
diff --git a/docs/javamailsession-config.mdtext b/docs/javamailsession-config.mdtext
new file mode 100644
index 0000000..f4920a1
--- /dev/null
+++ b/docs/javamailsession-config.mdtext
@@ -0,0 +1,24 @@
+Title: JavaMailSession Configuration
+
+
+A JavaMailSession 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="myJavaMailSession" type="javax.mail.Session">
+    </Resource>
+
+Alternatively, a JavaMailSession 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`
+
+    myJavaMailSession = new://Resource?type=javax.mail.Session
+
+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 JavaMailSession a warning will be logged.  If a JavaMailSession is needed by the application and one is not declared, TomEE will create one dynamically using default settings.  Multiple JavaMailSession declarations are allowed.
+# Supported Properties
+<table>
+<tr>
+<th>Property</th>
+<th>Type</th>
+<th>Default</th>
+<th>Description</th>
+</tr>
+</table>
+
+