开发者

Java EE sample App

开发者 https://www.devze.com 2022-12-20 11:40 出处:网络
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:

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 develope开发者_开发知识库d 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.


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.


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

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


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 Java EE.


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).


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.

0

精彩评论

暂无评论...
验证码 换一张
取 消