File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Websphere and the fly likes BMP and Data Source Mapping in WSAD 5.0? Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Products » Websphere
Reply Bookmark "BMP and Data Source Mapping in WSAD 5.0?" Watch "BMP and Data Source Mapping in WSAD 5.0?" New topic
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
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: BMP and Data Source Mapping in WSAD 5.0?
 
Similar Threads
cmp versus bmp with dao
CMP 2.0 DB2 WSAD Exception
wsad 5.1 included dbase
EJB to RDB mapping(WSAD and MySQL)
1-phase error in Websphere