You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomee.apache.org by Anonymous CMS User <an...@apache.org> on 2012/09/13 04:55:32 UTC
CMS diff:
Clone URL (Committers only):
https://cms.apache.org/redirect?new=anonymous;action=diff;uri=http://openejb.apache.org/deploying-in-tomee.mdtext
Index: trunk/content/deploying-in-tomee.mdtext
===================================================================
--- trunk/content/deploying-in-tomee.mdtext (revision 1384164)
+++ trunk/content/deploying-in-tomee.mdtext (working copy)
@@ -35,12 +35,13 @@
The basic idea of this approach is that your Servlets and EJBs are together
in your WAR file as one app.
--No classloader boundries between Servlets and EJBs
--EJBs and Servlets can share all third-party libraries (like Spring\!) -
-no EAR required.
--Can put the web.xml and ejb-jar.xml in the same archive (the WAR file).
--EJBs can see Servlet classes and vice versa.
+ - No classloader boundries between Servlets and EJBs
+ - EJBs and Servlets can share all third-party libraries (like Spring\!)
+ - no EAR required.
+ - Can put the web.xml and ejb-jar.xml in the same archive (the WAR file).
+ - EJBs can see Servlet classes and vice versa.
+
<a name="CollapsedEAR-NotquiteJ2EE(itistrulyJava EE6)"></a>
#### Not quite J2EE (it is truly Java EE6)
@@ -51,21 +52,16 @@
we would've been waiting for so long.
#### J2EE classloading rules:
--You cannot ever have EJBs and servlets in the same classloader.
--Three classloader minimum; a classloader for the ear, one for each
-ejb-jar, and one for each WAR file.
+ - You cannot ever have EJBs and servlets in the same classloader.
+ - Three classloader minimum; a classloader for the ear, one for each ejb-jar, and one for each WAR file.
+ - Servlets can see EJBs, but EJBs cannot see servlets.
--Servlets can see EJBs, but EJBs cannot see servlets.
+**To pull that off, J2EE has to `kill you` on packaging:**
- To pull that off, J2EE has to kill you on packaging:
--You cannot have EJB classes and Servlet classes in the same archive.
+ - You cannot have EJB classes and Servlet classes in the same archive.
+ - You need at least three archives to combine servlets and ejbs; 1 EAR containing 1 EJB jar and 1 servlet WAR.
+ - Shared libraries must go in the EAR and be included in a specially formatted 'Class-Path' entry in the EAR's MANIFEST file.
--You need at least three archives to combine servlets and ejbs; 1 EAR
-containing 1 EJB jar and 1 servlet WAR.
-
--Shared libraries must go in the EAR and be included in a specially
-formatted 'Class-Path' entry in the EAR's MANIFEST file.
-
- Critically speaking, forcing more than one classloader on an application
+Critically speaking, forcing more than one classloader on an application
is where J2EE "jumps the shark" for a large majority of people's needs.
\ No newline at end of file