This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 159298

Summary: CMP Entity bean mapping Websphere 6.1
Product: serverplugins Reporter: naso <naso>
Component: WebSphereAssignee: issues@javaee <issues>
Status: NEW ---    
Severity: blocker CC: pjiricka
Priority: P1    
Version: 6.x   
Hardware: All   
OS: All   
Issue Type: ENHANCEMENT Exception Reporter:

Description naso 2009-02-27 11:10:17 UTC
When generating CMP entity beans from database no Map.mapxmi is generated. There's also no editor to create Map.mapxmi 
manually.
Map.mapxmi is required for CMP entities to work on Websphere.
This is a serious issue, because without CMP the plugin for Websphere application server is practically useless.
Comment 1 Petr Jiricka 2009-03-02 14:49:02 UTC
I believe the support for WebSphere-specific files for CMP is not fully implemented. I agree it would be useful to have
a mapxmi editor, but I am not a WebSphere expert, so I am not exactly sure what would be needed. Would it be possible to
use the regular XML editor to edit this file? What should this editor ideally do? Thanks in advance for your input.
Comment 2 naso 2009-03-04 11:18:47 UTC
The map.mapxmi file links entities from the deployment descriptor (ejb-jar.xml) to tables and columns from a 
schema.dbm. 
Schema.dbm is equivalent to the schema.dbschema file generated by NetBeans.So schema.dbm is also missing. 
I supose it's possible to create these two files using a general purpose XML editor, however they should be validated 
at build time. I don't think runtime errors because of invalid descriptors is something most programmers can live 
with. 

Another point would be the practicality of creating the mappings manually. The map.mapxmi is not too complicated, but 
it would require a lot of effort to write and change.
The schema.dbm is meant to be generated either from a database connection or from a visual model, again  creating it 
manually would be quite a chore. 
I'd rather use BMP or simply JDBC, than creating CMP mappings manually.   

Ideally there should be a wizard to create the schema.dbm from either db connection or a DDL file. The map.mapxmi 
should be generated when using the the "New CMP Entity Beans from Database" wizard, afterwards manual edit would be 
ok. The presense and validity of both files should be checked at build or deploy time. 

An example map.mapxmi editor can be found on page 804 of Rational Application developer V7 guide 
(http://www.redbooks.ibm.com/abstracts/sg247501.html). A trial version of RAD 7 is also available from IBM. Also 
Eclipse may have similar capabilities.

Some additional info:
http://websphere.sys-con.com/node/43120
http://publib.boulder.ibm.com/infocenter/wasinfo/v4r0/index.jsp?
topic=/com.ibm.websphere.v4.doc/wasa_content/0606001504_temap.html