• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Entity EJB CMP question in WSAD

 
Ranch Hand
Posts: 38
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi, I hope someone can give me a clue on how to make the schema name that a table exists in a configurable item during deployment of the EJB to the WAS server. I have two environments, a test environment and a live environment, and I don't want to have to re-map the RDB to EJB mappings to move from one environment to the other, just to change the schema name. Both environments have their own WAS v5 server with a DB2 (iSeries) datasource defined with CMP, but the datasource's default schema name is not being "respected", and the tables accessed by the EJBs are always the ones I used to do the RDB to EJB maping (the test environment). If anyone has any suggestions, I would sure appreciate it.

Thanks,
 
Ranch Hand
Posts: 365
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi-
I don�t have a complete answer yet (as we are faced with the same issue) but I have learned that you can get around this seemingly hard-coded scenario by setting schema name in the xxx.schxmi file in your backend folder. You can set the database name in your xxx.dbxmi and connection info in xxx.rlconxmi. The generated schema names are simply names and nothing more at this point as I understand it although we have not tested a WAS deployment yet (using ANT) . I think there must be a WAS extension to ANT which will generate the deployment jars accordingly otherwise it makes little sense since the xmi files (connection info etc) is passed in the deployment jar and such a restriction would make CMP unusable. Let me know how you get along.
Max
 
Reed Peters
Ranch Hand
Posts: 38
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I got the answer for this in another forum. Here it is...

When you create a meet-in-the-middle mapping between the cmp bean and the table you can use the schema name 'NULLID'.
Then WAS omits a schema name and the default schema name or the schema set by the property SQLID of the datasource is used.

FYI
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic