Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Beginer to EJB technology

 
Lakmal Abeysekara
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Everyone,
I am new to EJB technology. I am preparing for SCBCD 5. I want to learn how to compile and run EJB applications. Can I do this without using an IDE? I heared some people were telling "It is better not to use IDE when you learning new thing". They argue that we can understand more things by compiling, deploying and running manually. Please tell me your idea about that.
What are the recomended IDEs for developing EJBs?
What are the recomended EJB containers?
Thank You
--------------

SCJP 1.4 SCWCD 5.0
 
Devaka Cooray
ExamLab Creator
Marshal
Pie
Posts: 4588
302
Chrome Eclipse IDE Google App Engine IntelliJ IDE jQuery Postgres Database Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello Lakmal,

Well, you need to use Apache Ant for this purpose. You need a build.xml file that contains instructions for the compilation, deploying, running, ....
 
Chaminda Amarasinghe
Ranch Hand
Posts: 413
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Lakmal,

Hope you from Sri Lanka, Welcome to forum, And thanks for not asking stupid "what is recommended book" question.

About your question,

Compiling and packaging is same as you plain j2se. you can use simple editor like vi (linux) or notepad (win). For compiling your regular java compiler "javac" and for packaging "jar". You NO NEED any build tool like ant or maven or any IDE.

But you can use build tool and an IDE for speedup development. I recommend Maven2 (Ant is now out dated . I hate Ant now. ) for build and Netbeans for development.

like SCJP, SCBCD does not more concern about syntax error. So in my point of view using an IDE and build tool is NOT a bad thing in SCBCD.

Good luck.

Cham
 
aleem khan
Ranch Hand
Posts: 94
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I Agree with Chaminda

In todays fast world it is more important to learn concepts as fast possible, so i think it is better to use IDE and deploy using IDE because if you are working in a real time projects you have to use these IDE'S ...you can't just use notepad and start doing each step manually... if in future you have to use IDE then why not start practicing from the begining itself? More important you should concentrate on grasping the Concepts of EJB3.0 ... so stop worrying about IDE ,ANT etc and use those IDE'S and procedure in which you are most comfortable..
 
Lakmal Abeysekara
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you all,

Thank you all for giving me valuable information. Chamida's guess is correct. I am a university student from Sri Lanka.

Today my question is this.
I have installed NetBeans 5.5.1 in my computer. Can I run EJB using it? Should I install new version of NetBeans?
 
Chaminda Amarasinghe
Ranch Hand
Posts: 413
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Lakmal,

Welcome again,

You should understand the different between IDE and container. EJBs run only in a container such as glassfish, jboss, but not in IDEs suchas NB or eclipse. IDES come into action in the development (+ deployment) but not in running...

Thanks
 
Reza Rahman
author
Ranch Hand
Posts: 580
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Chaminda,

Actually, this is not entirely correct. If you want, you can use an embedded EJB container (OpenEJB, JBoss, EasyBeans, GlassFish) to unit/integration test EJB code inside an IDE (in-memory).

Regards,
Reza
 
Chaminda Amarasinghe
Ranch Hand
Posts: 413
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Reza Rahman:
Chaminda,

Actually, this is not entirely correct. If you want, you can use an embedded EJB container (OpenEJB, JBoss, EasyBeans, GlassFish) to unit/integration test EJB code inside an IDE (in-memory).

Regards,
Reza


In this case Im entirely correct. Embedding a (micro or what ever) container in to IDE and Run ejbs inside that embedded container does not mean that IDE can run ejbs, In this case IDE can run ejbs because its embedded CONTAINER.

For a example, You are a man, You have a gun. So you can fire bullets. That does not mean that every man can fire. You could fire because you had a gun. So only gun can fire bullets but not man.

So that emphasis that for Running ejbs we must have a CONTAINER not an IDE (Actually IDE has does not have an proper definition, but a container has)

Dear Reza,
Anyway thank you very much for coming here even in your busy life and sharing your valuable experience and learing with us. Your book is really nice. easy to read.

Thanks
[ November 10, 2008: Message edited by: Chaminda Amarasinghe ]
 
Reza Rahman
author
Ranch Hand
Posts: 580
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Chaminda,

OK, point taken. The impression I am trying to avoid is that you need something else "running" besides the IDE and some jars in the classpath to get EJBs to execute from Java code.

Regards,
Reza

P.S.: Thanks for the kind words -- I try my best...
 
Higor Zardo
Ranch Hand
Posts: 59
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
My God, this is Reza the EJB 3 In Action authors?
This is unbelievable!!
I bought your book and it's coming tomorrow /o/

Thank you,
Higor
 
Deepak Jain
Ranch Hand
Posts: 637
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Wow Reza the "Author" of EJB 3 in Action is here.
I just got your book and starting with EJB3.
 
Reza Rahman
author
Ranch Hand
Posts: 580
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Higor/Deepak,

Thanks for buying the book and hope you enjoy it. I do try to help on these forums as time permits. I like the JavaRanch model in that most discussions are kept sanitized from the usual problems of open forums on the web.

Regards,
Reza
 
Niranjan Deshpande
Ranch Hand
Posts: 1277
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The guru himself on the forum! Amazing!

Even I am going to grab my hands on the book!
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic