I want to write a custom classloader which can take the MOF(Meta-Object-facility) model as input and generate actual java classes from it and load it to ILog JRules Builder as BOM (Business-Object-Model)
Can somebody with good experience on this help me out please.
-------------------------------<br />you can't move ahead, unless you try for it.
Can you represent the MOF in a *clean* XML format? If yes, you could write a XSL style sheet to churn out Java classes. We do that for our MDA based activities - model-->xml-->xslt-->generated java files.
Open Group Certified Distinguished IT Architect. Open Group Certified Master IT Architect. Sun Certified Architect (SCEA).
I really Appologise for the mistake Earnest...but i was not getting the actuall forum where to post it and so i posted it where ever i thought it could be relevant. I am sorry for it.
Hey Ajith can you mail me that example of yours. and did you guys generated the XML file too from the model? since it will also require an overhead of creating the XSD first and then genrating XML.any how if you can send me your example..it will be of great help
Joined: Mar 17, 2000
Sorry I can't send you any code samples because of non disclosure agreements. But here's the flow.
1. We create models in a modeling environment(XDE, Rose etc.) 2. We then execute plug-ins from the modeling environment to generate design artifacts - typically XML files. 3. Class loaders consume these XML files, apply proprietary XSL and generate java classes. Generation can also be done at build time.
As you can see, the MDA plug-ins do an interesting job of converting over the models( or parts of models ) to XML files that subscribe to some internally published schema. The plug-in is an extra convenience, but if you know and understand the MOF structure, I'm sure you can do the same in a stand alone tool.