Hi Scott,

Not sure what you mean by container managed service, tomcat on its own is a servlet container, not an application container, like JBoss, maybe you saw hibernate referenced in Spring which is a whole collection of frameworks built on top of servlet technology, it uses hibernate, and has an EJB container and everything else you can think of. Spring competes with JBoss and the Sun spec. Some say the reason for EJB3 is because of Springs rapid growth and good idea's.

Personally I'm thankful Tomcat hasnt tried to become a "Super Can"... hope it never does.

I'm pretty certain that in the Hibernate manual on their site, I saw an example of how to persist in servlet technology, but remember its still not an application server, all they doing is allowing you to save a session bean to disk (dB). Hibernate is amazing technology, didnt have time to find out exactly how they do it, but I think they use reflection to pick up the get and set methods and then, insert some method probably via BCEL into the java binary class constructor, so that when the class loads it gets the data from the dB and populates the properties.... but thats all it really does, its not a container on its own.

You can run Hibernate against any Java bean type class, doesnt have to be in Tomcat or anything, but I think if your code is something that was written for JBOSS and you trying to port it to another container... its going to be very very difficult. Probably uses all sorts of annotations that glue it to JBOSS.

Anyway if you knew all this, ignore my lecture... and its not a stupid question, its seems there are pure application servers out there that consider servlet technology to be a component of the application server... think it stems from the Sun spec and JBOSS is one of them. Tomcat is just a component in JBOSS. Then there is the Spring framework which seems to have grown off the top of Servlet technology, and then there is also RESIN, which most people call a very good servlet container, but it also has an EJB container built in. So I think its becoming a grey area... Servlet technology is so powerful, I think its a natural rival to any other container out there.

Just to prove the point... I wrote an Application server for Tomcat, but I must warn you that I dont like the complexity of the Super Cans, and its very very simple in comparison... means you will get it running in an hour, but if you want to use hibernate, you have to do it yourself, there are no annotations or xml glue.
Can get it at http://coolese.100free.com
Anyway its interesting... will the application server absorb the servlet, or will the servlet trample the stand alone application server into extinction... I think Servlets are winning and will win, which kinda creates all sorts of problems for the Sun Specs. Will probably end up as, if you want to run a bank... use JBOSS or the Sun equiv, but for everything else I think its going to be servlets.

So, dont know what you doing, but dont write off Tomcat or servlets... its an absolutely amazing technology... worth a good look. If it is just a web application you trying to port, and its used some Super Can technology for persistance, I think its going to be easier to replace that.
Think you'll find Tomcat a whole lot easier to learn than JBOSS.
Whew! I can waffel :)

----- Original Message ----- From: "Scott Purcell" <[EMAIL PROTECTED]>
To: "Tomcat Users List" <users@tomcat.apache.org>
Sent: Monday, March 12, 2007 4:11 PM
Subject: EJB 3.0 and Hibernate


Hello,

Looking at incorporating the Java Persistence API (EJB 3.0) and was wondering if Tomcat 5.5 supports this. It looks like we need container managed services and was wondering if we can use Tomcat instead of JBoss?

Thanks,
Scott


---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to