3

Please I would like to know the major difference between a Jave EE project and a Java Web project in netbeans IDE with respect to the EJB. In fact you can create a web application based on EJB, JPA and JavaServer Faces in Netbeans IDE if you choose the Java Web category.

On the other hand you choose the project category as Jave EE project, NetBeans IDE will create 3 sub-projects, e.g: StoreApp (Enterprise Application project), StoreApp-ejb (EJB project), and StoreApp-war (Web project).

Szymon
  • 42,577
  • 16
  • 96
  • 114
soulemane moumie
  • 1,005
  • 1
  • 14
  • 26

4 Answers4

4

The first one will be packaged as a single .war file, the second one will be packaged as an .ear file, containing the web .war and the EJB .jar.

The difference between these is a bit broad to handle here, but I wouldn't advise on creating EARs unless you know that you want/need to.

Kayaman
  • 72,141
  • 5
  • 83
  • 121
  • Well said, so using separate packages of Java EE project is a recipe for disaster unless someone really know what he is doing, it requires advanced knowledge of EJB technology. I have been using the java web project so far and I have found it easy. Any way thanks for the concise answer. – soulemane moumie Dec 25 '13 at 10:42
  • Basically yes. I wouldn't say it's a disaster, but if you don't know that you need EAR, then you probably won't need it. – Kayaman Dec 26 '13 at 09:11
1

I think you should learn firstly about web server and a application server.. well i'll happy to help you.

1) we cannot run enterprise application in web server.. i.e. if u are using EJB etc. to run this EJB project you have to use Application Server like JBoss and many more.

2) while using web server it cannot load any heavy application means if your application having multiple users , in that case connection pooling will come into the picture. for connection pooling Application server much better then web server.

For more you can visit below link:-

What is the difference between application server and web server?

I hope it'll helps you

Thanks!!!

Community
  • 1
  • 1
  • You can't really run anything in a web server. In its purest form it'll just serve pages. If you add things to a web server (such as appropriate modules to Apache), you'll be able to run CGI scripts and such. – Kayaman Dec 26 '13 at 09:13
0

There are 3 kinds of project/application:

  1. Standalone Java application and sometimes call it as swing application. Bundle it in the form of Jar and you can run this application without any web or application server.
  2. Web-application: Basically we have to create a war which is combined with html/jsp,jar etc. This war file has to deployed into webcontainer.

  3. Enterprise Application: We have to create a EAR file which is combined with war, EJB & jar. This has to deployed into application server.

-1

A very helpful tutorial https://www.youtube.com/watch?v=6vMB3rzN_Xw

Hope this helpes... cheers!!!

VSN
  • 2,361
  • 22
  • 30