I'm not sure this is related to what you are talking about, but I've modified CastorJDOImpl.java.  I haven't committed it, because I haven't fully tested it yet.  It executes which seems to indicate that the database.xml and the mapping.xml were loaded, but I haven't tried to write to the database using the mapping.xml data that was read in.  The bulk of the few small changes are as follows [startService, line 122]:

// Determine complete URL to _dbConf file.  It is likely a relative path.
URL             confUrl = Thread.currentThread().getContextClassLoader().getResource( _dbConf );

if ( null == confUrl )
   {
   FileNotFoundException e = new FileNotFoundException(
      "CastorJDOImpl.startService(): Unable to resolve Configuration attribute to URL = "
      + _dbConf );
   log.error( "CastorJDOImpl.startService(): Unable to find " + _dbConf + " file.", e );
   }

_dbUrl = confUrl.toString();
        
_jdo.setTransactionManager("java:/TransactionManager");
_jdo.setConfiguration( _dbUrl );
unm = new Unmarshaller(org.exolab.castor.jdo.conf.Database.class);
database = (org.exolab.castor.jdo.conf.Database) unm.unmarshal(new InputSource( _dbUrl ));

and this attribute accessor method:

   public String getConfigurationURL() {
      return _dbUrl;
   }

Is that what you are talking about?  If so, let me know and I will commit it.  Thanks.

Fred.


At 01:25 AM 5/31/2002, you wrote:
I have looked into replacing the metadata xml parsing with Castor XML in my
spare time (ha, spare time... I made a joke).  From a few emails with the
Castor folks I belive that the XML snippet is possible with Castor because it
is based on XML Schema's and not DTD... but I have not tested anything yet.

Once I have verified that this will work, I will setup a prototype for the
service configuration.  This should allow us to easily modify the
ServiceController and friends to allow better register/create/start control.

--jason

Reply via email to