wood burning stoves 2.0*
The moose likes EJB and other Java EE Technologies and the fly likes Do I need to install Java EE ? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "Do I need to install Java EE ?" Watch "Do I need to install Java EE ?" New topic
Author

Do I need to install Java EE ?

ben oliver
Ranch Hand

Joined: Mar 28, 2006
Posts: 375
I have installed JDk 6, Glass Fish, and Netbean IDE. In order to run ejb 3, do I need to install J2EE 6 SDK ? Is JDK 6 + GlassFish + NetBean already enough ? It seems J2EE 6 always include a GlassFish, so what does J2EE 6 have excluding GlassFish, does it have something essential to EJB development that neither JDK 6 and GlassFish have ?
Jeanne Boyarsky
author & internet detective
Marshal

Joined: May 26, 2003
Posts: 30752
    
156

Ben,
JEE 6 comes with your applications server - Glassfish in your case. The one you can download separately is a "reference implementation". You don't need it if you have an app server.


[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
Chuck Stephanski
Greenhorn

Joined: Aug 25, 2010
Posts: 5
When you install a Java EE Application Server such as Glass Fish, implementations of all the Java EE API's are installed. EJB is a JEE API, so with Glass Fish installed you have EJB.
ben oliver
Ranch Hand

Joined: Mar 28, 2006
Posts: 375
I see. But the application server only helps if you deploys a j2ee application to the server, right ? When you are coding your ejb codes, how do you compile them ? Don't you need any J2EE 6 jar and where do you get that jar ?
mahesh shinde
Ranch Hand

Joined: Jul 24, 2009
Posts: 69

You can get that jar from application server's lib folder.
or download them from net.
and add them in your project's classpath
Jimmy Clark
Ranch Hand

Joined: Apr 16, 2008
Posts: 2187
A Java-based application server is "required" in order to execute EJB components.

If you are writing the EJB source code in a basic text editor, you will need to have the associated EJB classes in you classpath when you execute the command-;ine to compile the code.

If you are writing the EJB source code in an Integrated Development Environment (IDE) such as NetBeans, then you need to make sure that the EJB jar files have been added to the IDE.
ben oliver
Ranch Hand

Joined: Mar 28, 2006
Posts: 375
Thanks for the response. Let's say I use IDE 6.9.x, do I need to add a application server (like glassfish or jBoss) 's jar file into the classpath in order to compile EJB codes ? I know for MyEclipse I don't need to add such application server's jar, I can just create an EJB project and it automatically compiles, why can it work that way ?
Jimmy Clark
Ranch Hand

Joined: Apr 16, 2008
Posts: 2187
There are different types of EJB-based code, e.g. server-side components and EJB clients. In any IDE you will need the appropriate class files in order to compile.
ben oliver
Ranch Hand

Joined: Mar 28, 2006
Posts: 375
Frank, let's say I need to compile EJB server code. what specific EJB class file you are talking about ? My question is what do I need to compile them without an application server, you are saying adding some class files to classpath, what class file ?
Jimmy Clark
Ranch Hand

Joined: Apr 16, 2008
Posts: 2187
Ben, EJB programming is a very complex topic and typically handled by seasoned experts. If you are just starting to learn EJB, and it seems so, then you would benefit from purchasing a few books about EJB development. If you are interested in dedicated training, I know of a software training company that would be able to set up an individual course for you. It would not cost much, a few hundred dollars.


Enterprise JavaBeans 3.0 (5th Edition)
http://www.amazon.com/Enterprise-JavaBeans-3-0-Richard-Monson-Haefel/dp/059600978X
ben oliver
Ranch Hand

Joined: Mar 28, 2006
Posts: 375
Jimmy Clark wrote:Ben, EJB programming is a very complex topic and typically handled by seasoned experts. If you are just starting to learn EJB, and it seems so, then you would benefit from purchasing a few books about EJB development. If you are interested in dedicated training, I know of a software training company that would be able to set up an individual course for you. It would not cost much, a few hundred dollars.


Enterprise JavaBeans 3.0 (5th Edition)
http://www.amazon.com/Enterprise-JavaBeans-3-0-Richard-Monson-Haefel/dp/059600978X


Thanks for your advice, I am seeking training resource at this point.
Chuck Stephanski
Greenhorn

Joined: Aug 25, 2010
Posts: 5
A Java Application Server such as Glassfish, JBoss, Weblogic, etc is a complete implementation of all of the Java EE specifications, of which EJB is one. As such, app servers lay down a large number of jar files on your disk when you install them. Most java IDE's have a project wizard that asks you what technologies your project will include when you set it up. They use this to copy the appropriate jars to your class path.

Note that most (perhaps all) of the Java EE API's have standalone implementations. So for example, OpenEJB is a standalone implementation of EJB that allows one to develop against the EJB API w/o installing an application server.

IMO Ben, I would not invest in learning EJB. I would learn the Java EE 6 stack, with a focus on JPA, JSF and CDI. EJB has a de-emphasized role in JEE5, and a further de-emphasized role in JEE6.
 
 
subject: Do I need to install Java EE ?