I have just started preparing for the SCBCD certification and I am completely new to EJB. I have started reading EJB 3 in action and Head First EJB and i am "deadlocked" in the very first "Hello world" which cannot compile. I know that I have to install EE Jdk. I have downloaded it from http://java.sun.com/javaee/downloads/index.jsp?userOsIndex=6&userOsId=windows&userOsName=Windows, under my project specification, java build path, libraries, i select to add new library and specifically new JRE System library and select it from the folder which i have installed the ee jdk. The import javax.ejb.* still is not recognised, does anybody knows what I'm doing wrong?
The IDE platform I am using is IBM Rational Application Developer, version 7.0.08.
You have probably create J2SE project, and you should have J2EE. Then you can import ejb libraries without problem.
SCJP, SCWCD, OCUP
Joined: Sep 09, 2009
The options available under J2EE are the following:
Application Client Project
Enterprise Application Project
Utility project and there is another which is not in the J2EE section called EJB Project.
Clearly I have not used neither of them.
Although both books mention that they are intended also for developers with no J2EE experience none of them at least devote a single page to how you should set your project prior proceed to coding.. I'm searching all over google to see how on earth i will start coding this simple example
Joined: Feb 17, 2009
I have never used this IDE, so it is hard for me to say which of those you should choose. In my opinion, the best solution would be to start your journey with EJB by using NetBeans - there is a lot of tutorials in the Internet, and it will be much simple.
Nicolas Kal wrote: .. under my project specification, java build path, libraries, i select to add new library and specifically new JRE System library and select it from the folder which i have installed the ee jdk. The import javax.ejb.* still is not recognised, does anybody knows what I'm doing wrong?
You should add the .jar file(s) provided for the EJB by the container as a library (this is in general but not specific to the IDE you are using).