• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Do I need to install Java EE ?

 
Ranch Hand
Posts: 375
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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 ?
 
author & internet detective
Posts: 41860
908
Eclipse IDE VI Editor Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 375
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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 ?
 
Ranch Hand
Posts: 69
Eclipse IDE Firefox Browser Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You can get that jar from application server's lib folder.
or download them from net.
and add them in your project's classpath
 
Ranch Hand
Posts: 2187
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 375
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 2187
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 375
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 2187
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 375
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

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
Posts: 6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
reply
    Bookmark Topic Watch Topic
  • New Topic