| Author |
EJB 2.x and EJB 3 coexisting
|
Joe Harry
Ranch Hand
Joined: Sep 26, 2006
Posts: 8795
|
|
Guys, I have a scenario where the new requirements are being developed using EJB 3 Stateless beans with the old EJB 2.x CMP Entity beans. The question I have is that I read from the book EJB 3 in Action that I just need to change the ejb-jar.xml file as, But we do not use Schema rather a DTD as below, So in the above case, is it just enough to change the 2.0 to 3.0 to make my ejb-jar EJB 3 compatible? Please help!
|
SCJP 1.4, SCWCD 1.4 - Hints for you, SCBCD Hints - Demnachst, SCDJWS - Auch Demnachst
Did a rm -R / to find out that I lost my entire Linux installation!
|
 |
Christophe Verré
Sheriff
Joined: Nov 24, 2005
Posts: 14672
|
|
|
I don't think there is any DTD for EBJ3. I think you'll have to replace the old DOCTYPE with the new Schema format.
|
[My Blog]
All roads lead to JavaRanch
|
 |
Joe Harry
Ranch Hand
Joined: Sep 26, 2006
Posts: 8795
|
|
|
Where can I find an example of the XML schema for EJB 3?
|
 |
Christophe Verré
Sheriff
Joined: Nov 24, 2005
Posts: 14672
|
|
You mean a real example ? Sorry, I don't know. By the way, the declaration you've posted above is a bit different from the official one :
|
 |
Jaikiran Pai
Marshal
Joined: Jul 20, 2005
Posts: 8145
|
|
Originally posted by Jothi Shankar Kumar Sankararaj: Where can I find an example of the XML schema for EJB 3?
I believe, you already know that in EJB3 the ejb-jar.xml is optional. As such, most of the examples available do not use the xml and instead illustrate the annotations usage.
|
[My Blog] [JavaRanch Journal]
|
 |
Joe Harry
Ranch Hand
Joined: Sep 26, 2006
Posts: 8795
|
|
Originally posted by Jaikiran Pai: I believe, you already know that in EJB3 the ejb-jar.xml is optional. As such, most of the examples available do not use the xml and instead illustrate the annotations usage.
I know but I want to make both EJB 3 and EJB 2.0 beans co exist and for this the simplest solution that I can assume is the one that is posted above (still make use of the ejb-jar.xml).
|
 |
Jaikiran Pai
Marshal
Joined: Jul 20, 2005
Posts: 8145
|
|
Originally posted by Jothi Shankar Kumar Sankararaj: I know but I want to make both EJB 3 and EJB 2.0 beans co exist and for this the simplest solution that I can assume is the one that is posted above (still make use of the ejb-jar.xml).
Okay. This is possible. Here's an example from the JBoss documentation.
|
 |
Jeanne Boyarsky
internet detective
Marshal
Joined: May 26, 2003
Posts: 26192
|
|
|
Or if you need the actual XML schema spec, Sun has it online
|
[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
|
 |
 |
|
|
subject: EJB 2.x and EJB 3 coexisting
|
|
|