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

EJB2.0 or EJB3.0?

 
Mary Koh
Ranch Hand
Posts: 33
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I am using MyEclipse Blue 10 with WebSphere 6.1. Should I use EJB2.0 or EJB3.0?
 
Joemon Anthony
Greenhorn
Posts: 26
Java Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Go with EJB3
 
Mary Koh
Ranch Hand
Posts: 33
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Joemon Anthony wrote:Go with EJB3


Hi,

My EAR project is J2EE 1.4, EJB is 2.1.. Will the project works well with EJB3.0?
 
Carlo Moore
Greenhorn
Posts: 27
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
There are major differences between EJB 2.1 and EJB 3. You will need to modify a lot of your code in order to use EJB 3. EJB 3 is a lot simpler and straight foreward to use than EJB 2.1 though.
 
Joemon Anthony
Greenhorn
Posts: 26
Java Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Carlo Moore :
There are major differences between EJB 2.1 and EJB 3. You will need to modify a lot of your code in order to use EJB 3. EJB 3 is a lot simpler and straight foreward to use than EJB 2.1 though.


This is absolutely right.

It takes a lot of effort to convert EJB2.1 to EJB 3. When I told you(Mary Koh) to use EJB3, I was not aware that you were using EJB 2.1.
 
Mary Koh
Ranch Hand
Posts: 33
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Carlo, Joemon,

I see. Since thats the case, I think its better to stick with 2.1.
 
Carlo Moore
Greenhorn
Posts: 27
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I think you might have to eventually take the plunge and upgrade though.
I am sure you can find some technical guides on how to upgrade from 2.1 to 3. There are a lot of resources available for learning EJB 3.
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 34837
369
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Carlo Moore wrote:There are major differences between EJB 2.1 and EJB 3. You will need to modify a lot of your code in order to use EJB 3. EJB 3 is a lot simpler and straight foreward to use than EJB 2.1 though.

THis is true for existing code. For a new component, you wouldn't need to modify anything since the code doesn't exist yet. In which case, I'd go with EJB 3 to avoid having to migrate it later.

Moot point here though as JEE 1.4 doesn't support EJB 3 so the original poster has to go with EJB 2.1.
 
Mary Koh
Ranch Hand
Posts: 33
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Jeanne Boyarsky wrote:
Carlo Moore wrote:There are major differences between EJB 2.1 and EJB 3. You will need to modify a lot of your code in order to use EJB 3. EJB 3 is a lot simpler and straight foreward to use than EJB 2.1 though.

THis is true for existing code. For a new component, you wouldn't need to modify anything since the code doesn't exist yet. In which case, I'd go with EJB 3 to avoid having to migrate it later.

Moot point here though as JEE 1.4 doesn't support EJB 3 so the original poster has to go with EJB 2.1.


Hi guys,

Thanks for the suggestions and comments. (:
 
Mary Koh
Ranch Hand
Posts: 33
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Currently in ejb2.1, I have pojos and session bean.
How can I migrate it to ejb3.0 as I'm still new to ejb3.0
 
Eshwin Sukhdeve
Ranch Hand
Posts: 90
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Mary,
if you dont have much idea about EJB3.0.so my suggetion is first go through it and understand the concpet
of EJB3.0.because there are so many defferences btwen 2.0 and 3.0.try with sample programs.
 
Mary Koh
Ranch Hand
Posts: 33
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Does ejb-jar.xml and ejb-jar-bnd.xmi still used in ejb 3.0?
 
Eshwin Sukhdeve
Ranch Hand
Posts: 90
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
ejb-jar.xml is optional in in EJB3.0..I am not sure about ejb-jar-bnd.xml..but we can use it in EJB3.0
 
Mary Koh
Ranch Hand
Posts: 33
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is there examples that anyone can provide? I am trying out ejb 3.0.
I need to know how can I access the another local interface as well as how can I access the local interface from web project.
Appreciate the help here.
 
Eshwin Sukhdeve
Ranch Hand
Posts: 90
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
you wanted to know how local interface works in ejb3.0?
 
Mary Koh
Ranch Hand
Posts: 33
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes. I would like to know more about it.
I managed to make a local reference to another ejb at ejb and web project now.
 
Eshwin Sukhdeve
Ranch Hand
Posts: 90
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
go through this links

http://trycatchfinally.blogspot.in/2006/03/remote-or-local-interface.html

http://www.devx.com/java/Article/30045/0/page/2

just let me know if it is helpful for you..
 
Mary Koh
Ranch Hand
Posts: 33
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thanks for the links! (:
I found another link as well
http://www.adam-bien.com/roller/abien/entry/is_it_worth_using_pojos
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic