TOMEE-2316 Convert Markdown files to Asciidoc in the docs folder - 5
Project: http://git-wip-us.apache.org/repos/asf/tomee/repo Commit: http://git-wip-us.apache.org/repos/asf/tomee/commit/513cf17a Tree: http://git-wip-us.apache.org/repos/asf/tomee/tree/513cf17a Diff: http://git-wip-us.apache.org/repos/asf/tomee/diff/513cf17a Branch: refs/heads/master Commit: 513cf17a686c20e82648eafdd2c4e46d3b9e50e9 Parents: 388460f Author: Carlos Chacin <[email protected]> Authored: Wed Dec 5 22:07:22 2018 -0800 Committer: Carlos Chacin <[email protected]> Committed: Wed Dec 5 22:07:22 2018 -0800 ---------------------------------------------------------------------- docs/generating-ejb-3-annotations.adoc | 63 ++++ docs/generating-ejb-3-annotations.md | 61 ---- docs/getting-started.adoc | 170 +++++++++++ docs/getting-started.md | 172 ----------- docs/hello-world.adoc | 247 ++++++++++++++++ docs/hello-world.md | 250 ---------------- docs/hibernate.adoc | 101 +++++++ docs/hibernate.md | 98 ------- docs/initialcontext-config.adoc | 42 +++ docs/initialcontext-config.md | 26 -- docs/installation-drop-in-war.adoc | 55 ++++ docs/installation-drop-in-war.md | 45 --- docs/installation.adoc | 35 +++ docs/installation.md | 34 --- docs/installing-tomee.adoc | 83 ++++++ docs/installing-tomee.md | 71 ----- docs/java7.adoc | 40 +++ docs/java7.md | 40 --- docs/javaagent-with-maven-surefire.adoc | 35 +++ docs/javaagent-with-maven-surefire.md | 57 ---- docs/javaagent.adoc | 64 ++++ docs/javaagent.md | 61 ---- docs/javaee7-status.adoc | 218 ++++++++++++++ docs/javaee7-status.md | 185 ------------ docs/javamailsession-config.adoc | 42 +++ docs/javamailsession-config.md | 26 -- docs/jms-resources-and-mdb-container.adoc | 356 ++++++++++++++++++++++ docs/jms-resources-and-mdb-container.md | 283 ------------------ docs/jmsconnectionfactory-config.adoc | 102 +++++++ docs/jmsconnectionfactory-config.md | 87 ------ docs/jndi-names.adoc | 390 +++++++++++++++++++++++++ docs/jndi-names.md | 372 ----------------------- docs/jpa-concepts.adoc | 223 ++++++++++++++ docs/jpa-concepts.md | 220 -------------- docs/jpa-usage.adoc | 48 +++ docs/jpa-usage.md | 52 ---- 36 files changed, 2314 insertions(+), 2140 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/tomee/blob/513cf17a/docs/generating-ejb-3-annotations.adoc ---------------------------------------------------------------------- diff --git a/docs/generating-ejb-3-annotations.adoc b/docs/generating-ejb-3-annotations.adoc new file mode 100644 index 0000000..b678931 --- /dev/null +++ b/docs/generating-ejb-3-annotations.adoc @@ -0,0 +1,63 @@ +# Generating EJB 3 annotations +:index-group: Unrevised +:jbake-date: 2018-12-05 +:jbake-type: page +:jbake-status: published + +# 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/513cf17a/docs/generating-ejb-3-annotations.md ---------------------------------------------------------------------- diff --git a/docs/generating-ejb-3-annotations.md b/docs/generating-ejb-3-annotations.md deleted file mode 100644 index 8f3dfe3..0000000 --- a/docs/generating-ejb-3-annotations.md +++ /dev/null @@ -1,61 +0,0 @@ -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/513cf17a/docs/getting-started.adoc ---------------------------------------------------------------------- diff --git a/docs/getting-started.adoc b/docs/getting-started.adoc new file mode 100644 index 0000000..f832bce --- /dev/null +++ b/docs/getting-started.adoc @@ -0,0 +1,170 @@ +# Getting Started +:index-group: Unrevised +:jbake-date: 2018-12-05 +:jbake-type: page +:jbake-status: published + +##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 + +##1. Download and Install OpenEJB + +Follow +these http://cwiki.apache.org/confluence/display/OPENEJB/Quickstart[instructions] + +##2. Setup your development environment + +###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 + +##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! +.... + +##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"; + } + +} +.... + +== 5. Deploy the EJB + +[arabic] +. Export the EJBProject as a jar file. Name it greeting.jar and put it +in the OPENEJB_HOME/apps directory. +. Open the command prompt and type in the following command: ++ +d:-3.0.0-SNAPSHOT > bindeploy apps.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} + +##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(); + } + } +} +.... + +##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 +.... + +##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/513cf17a/docs/getting-started.md ---------------------------------------------------------------------- diff --git a/docs/getting-started.md b/docs/getting-started.md deleted file mode 100644 index 4104749..0000000 --- a/docs/getting-started.md +++ /dev/null @@ -1,172 +0,0 @@ -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- 1.DownloadandInstallOpenEJB"></a> -##1. Download and Install OpenEJB - -Follow these [instructions](http://cwiki.apache.org/confluence/display/OPENEJB/Quickstart) - -<a name="GettingStarted- 2.Setupyourdevelopmentenvironment"></a> -##2. Setup your development environment - - -<a name="GettingStarted- 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- 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- 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- 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- 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- 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- 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/513cf17a/docs/hello-world.adoc ---------------------------------------------------------------------- diff --git a/docs/hello-world.adoc b/docs/hello-world.adoc new file mode 100644 index 0000000..6d4871f --- /dev/null +++ b/docs/hello-world.adoc @@ -0,0 +1,247 @@ +# Hello World +:index-group: Unrevised +:jbake-date: 2018-12-05 +:jbake-type: page +:jbake-status: published + +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 link:examples.html[Examples] 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 basic EJB example + +Here are some basic steps you need to perform to get started with +OpenEJB + +[arabic] +. Download and install OpenEJB +. Setup your development environment +. Write an EJB +. Write an EJB client +. Start the server +. Deploy the EJB +. Run the client +. Stop the server + +== Download and install OpenEJB + +This example pertains to OpenEJB 3.0 which can be +http://archive.apache.org/dist/openejb/3.0[downloaded here] . 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. + +== Setup your development environment + +=== 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. ### 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 ### 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 + +== Write an EJB Whatever files you create should be placed under the +projects directory ### 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(); +} +.... + +=== 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!!!!"; + } +} +.... + +=== 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. ### +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%) +.... + +== 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); } } + +=== Compile HelloClient.java Run the following command: + +.... +karan@poweredge:~/projects$ javac -d . HelloClient.java +.... + +== 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. ## 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 ## Run the Client +While you are in the projects directory, run the following command to +run the client: + +.... +karan@poweredge:~/projects$ java -cp +.... + +latexmath:[$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!!!! +.... + +== Help! , it didn't work for me!!. No problem, we are here to help. +Just send us an email at [email protected]. If possible, send us +the contents of logs/openejb.log file in the email. + +# Looking for more? + +More EJB 3.0 examples, sample applications, tutorials and howtos +available link:examples.html[here] . http://git-wip-us.apache.org/repos/asf/tomee/blob/513cf17a/docs/hello-world.md ---------------------------------------------------------------------- diff --git a/docs/hello-world.md b/docs/hello-world.md deleted file mode 100644 index 1b08f95..0000000 --- a/docs/hello-world.md +++ /dev/null @@ -1,250 +0,0 @@ -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 [email protected]. 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/513cf17a/docs/hibernate.adoc ---------------------------------------------------------------------- diff --git a/docs/hibernate.adoc b/docs/hibernate.adoc new file mode 100644 index 0000000..3c60aa3 --- /dev/null +++ b/docs/hibernate.adoc @@ -0,0 +1,101 @@ +# Hibernate +:index-group: Unrevised +:jbake-date: 2018-12-05 +:jbake-type: page +:jbake-status: published + +# 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/513cf17a/docs/hibernate.md ---------------------------------------------------------------------- diff --git a/docs/hibernate.md b/docs/hibernate.md deleted file mode 100644 index 1e1f124..0000000 --- a/docs/hibernate.md +++ /dev/null @@ -1,98 +0,0 @@ -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/513cf17a/docs/initialcontext-config.adoc ---------------------------------------------------------------------- diff --git a/docs/initialcontext-config.adoc b/docs/initialcontext-config.adoc new file mode 100644 index 0000000..0dbd7c4 --- /dev/null +++ b/docs/initialcontext-config.adoc @@ -0,0 +1,42 @@ +# InitialContext Configuration +:index-group: Unrevised +:jbake-date: 2018-12-05 +:jbake-type: page +:jbake-status: published + + +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 + +Property + +Type + +Default + +Description http://git-wip-us.apache.org/repos/asf/tomee/blob/513cf17a/docs/initialcontext-config.md ---------------------------------------------------------------------- diff --git a/docs/initialcontext-config.md b/docs/initialcontext-config.md deleted file mode 100644 index 8e60fbb..0000000 --- a/docs/initialcontext-config.md +++ /dev/null @@ -1,26 +0,0 @@ -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/513cf17a/docs/installation-drop-in-war.adoc ---------------------------------------------------------------------- diff --git a/docs/installation-drop-in-war.adoc b/docs/installation-drop-in-war.adoc new file mode 100644 index 0000000..127d7e4 --- /dev/null +++ b/docs/installation-drop-in-war.adoc @@ -0,0 +1,55 @@ +:index-group: Tips +and Tricks +:jbake-date: 2018-12-05 +:jbake-type: page +:jbake-status: published +:jbake-title: Installing TomEE using the drop-in .war approach + +NOTE: 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 link:dev/source-code.html[here]. + +* Download the Apache Tomcat 7.0.55 server. +http://tomcat.apache.org/download-70.cgi +* 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 (http://localhost:8080/tomee/) and +login with the user you added to tomcat-users.xml. +* Verify the values and click "Confirm". + +image:http://people.apache.org/~tveronezi/tomee/tomee_site/tomee_installer.png[alt +text] + +* Restart Tomcat. +* Your TomEE installation is now complete! http://git-wip-us.apache.org/repos/asf/tomee/blob/513cf17a/docs/installation-drop-in-war.md ---------------------------------------------------------------------- diff --git a/docs/installation-drop-in-war.md b/docs/installation-drop-in-war.md deleted file mode 100644 index b5191b6..0000000 --- a/docs/installation-drop-in-war.md +++ /dev/null @@ -1,45 +0,0 @@ -index-group=Tips and Tricks -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/513cf17a/docs/installation.adoc ---------------------------------------------------------------------- diff --git a/docs/installation.adoc b/docs/installation.adoc new file mode 100644 index 0000000..6a2cde2 --- /dev/null +++ b/docs/installation.adoc @@ -0,0 +1,35 @@ +# Installation +:index-group: Unrevised +:jbake-date: 2018-12-05 +:jbake-type: page +:jbake-status: published + +# 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/513cf17a/docs/installation.md ---------------------------------------------------------------------- diff --git a/docs/installation.md b/docs/installation.md deleted file mode 100644 index ec92778..0000000 --- a/docs/installation.md +++ /dev/null @@ -1,34 +0,0 @@ -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/513cf17a/docs/installing-tomee.adoc ---------------------------------------------------------------------- diff --git a/docs/installing-tomee.adoc b/docs/installing-tomee.adoc new file mode 100644 index 0000000..774cfae --- /dev/null +++ b/docs/installing-tomee.adoc @@ -0,0 +1,83 @@ +# Installing TomEE +:index-group: Unrevised +:jbake-date: 2018-12-05 +:jbake-type: page +:jbake-status: published + +NOTE: 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 +link:downloads.html[Downloads] 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 +https://repository.apache.org/content/groups/snapshots/org/apache/openejb/apache-tomee[Apache +Maven Snapshots Repository] 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`. http://git-wip-us.apache.org/repos/asf/tomee/blob/513cf17a/docs/installing-tomee.md ---------------------------------------------------------------------- diff --git a/docs/installing-tomee.md b/docs/installing-tomee.md deleted file mode 100644 index ed0b5ac..0000000 --- a/docs/installing-tomee.md +++ /dev/null @@ -1,71 +0,0 @@ -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/513cf17a/docs/java7.adoc ---------------------------------------------------------------------- diff --git a/docs/java7.adoc b/docs/java7.adoc new file mode 100644 index 0000000..71b15dd --- /dev/null +++ b/docs/java7.adoc @@ -0,0 +1,40 @@ +# TomEE and Java 7 +:index-group: Unrevised +:jbake-date: 2018-12-05 +:jbake-type: page +:jbake-status: published + +NOTE: 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/513cf17a/docs/java7.md ---------------------------------------------------------------------- diff --git a/docs/java7.md b/docs/java7.md deleted file mode 100644 index e9e0898..0000000 --- a/docs/java7.md +++ /dev/null @@ -1,40 +0,0 @@ -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/513cf17a/docs/javaagent-with-maven-surefire.adoc ---------------------------------------------------------------------- diff --git a/docs/javaagent-with-maven-surefire.adoc b/docs/javaagent-with-maven-surefire.adoc new file mode 100644 index 0000000..eaa3f42 --- /dev/null +++ b/docs/javaagent-with-maven-surefire.adoc @@ -0,0 +1,35 @@ +# JavaAgent with Maven Surefire +:index-group: Unrevised +:jbake-date: 2018-12-05 +:jbake-type: page +:jbake-status: published + +== 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 --> org.apache.maven.plugins maven-surefire-plugin +pertest + +-javaagent:latexmath:[${basedir}/target/openejb-javaagent-3.0.jar</argLine> <workingDirectory>$]\{basedir}/target + +.... + <!-- this tells maven to copy the openejb-javaagent jar into your +.... + +target/ directory --> org.apache.maven.plugins maven-dependency-plugin +copy process-resources copy org.apache.openejb openejb-javaagent 3.0 + +$\{project.build.directory} + +.... + </plugins> +</build> +.... http://git-wip-us.apache.org/repos/asf/tomee/blob/513cf17a/docs/javaagent-with-maven-surefire.md ---------------------------------------------------------------------- diff --git a/docs/javaagent-with-maven-surefire.md b/docs/javaagent-with-maven-surefire.md deleted file mode 100644 index 2d769aa..0000000 --- a/docs/javaagent-with-maven-surefire.md +++ /dev/null @@ -1,57 +0,0 @@ -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/513cf17a/docs/javaagent.adoc ---------------------------------------------------------------------- diff --git a/docs/javaagent.adoc b/docs/javaagent.adoc new file mode 100644 index 0000000..e4cc685 --- /dev/null +++ b/docs/javaagent.adoc @@ -0,0 +1,64 @@ +# JavaAgent +:index-group: Unrevised +:jbake-date: 2018-12-05 +:jbake-type: page +:jbake-status: published + + +# 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) +.... + +== 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/513cf17a/docs/javaagent.md ---------------------------------------------------------------------- diff --git a/docs/javaagent.md b/docs/javaagent.md deleted file mode 100644 index 9e4f8c4..0000000 --- a/docs/javaagent.md +++ /dev/null @@ -1,61 +0,0 @@ -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/513cf17a/docs/javaee7-status.adoc ---------------------------------------------------------------------- diff --git a/docs/javaee7-status.adoc b/docs/javaee7-status.adoc new file mode 100644 index 0000000..2d2af1f --- /dev/null +++ b/docs/javaee7-status.adoc @@ -0,0 +1,218 @@ +# Java EE 7 Implementation Status +:index-group: Unrevised +:jbake-date: 2018-12-05 +:jbake-type: page +:jbake-status: published + + +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. + +Version + +JSR + +TomEE + +TomEE+ + +Java Servlets + +3.1 + +340 + +(/) + +(/) + +JavaServer Pages (JSP) + +2.3 + +245 + +(/) + +(/) + +Expression Language (EL) + +3.0 + +341 + +(/) + +(/) + +JavaServer Faces (JSF) + +2.2 + +344 + +(/) + +(/) + +Java API for Websocket + +1.0 + +356 + +(/) + +(/) + +Java API for JSON Processing (JSON-P) + +1.0 + +353 + +(/) + +(/) + +Batch Applications for the Java Platform + +1.0 + +352 + +(/) + +Concurrency Utilities for Java EE + +1.0 + +236 + +(/) + +Contexts and Dependency Injection (CDI) + +1.1 + +346 + +(/) + +(/) + +Bean Validation + +1.1 + +349 + +(/) + +(/) + +Enterprise JavaBeans (EJB) + +3.2 + +345 + +(/) + +(/) + +Interceptors + +1.2 + +318 + +(/) + +(/) + +Java EE Connector Architecture + +1.6 + +322 + +1.7 not supported yet + +Java Persistence API (JPA) + +2.1 + +338 + +API 2.1 supported, default provider still 2.0. + +API 2.1 supported, default provider still 2.0. + +Java Messaging Service (JMS) + +1.1 + +343 + +2.0 not supported yet. + +Java Transaction API (JTA) + +1.2 + +907 + +(/) + +(/) + +JavaMail API + +1.5 + +919 + +(/) + +(/) + +Java API for RESTful Web Services (JAX-RS) + +2.0 + +339 + +(/) + +(/) + +Java API for XML Web Services (JAX-WS) + +2.2 + +224 + +(/) + +Java Authentication Service Provider Interface for Containers (JAAS) + +1.1 + +196 + +(/) + +(/) + +Java Authorization Contract for Coners (JACC) + +1.5 + +115 + +(/) + +(/) http://git-wip-us.apache.org/repos/asf/tomee/blob/513cf17a/docs/javaee7-status.md ---------------------------------------------------------------------- diff --git a/docs/javaee7-status.md b/docs/javaee7-status.md deleted file mode 100644 index a1e50d1..0000000 --- a/docs/javaee7-status.md +++ /dev/null @@ -1,185 +0,0 @@ -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/513cf17a/docs/javamailsession-config.adoc ---------------------------------------------------------------------- diff --git a/docs/javamailsession-config.adoc b/docs/javamailsession-config.adoc new file mode 100644 index 0000000..70e1500 --- /dev/null +++ b/docs/javamailsession-config.adoc @@ -0,0 +1,42 @@ +# JavaMailSession Configuration +:index-group: Configuration +:jbake-date: 2018-12-05 +:jbake-type: page +:jbake-status: published + + +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 + +Property + +Type + +Default + +Description http://git-wip-us.apache.org/repos/asf/tomee/blob/513cf17a/docs/javamailsession-config.md ---------------------------------------------------------------------- diff --git a/docs/javamailsession-config.md b/docs/javamailsession-config.md deleted file mode 100644 index 5f82e7c..0000000 --- a/docs/javamailsession-config.md +++ /dev/null @@ -1,26 +0,0 @@ -index-group=Configuration -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>
