tags:

views:

6

answers:

0

This seems like a common problem, so I hope someone can tell me how to best solve or work around it.

I am using the mibgen tool that comes with OpenDMK to generate MBean classes from an SNMP MIB file. The tool works perfectly fine.

However, the problem I am having is when I need to regenerate the MBean classes because the MIB definition has been changed (because of not getting it right the first time). In this case, I re-run mibgen and it outputs the new MBean classes, but I don't want to just override my old MBean classes with the new ones because they already contain some application specific-implementation code.

Obviously, I can compare the files and selectively apply the changes from the new ones to the old ones, but I am hoping that this can somehow be done automatically by mibgen. For example, does anyone know if I can tell mibgen to please generate MBean classes based on a template or the old classes (so it will automatically append the new changes to the old changes)?

How does anyone go about doing this?

Thanks.