wood burning stoves 2.0*
The moose likes EJB and other Java EE Technologies and the fly likes EJB2.0 or EJB3.0? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "EJB2.0 or EJB3.0?" Watch "EJB2.0 or EJB3.0?" New topic
Author

EJB2.0 or EJB3.0?

Mary Koh
Ranch Hand

Joined: Feb 19, 2012
Posts: 33
Hi,

I am using MyEclipse Blue 10 with WebSphere 6.1. Should I use EJB2.0 or EJB3.0?
Joemon Anthony
Greenhorn

Joined: May 22, 2011
Posts: 26

Go with EJB3


(SCJP 5, OCA 9i)
(Always interested in learning)
Mary Koh
Ranch Hand

Joined: Feb 19, 2012
Posts: 33
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

Joined: Aug 02, 2005
Posts: 27
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

Joined: May 22, 2011
Posts: 26

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

Joined: Feb 19, 2012
Posts: 33
Hi Carlo, Joemon,

I see. Since thats the case, I think its better to stick with 2.1.
Carlo Moore
Greenhorn

Joined: Aug 02, 2005
Posts: 27
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

Joined: May 26, 2003
Posts: 30957
    
158

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.


[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
Mary Koh
Ranch Hand

Joined: Feb 19, 2012
Posts: 33
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

Joined: Feb 19, 2012
Posts: 33
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

Joined: Mar 15, 2012
Posts: 80
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

Joined: Feb 19, 2012
Posts: 33
Does ejb-jar.xml and ejb-jar-bnd.xmi still used in ejb 3.0?
Eshwin Sukhdeve
Ranch Hand

Joined: Mar 15, 2012
Posts: 80
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

Joined: Feb 19, 2012
Posts: 33
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

Joined: Mar 15, 2012
Posts: 80
you wanted to know how local interface works in ejb3.0?
Mary Koh
Ranch Hand

Joined: Feb 19, 2012
Posts: 33
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

Joined: Mar 15, 2012
Posts: 80
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

Joined: Feb 19, 2012
Posts: 33
thanks for the links! (:
I found another link as well
http://www.adam-bien.com/roller/abien/entry/is_it_worth_using_pojos
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: EJB2.0 or EJB3.0?