views:

195

answers:

5
+6  Q: 

Java EE sample App

I have been using Java SE for 2 yrs now and I am pretty ok with the fundamentals of Java. I would like to move to the Java EE API and develop something based on this. I have 2 questions:

  1. Does the EE API contain all the classes of the SE? i.e. can anything developed in the SE also be developed using the EE API?

  2. Can anybody point me in the direction or offer a suggestion for the development of a sample Java EE application such as a web service or something. Ideally, this sample app would be testable on my local machine and would be worthy of placing in my portfolio for future job interviews as a Java developer.

+4  A: 

Does the EE API contain all the classes of the SE?

Yes. The Java EE platform is built on top of the Java SE platform.

Can anybody point me in the direction or offer a suggestion for the development of a sample Java EE application

Have a look at the Java EE Code Samples & Apps.

Pascal Thivent
Note that Java EE API doesn't ship along with Java SE API (which his question was all about). You still need to install it separately in flavor of either a JDK or JRE. Normally you'd like to pick the JDK.
BalusC
+1  A: 

To answer your first question, Java EE is a large set of APIs (Servlets, EJB, JNDI, JDBC etc.).

It supplements the JSE and is distinct from JSE and whichever implementations you choose provide additional functionality to that available in JSE.

Brian Agnew
A: 

The EE is a superset of SE, but most of the difference is in how you expect to deploy it.

SE tends to be deployed as a single app that runs on one machine.

EE is a set of tools and APIs added to SE that allow for deployment in various client/server configurations (most notably, web).

Bill K
+1  A: 

There are a couple of Java EE example applications in the Java EE 5 Tutorial. See the Case Studies section. Also note that the Java EE tutorial is updated for Java 6, I just don't see the case studies, which I think will be the most applicable section to your question.

As far as Java EE API containing all of the classes of the Java SE API, I don't know of anything that's missing from JEE.

Bill the Lizard
A: 

There are some restrictions using various parts of EE. For instance when programming EJBs you shouldn't access files because there is no guarantee there is a filesystem available (I don't think many containers mind if you actually do ... but thats another matter ...), and you shouldn't start threads, because that part is supposed to be handled by the container (if you do you may experience unexpected results).

Over time EE and standard edition seems to get closer and closer. JDBC is an EE API, but it has always been shipped with standard edition. Today Entity beans and the JPA api is also available without a full EE stack, you can run it in a standard JVM or a webcontainer like Tomcat, but you need an implementation like Hibernate or OpenJPA and a database (like the one embedded in the JDK or any other). You miss the ejb-containers automatic transaction handling though, but you may just as well need that control yourself, depending on the application.

deleted