| Author |
BMP and Data Source Mapping in WSAD 5.0?
|
Arthur Leo
Greenhorn
Joined: Mar 29, 2003
Posts: 7
|
|
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
|
 |
Kyle Brown
author
Ranch Hand
Joined: Aug 10, 2001
Posts: 3879
|
|
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
|
Kyle Brown, Author of Persistence in the Enterprise and Enterprise Java Programming with IBM Websphere, 2nd Edition
See my homepage at http://www.kyle-brown.com/ for other WebSphere information.
|
 |
Arthur Leo
Greenhorn
Joined: Mar 29, 2003
Posts: 7
|
|
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
|
 |
 |
|
|
subject: BMP and Data Source Mapping in WSAD 5.0?
|
|
|