Meaningless Drivel is fun!*
The moose likes EJB and other Java EE Technologies and the fly likes Need an idea to write a custom classloader Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "Need an idea to write a custom classloader" Watch "Need an idea to write a custom classloader" New topic
Author

Need an idea to write a custom classloader

Akhil Jain
Ranch Hand

Joined: Oct 14, 2004
Posts: 74
Hi All,

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.
Ajith Kallambella
Sheriff

Joined: Mar 17, 2000
Posts: 5782
Here's one -

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).
Ernest Friedman-Hill
author and iconoclast
Marshal

Joined: Jul 08, 2003
Posts: 24183
    
  34

Ahkil --

Please Carefully Choose One Forum when posting to JavaRanch. I've deleted a number of other copies of this thread, saving only this one as it's already gotten a reply.


[Jess in Action][AskingGoodQuestions]
Akhil Jain
Ranch Hand

Joined: Oct 14, 2004
Posts: 74
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
Ajith Kallambella
Sheriff

Joined: Mar 17, 2000
Posts: 5782
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.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Need an idea to write a custom classloader
 
Similar Threads
why we need classloader ?
Problem using custom ClassLoader
load a class in already running tomcat
custom class loader in java
how can i get the path from which resource bundle gets its bundle file