tomee-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dblev...@apache.org
Subject [24/30] tomee git commit: Rename *.mdtext files to *.md
Date Sun, 02 Dec 2018 02:20:51 GMT
http://git-wip-us.apache.org/repos/asf/tomee/blob/b93bd755/docs/functional-testing-with-openejb,-jetty-and-selenium.md
----------------------------------------------------------------------
diff --git a/docs/functional-testing-with-openejb,-jetty-and-selenium.md b/docs/functional-testing-with-openejb,-jetty-and-selenium.md
new file mode 100644
index 0000000..2f1193d
--- /dev/null
+++ b/docs/functional-testing-with-openejb,-jetty-and-selenium.md
@@ -0,0 +1,240 @@
+index-group=Unrevised
+type=page
+status=published
+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/b93bd755/docs/generating-ejb-3-annotations.md
----------------------------------------------------------------------
diff --git a/docs/generating-ejb-3-annotations.md b/docs/generating-ejb-3-annotations.md
new file mode 100644
index 0000000..8f3dfe3
--- /dev/null
+++ b/docs/generating-ejb-3-annotations.md
@@ -0,0 +1,61 @@
+index-group=Unrevised
+type=page
+status=published
+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/b93bd755/docs/getting-started.md
----------------------------------------------------------------------
diff --git a/docs/getting-started.md b/docs/getting-started.md
new file mode 100644
index 0000000..4104749
--- /dev/null
+++ b/docs/getting-started.md
@@ -0,0 +1,172 @@
+index-group=Unrevised
+type=page
+status=published
+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/b93bd755/docs/hello-world.md
----------------------------------------------------------------------
diff --git a/docs/hello-world.md b/docs/hello-world.md
new file mode 100644
index 0000000..1b08f95
--- /dev/null
+++ b/docs/hello-world.md
@@ -0,0 +1,250 @@
+index-group=Unrevised
+type=page
+status=published
+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/b93bd755/docs/hibernate.md
----------------------------------------------------------------------
diff --git a/docs/hibernate.md b/docs/hibernate.md
new file mode 100644
index 0000000..1e1f124
--- /dev/null
+++ b/docs/hibernate.md
@@ -0,0 +1,98 @@
+index-group=Unrevised
+type=page
+status=published
+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/b93bd755/docs/index.adoc
----------------------------------------------------------------------
diff --git a/docs/index.adoc b/docs/index.adoc
new file mode 100644
index 0000000..9f99d4c
--- /dev/null
+++ b/docs/index.adoc
@@ -0,0 +1,224 @@
+:jbake-type: page
+:jbake-status: published
+:jbake-title: Documentation
+
+Documentation
+
+ - link:activemqresourceadapter-config.html[activemqresourceadapter-config]
+ - link:admin/cluster/index.html[admin/cluster/index]
+ - link:admin/configuration/application.html[admin/configuration/application]
+ - link:admin/configuration/containers.html[admin/configuration/containers]
+ - link:admin/configuration/index.html[admin/configuration/index]
+ - link:admin/configuration/resources.html[admin/configuration/resources]
+ - link:admin/configuration/server.html[admin/configuration/server]
+ - link:admin/file-layout.html[admin/file-layout]
+ - link:admin/index.html[admin/index]
+ - link:advanced/applicationcomposer/index.html[advanced/applicationcomposer/index]
+ - link:advanced/client/jndi.html[advanced/client/jndi]
+ - link:advanced/index.html[advanced/index]
+ - link:advanced/jms/jms-configuration.html[advanced/jms/jms-configuration]
+ - link:advanced/setup/index.html[advanced/setup/index]
+ - link:advanced/shading/index.html[advanced/shading/index]
+ - link:advanced/tomee-embedded/index.html[advanced/tomee-embedded/index]
+ - link:alternate-descriptors.html[alternate-descriptors]
+ - link:annotations,-xml-and-defaults.html[annotations,-xml-and-defaults]
+ - link:app-clients-and-jndi.html[app-clients-and-jndi]
+ - link:application-composer/advanced.html[application-composer/advanced]
+ - link:application-composer/getting-started.html[application-composer/getting-started]
+ - link:application-composer/history.html[application-composer/history]
+ - link:application-composer/index.html[application-composer/index]
+ - link:application-deployment-solutions.html[application-deployment-solutions]
+ - link:application-discovery-via-the-classpath.html[application-discovery-via-the-classpath]
+ - link:application-resources.html[application-resources]
+ - link:arquillian-available-adapters.html[arquillian-available-adapters]
+ - link:arquillian-getting-started.html[arquillian-getting-started]
+ - link:basics---getting-things.html[basics---getting-things]
+ - link:basics---security.html[basics---security]
+ - link:basics---transactions.html[basics---transactions]
+ - link:bmpentitycontainer-config.html[bmpentitycontainer-config]
+ - link:bouncy-castle.html[bouncy-castle]
+ - link:built-in-type-converters.html[built-in-type-converters]
+ - link:callbacks.html[callbacks]
+ - link:changing-jms-implementations.html[changing-jms-implementations]
+ - link:client-server-transports.html[client-server-transports]
+ - link:clients.html[clients]
+ - link:cmpentitycontainer-config.html[cmpentitycontainer-config]
+ - link:collapsed-ear.html[collapsed-ear]
+ - link:common-datasource-configurations.html[common-datasource-configurations]
+ - link:common-errors.html[common-errors]
+ - link:common-persistenceprovider-properties.html[common-persistenceprovider-properties]
+ - link:comparison.html[comparison]
+ - link:concepts.html[concepts]
+ - link:configuration.html[configuration]
+ - link:configuring-containers-in-tests.html[configuring-containers-in-tests]
+ - link:configuring-datasources-in-tests.html[configuring-datasources-in-tests]
+ - link:configuring-datasources.html[configuring-datasources]
+ - link:configuring-durations.html[configuring-durations]
+ - link:Configuring-in-tomee.html[Configuring-in-tomee]
+ - link:configuring-javamail.html[configuring-javamail]
+ - link:configuring-logging-in-tests.html[configuring-logging-in-tests]
+ - link:configuring-persistenceunits-in-tests.html[configuring-persistenceunits-in-tests]
+ - link:constructor-injection.html[constructor-injection]
+ - link:containers-and-resources.html[containers-and-resources]
+ - link:contrib/debug/debug-intellij.html[contrib/debug/debug-intellij]
+ - link:custom-injection.html[custom-injection]
+ - link:datasource-config.html[datasource-config]
+ - link:datasource-configuration-by-creator.html[datasource-configuration-by-creator]
+ - link:datasource-password-encryption.html[datasource-password-encryption]
+ - link:deamon/lin-service.html[deamon/lin-service]
+ - link:deamon/win-service.html[deamon/win-service]
+ - link:declaring-references.html[declaring-references]
+ - link:deploy-tool.html[deploy-tool]
+ - link:deploying-in-tomee.html[deploying-in-tomee]
+ - link:deployment-id.html[deployment-id]
+ - link:deployments.html[deployments]
+ - link:details-on-openejb-jar.html[details-on-openejb-jar]
+ - link:developer/classloading/index.html[developer/classloading/index]
+ - link:developer/configuration/cxf.html[developer/configuration/cxf]
+ - link:developer/ide/index.html[developer/ide/index]
+ - link:developer/index.html[developer/index]
+ - link:developer/json/index.html[developer/json/index]
+ - link:developer/migration/tomee-1-to-7.html[developer/migration/tomee-1-to-7]
+ - link:developer/testing/applicationcomposer/index.html[developer/testing/applicationcomposer/index]
+ - link:developer/testing/arquillian/index.html[developer/testing/arquillian/index]
+ - link:developer/testing/index.html[developer/testing/index]
+ - link:developer/testing/other/index.html[developer/testing/other/index]
+ - link:developer/tools/gradle-plugins.html[developer/tools/gradle-plugins]
+ - link:developer/tools/index.html[developer/tools/index]
+ - link:developer/tools/maven/applicationcomposer.html[developer/tools/maven/applicationcomposer]
+ - link:developer/tools/maven/embedded.html[developer/tools/maven/embedded]
+ - link:developer/tools/maven/tomee.html[developer/tools/maven/tomee]
+ - link:developer/tools/maven-plugins.html[developer/tools/maven-plugins]
+ - link:docs.html[docs]
+ - link:documentation.html[documentation]
+ - link:documentation.old.html[documentation.old]
+ - link:dynamic-datasource.html[dynamic-datasource]
+ - link:eclipse-plugin.html[eclipse-plugin]
+ - link:ejb-failover.html[ejb-failover]
+ - link:ejb-local-ref.html[ejb-local-ref]
+ - link:ejb-over-ssl.html[ejb-over-ssl]
+ - link:ejb-ref.html[ejb-ref]
+ - link:ejb-refs.html[ejb-refs]
+ - link:ejb-request-logging.html[ejb-request-logging]
+ - link:ejbd-transport.html[ejbd-transport]
+ - link:embedded-and-remotable.html[embedded-and-remotable]
+ - link:embedded-configuration.html[embedded-configuration]
+ - link:embedding.html[embedding]
+ - link:failover-logging.html[failover-logging]
+ - link:faq.html[faq]
+ - link:features.html[features]
+ - link:from-glassfish-to-tomee.html[from-glassfish-to-tomee]
+ - link:functional-testing-with-openejb,-jetty-and-selenium.html[functional-testing-with-openejb,-jetty-and-selenium]
+ - link:generating-ejb-3-annotations.html[generating-ejb-3-annotations]
+ - link:getting-started.html[getting-started]
+ - link:hello-world.html[hello-world]
+ - link:hibernate.html[hibernate]
+ - link:initialcontext-config.html[initialcontext-config]
+ - link:installation-drop-in-war.html[installation-drop-in-war]
+ - link:installation.html[installation]
+ - link:installing-tomee.html[installing-tomee]
+ - link:java7.html[java7]
+ - link:javaagent-with-maven-surefire.html[javaagent-with-maven-surefire]
+ - link:javaagent.html[javaagent]
+ - link:javaee7-status.html[javaee7-status]
+ - link:javamailsession-config.html[javamailsession-config]
+ - link:jms-resources-and-mdb-container.html[jms-resources-and-mdb-container]
+ - link:jmsconnectionfactory-config.html[jmsconnectionfactory-config]
+ - link:jndi-names.html[jndi-names]
+ - link:jpa-concepts.html[jpa-concepts]
+ - link:jpa-usage.html[jpa-usage]
+ - link:local-client-injection.html[local-client-injection]
+ - link:local-server.html[local-server]
+ - link:lookup-of-other-ejbs-example.html[lookup-of-other-ejbs-example]
+ - link:managedcontainer-config.html[managedcontainer-config]
+ - link:manual-installation.html[manual-installation]
+ - link:maven/build-mojo.html[maven/build-mojo]
+ - link:maven/configtest-mojo.html[maven/configtest-mojo]
+ - link:maven/debug-mojo.html[maven/debug-mojo]
+ - link:maven/deploy-mojo.html[maven/deploy-mojo]
+ - link:maven/exec-mojo.html[maven/exec-mojo]
+ - link:maven/help-mojo.html[maven/help-mojo]
+ - link:maven/index.html[maven/index]
+ - link:maven/list-mojo.html[maven/list-mojo]
+ - link:maven/run-mojo.html[maven/run-mojo]
+ - link:maven/start-mojo.html[maven/start-mojo]
+ - link:maven/stop-mojo.html[maven/stop-mojo]
+ - link:maven/undeploy-mojo.html[maven/undeploy-mojo]
+ - link:maven.html[maven]
+ - link:messagedrivencontainer-config.html[messagedrivencontainer-config]
+ - link:multicast-discovery.html[multicast-discovery]
+ - link:multiple-business-interface-hazzards.html[multiple-business-interface-hazzards]
+ - link:multipoint-considerations.html[multipoint-considerations]
+ - link:multipoint-discovery.html[multipoint-discovery]
+ - link:multipoint-recommendations.html[multipoint-recommendations]
+ - link:multipulse-discovery.html[multipulse-discovery]
+ - link:new-in-openejb-3.0.html[new-in-openejb-3.0]
+ - link:openejb-3.html[openejb-3]
+ - link:openejb-binaries.html[openejb-binaries]
+ - link:openejb-eclipse-plugin.html[openejb-eclipse-plugin]
+ - link:openejb-jsr-107-integration.html[openejb-jsr-107-integration]
+ - link:openejb.xml.html[openejb.xml]
+ - link:openjpa.html[openjpa]
+ - link:orb-config.html[orb-config]
+ - link:persistence-context.html[persistence-context]
+ - link:persistence-unit-ref.html[persistence-unit-ref]
+ - link:properties-listing.html[properties-listing]
+ - link:properties-tool.html[properties-tool]
+ - link:property-overriding.html[property-overriding]
+ - link:provisioning.html[provisioning]
+ - link:proxyfactory-config.html[proxyfactory-config]
+ - link:queue-config.html[queue-config]
+ - link:quickstart.html[quickstart]
+ - link:refcard/refcard.html[refcard/refcard]
+ - link:remote-server.html[remote-server]
+ - link:resource-injection.html[resource-injection]
+ - link:resource-ref-for-datasource.html[resource-ref-for-datasource]
+ - link:running-a-standalone-openejb-server.html[running-a-standalone-openejb-server]
+ - link:securing-a-web-service.html[securing-a-web-service]
+ - link:security-annotations.html[security-annotations]
+ - link:security.html[security]
+ - link:securityservice-config.html[securityservice-config]
+ - link:service-locator.html[service-locator]
+ - link:services.html[services]
+ - link:singleton-beans.html[singleton-beans]
+ - link:singleton-ejb.html[singleton-ejb]
+ - link:singletoncontainer-config.html[singletoncontainer-config]
+ - link:spring-and-openejb-3.0.html[spring-and-openejb-3.0]
+ - link:spring-ejb-and-jpa.html[spring-ejb-and-jpa]
+ - link:spring.html[spring]
+ - link:ssh.html[ssh]
+ - link:standalone-server.html[standalone-server]
+ - link:startup.html[startup]
+ - link:statefulcontainer-config.html[statefulcontainer-config]
+ - link:statelesscontainer-config.html[statelesscontainer-config]
+ - link:system-properties-files.html[system-properties-files]
+ - link:system-properties.html[system-properties]
+ - link:telnet-console.html[telnet-console]
+ - link:tip-concurrency.html[tip-concurrency]
+ - link:tip-jersey-client.html[tip-jersey-client]
+ - link:tip-weblogic.html[tip-weblogic]
+ - link:tomcat-object-factory.html[tomcat-object-factory]
+ - link:tomee-and-eclipse.html[tomee-and-eclipse]
+ - link:tomee-and-hibernate.html[tomee-and-hibernate]
+ - link:tomee-and-intellij.html[tomee-and-intellij]
+ - link:tomee-and-netbeans.html[tomee-and-netbeans]
+ - link:tomee-and-security.html[tomee-and-security]
+ - link:tomee-and-webspheremq.html[tomee-and-webspheremq]
+ - link:tomee-directory-structure.html[tomee-directory-structure]
+ - link:tomee-embedded-maven-plugin.html[tomee-embedded-maven-plugin]
+ - link:tomee-jaas.html[tomee-jaas]
+ - link:tomee-logging-in-eclipse.html[tomee-logging-in-eclipse]
+ - link:tomee-logging.html[tomee-logging]
+ - link:tomee-maven-plugin.html[tomee-maven-plugin]
+ - link:tomee-mp-getting-started.html[tomee-mp-getting-started]
+ - link:tomee-version-policies.html[tomee-version-policies]
+ - link:tomee-webaccess.html[tomee-webaccess]
+ - link:tomee-webapp.html[tomee-webapp]
+ - link:topic-config.html[topic-config]
+ - link:transaction-annotations.html[transaction-annotations]
+ - link:transactionmanager-config.html[transactionmanager-config]
+ - link:understanding-callbacks.html[understanding-callbacks]
+ - link:understanding-the-directory-layout.html[understanding-the-directory-layout]
+ - link:unix-daemon.html[unix-daemon]
+ - link:validation-tool.html[validation-tool]
+ - link:version-checker.html[version-checker]
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/tomee/blob/b93bd755/docs/initialcontext-config.md
----------------------------------------------------------------------
diff --git a/docs/initialcontext-config.md b/docs/initialcontext-config.md
new file mode 100644
index 0000000..8e60fbb
--- /dev/null
+++ b/docs/initialcontext-config.md
@@ -0,0 +1,26 @@
+index-group=Unrevised
+type=page
+status=published
+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 class="mdtable">
+<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/b93bd755/docs/installation-drop-in-war.md
----------------------------------------------------------------------
diff --git a/docs/installation-drop-in-war.md b/docs/installation-drop-in-war.md
new file mode 100644
index 0000000..913dd12
--- /dev/null
+++ b/docs/installation-drop-in-war.md
@@ -0,0 +1,45 @@
+index-group=Unrevised
+type=page
+status=published
+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

http://git-wip-us.apache.org/repos/asf/tomee/blob/b93bd755/docs/installation.md
----------------------------------------------------------------------
diff --git a/docs/installation.md b/docs/installation.md
new file mode 100644
index 0000000..ec92778
--- /dev/null
+++ b/docs/installation.md
@@ -0,0 +1,34 @@
+index-group=Unrevised
+type=page
+status=published
+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/b93bd755/docs/installing-tomee.md
----------------------------------------------------------------------
diff --git a/docs/installing-tomee.md b/docs/installing-tomee.md
new file mode 100644
index 0000000..ed0b5ac
--- /dev/null
+++ b/docs/installing-tomee.md
@@ -0,0 +1,71 @@
+index-group=Unrevised
+type=page
+status=published
+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

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

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


Mime
View raw message