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

BMP and Data Source Mapping in WSAD 5.0?

 
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am writing a BMP bean to map to a DB2 table on OS/390. In ejbCreate and other methods in the BMP bean class, I have JDBC code to access the DB2 table.
WSAD 5.0 gives me only one compiler error: it complains that I don't have a mapping to a data source. My question: do I need to specify a data source through WSAD for the BMP bean? Do I configure the mapping in server perspective?
When I write this BMP bean, I followed IBM's recommendation, created a CMP bean first as the superclass for the BMP bean. I didn't do any mapping for that superclass CMP bean. Is the superclass CMP causing that compiler error?
I have a different CMP bean that works fine. Of course I have the data source mapping defined for that CMP bean, which maps to a different table.
Thanks in advance for your help!
Arthur
 
author
Posts: 3892
5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Yes, you must define a datasource for the superclass bean -- otherwise it won't know how to load/store the fields defined in the CMP superclass!
Doing that should fix your problem.
Kyle
 
Arthur Leo
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Kyle,
Yes, the compiler error was that the superclass CMP bean and its attributes were not mapped to a data source. Giving the CMP bean mapping specification should fix the error.
Thank you!
Arthur
 
It's a pleasure to see superheros taking such an interest in science. And this tiny ad:
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
reply
    Bookmark Topic Watch Topic
  • New Topic