Win a copy of Head First Android this week in the Android forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Tim Cooke
  • Junilu Lacar
Sheriffs:
  • Rob Spoor
  • Devaka Cooray
  • Jeanne Boyarsky
Saloon Keepers:
  • Jesse Silverman
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
  • Tim Holloway
Bartenders:
  • Jj Roberts
  • Al Hobbs
  • Piet Souris

EJB-RDB mapping switch in WSAD

 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi every one,
I have developed a lot of EJBs which mapped to a database called TestA. Now the DBA has changed the database setting. Database TestA does not exist any more. They created a database called TestB. How can I switch all my mapping from TestA to TestB? The table names and columns are not changed.
Thank you very much in advance! It is very urged for me!
Thanks again.
 
author
Posts: 3892
5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
By "Database" you mean Schema name in DB2, right? If that's true see this article
Kyle
 
Davy Hu
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Kyle,
Thank you very much for your kind help. The article you recommended is really helpful. But it is not my case.
I was using a database called "V2003" with a schema called "APPL" when I first developed the EJB. But now we are switching to a database called "TEITS" with the same schema also called "APPL". All the tables are not changed.
The following is what I have done in WSAD4:
1. I deleted the old connection called "TEI" which using the old database "V2003" in data perspective.
2. I created a new connection also called "TEI" using the new database "TEITS".
3. I inputed the schema "TEI.APPL" into my ejbModule containing the EJBs. After this finished, all the files in the folder "..\ejbModule\META-INF\Schema\" changed from "TEI_V2003_XXX.XXX" to "TEI_TEITS_XXX.XXX".
4. I modified the file "Map.mapxmi". I changed all "V2003" into "TEITS".
5. I opened "TEI.conxmi", which showed that it had changed the database, useid and password from the old database to the new database.
6. I modified the datasource in the server by changing to the new database "TEITS".
7. I switched to the "J2EE" perspective, extended the "EJB Modules", selected the "TeiEJB". I opened it with "EJB extension editor" and changed the datasource binding to the new one.
8. In "J2EE" perspective, I selected "Open with/Mapping editor". But I can not open the EJBs in mapping editor, and got an error
Database or EJB JAR file is null. Unable to open map editor
Can you help me?
 
Ranch Hand
Posts: 64
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Davy Hu,
I am doing the same thing, switching between the two different databases and also different Schema names. I do not know how to re-map the Entity Beans to the new database? Did you get the answers?
Thanks
 
Davy Hu
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Sorry, I still have not find a way to get crossing it.
Can any one help us? Thanks!
Davy
 
You showed up just in time for the waffles! And this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
reply
    Bookmark Topic Watch Topic
  • New Topic