directory-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ole Ersoy <>
Subject [Configuration] More on EMF Resource Loading
Date Fri, 07 Mar 2008 00:59:43 GMT
Hey Guys,

I'm trying to load server.xml right now.  It's not loading.  I'm sure it's something trivial.
 I've done this a gazillion times, but have been thinking in Javascript and Web Design for
the last 3 months, so I need to brush off some rust.  Also, if I do figure it out, and we
decide to use EMF, is the server.xml structure going to change?  The spring namespace can
be jettisoned, etc...Anyways, before I do more work I'll describes the steps for loading server.xml:

     * Test ApacheDS Configuration Loading
    public void testLoadServerXML()
		File serverDotXML = new File("src/main/resources/server.xml");

    	ResourceSet resourceSet = new ResourceSetImpl();
		 new _1ResourceFactoryImpl());
    	Resource serverXMLResource = 
    	//Get the root configuration object
    	//Get a contained object using a fragment

Once the serverXMLResource is loaded, the instances of the server configuration objects can
be gotten from it using like this:


Does this look appealing so far?  

I need to make 1 correction about my earlier assessment.  I said we could just create an instance
of the ADS configuration like this:

ADSConfiguraiton adsConfiguraiton = new ADSConfiguration();

and the server could run using just the defaults contained / generated into each configuration
class.  That would be true if all the configuration were contained in single instance, but
obviosly we'd want a graph.  So if the graph were built up manually, the same would be true...Anyways
the configuration graph would have to be built manually or by the EMF Resource Loading mechanism.

- Ole

View raw message