Jetty 8 + EJB 3.1 + JTA + CDI + JPA 2 stack?

我是研究僧i 提交于 2019-11-30 09:23:33

I'd describe this as still in the early stages, but here is what we have so far:

http://svn.apache.org/repos/asf/openejb/trunk/openejb3/assembly/openejb-jetty/

Note, Apache TomEE lives at a similar path, i.e. 'assembly/openejb-tomcat'. Plan is to call the Jetty version Apache JetSet and have it be fully embeddable. Most people with commit are currently working on getting Apache TomEE to be officially Java EE 6 Web Profile certified. I'd describe that work to be in the late stages. We've a great setup in Amazon EC2 to run the web profile TCK against TomEE using a hundred EC2 t1.micro spot instances. It's pretty sweet. The TCK agreement with Apache and Oracle does not allow us to share access publicly. However, any Apache committer can sign an NDA to get access.

Ok, so I mention all that about TomEE because the plan is once we're done with the Tomcat version, to do it all over again with Jetty (JetSet). Many of us committers, myself and Jonathan Gallimore for example, actually prefer Jetty by a large margin. But as the Tomcat integration code was much further along and had more users, we decided to just finish that one first. There is an incredible amount of work that isn't Tomcat specific that we will be able to leverage in the Jetty version; getting access to the TCK legally, the heaps of code to get it to run, the more heaps of code to get it automated, and numerous integration bits which are generic and not specific to Tomcat.

All that said, there's no reason others have to wait to work on a Jetty version just because most of us are still finishing the Tomcat version. Apache projects should be viewed as individuals working together, not companies like Oracle or Redhat or VMWare. That can be both good and bad. The good part is that if you or anyone else wants to hack on the Jetty version you can do that right now. You'll have to submit patches for awhile till you earn commit, but having someone else do the actual commit command is not that bad. If you start small and stay active and open, it's usually pretty easy to earn commit. The key to getting patches in quickly is a steady stream of small to moderately sized patches. Any step forward or sideways with no steps backward is a good patch in my opinion. As long as people can see where you're going it's good enough. Certainly more Agile than the one-big-patch approach and allows for all the really fun and collaborative magic to happen along the way.

Some threads which would be good places to say hello. Step 1 is just to say hello. No need to have code in hand to talk on the dev list or be taken seriously:

http://openejb.979440.n4.nabble.com/Jetty-Integration-td1457408.html http://openejb.979440.n4.nabble.com/Jetty-Integration-td2318962.html

Tomcat has that stack implemented in a server called TomEE(formerly TomTom).

These are the components it uses.

Connector    Apache Geronimo Connector
CDI  Apache OpenWebBeans
EJB  Apache OpenEJB
Javamail     Apache Geronimo JavaMail
JPA  Apache OpenJPA
JSF  Apache MyFaces
JSP  Apache Tomcat
JSTL     Apache Tomcat
JTA  Apache Geronimo Transaction
Servlet  Apache Tomcat

As far as Jetty I'm not sure. OpenEJB is your only option for EJB outside of a JavaEE6 container(AFAIK) and I'm not sure Jetty is 100% tested with this. For CDI you can always use something like Seam.

In my opinion I believe the Spring framework would be your best option for the Jetty container(that's just my opinion though). In my experience after trying to get Tomcat working with Open EJB, Spring is a lot easier to set up.

You also have to remember Open EJB doesn't implement the entire EJB 3.1 stack at this point.

Also Open EJB is not tested on Tomcat 7 either. So you have to stay with Tomcat 6 if you go that route.

OpenEjb has not released a version with JPA2 support, although their development version supports JPA2 fine AFAIK. I'm using embedded OpenEjb in Jetty6, because I could not get my app working in newer jetties yet. I think there is work under way to get an OpenEJB tightly integrated with Jetty like TomEE, but that may be some way off..

Geronimo is a complete J2EE stack which runs on top of Jetty.

There's a document on its setup on https://cwiki.apache.org/GMOxDOC30/configuring-virtual-host-in-jetty.html

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!