JMIMapper Error Handling
Brian Smith <[email protected]> Wed, 04 Dec 2002 21:35:23 -0600
| Newsgroups | gmane.comp.java.netbeans.modules.mdr.devel |
|---|---|
| Organization | CollabNet Hosting |
| Message-ID | <[email protected]> |
Hi, (1) How extensively should the JMIMapper check the model for well-formedness? That is, should it assume that the model is well-formed before it starts? Should it give its "best effort" to find problems with the metamodel? In particular, should a JMIMapper implementation verify the model constraints before starting the actual mapping? What should the JMIMapper do when it detects a violation of the rules that are specific to the JMI specification. For example, a value of javax.jmi.ignoreLifecycle that is neither "true" or "false", or a class nested inside another class, etc. If the JMIMapper is allowed to do anything besides silently ignore these types of errors, then I suggest that we add a new (set of) checked exception(s) that can be thrown by JMIMapper.generate(). In particular, if the JMIMapper checks the constraints from the MOF metamodel, then it should be possible to get the set of violated constraints. Similarly, if a JMI-specific error was found, there should be some way of finding out what that error was. BTW, I know that neither CWM 1.0 nor CWM 1.1 fully conform to the MOF 1.4 constraints (the obvious error is that some of the associations are not public.) Thanks, Brian