Chris,

Can you please supply me with a small test case for this your statement.
I am not sure what the correct semantics should be, but somehow your
observation got me thinking ... ;-).

Werner 

> -----Original Message-----
> From: ELVART, CHRISTOPHER (SBCSI) [mailto:[EMAIL PROTECTED] 
> Sent: Freitag, 01. September 2006 23:34
> To: [email protected]
> Subject: RE: [castor-user] Another question - Referencing 
> mapping file location from another project
> 
> If you put your mappings into files named ".castor.xml" in 
> the package directory for the classes then you don't have to 
> specifically load the mapping.  Castor will find it automatically.
> 
> One caution...If you go this route you need to put a mapping 
> for every class in the package that can possible operate 
> through XML, even if it is just a default mapping telling it 
> to auto complete.  It seems like if there is a mapping file 
> for a package, any class not listed generates exceptions.
> 
> Thanks,
> Chris Elvart
> SBC Public Communications
> 312 727-4445
> 
> "This e-mail and any files transmitted with it are the 
> property of SBC, are confidential, and are intended solely 
> for the use of the individual or entity to whom this e-mail 
> is addressed.  If you are not one of the named recipients or 
> otherwise have reason to believe that you have received this 
> message in error, please notify the sender at (312) 727
> 4445 and delete this message immediately from your computer.  
> Any other use, retention, dissemination, forwarding, 
> printing, or copying of this e-mail is strictly prohibited."
> 
> 
> 
> 
> 
> -----Original Message-----
> From: Amit Mendelson [mailto:[EMAIL PROTECTED]
> Sent: Thursday, August 31, 2006 12:38 PM
> To: [email protected]
> Subject: RE: [castor-user] Another question - Referencing 
> mapping file location from another project
> 
> 
> Thanks! I'll check it.
> Amit
> 
> -----Original Message-----
> From: Jay Goldman [mailto:[EMAIL PROTECTED] 
> Sent: Thursday, August 31, 2006 6:30 PM
> To: [email protected]
> Subject: RE: [castor-user] Another question - Referencing mapping file
> location from another project
> 
> one approach would be to put the file in a 'package' directory and ask
> the class loader to find it:
> 
>       URL url = getClass().getResource("mapping.xml");
>       if (null == url) {
>         throw new Exception("unable to locate mapping file
> mapping.xml");
>       }
>       mapping.loadMapping(url);
> 
> 
> ________________________________
> 
> From: Amit Mendelson [mailto:[EMAIL PROTECTED] 
> Sent: Thursday, August 31, 2006 12:43 PM
> To: [email protected]
> Subject: [castor-user] Another question - Referencing mapping file
> location from another project
> 
> 
> 
> Hi,
> 
>  
> 
> In my project, I refer the mapping file in the simple way
> 
>             mapping.loadMapping("src/mapping.xml");
> 
> However, the project is supposed to be a part of larger 
> application, and
> other files outside the working project should be able to activate the
> code, without forcing them to have an instance of the mapping file.
> 
> How can I give a mapping file location that is relative to the project
> root, but doesn't assume assumptions about the project's location?
> 
>  
> 
> Thanks in advance,
> 
>  
> 
> Amit Mendelson
> 
>  
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe from this list please visit:
> 
>     http://xircles.codehaus.org/manage_email
> 
> 
> 
> 
>  
>  
> **************************************************************
> **********
> ************
> This footnote confirms that this email message has been scanned by
> PineApp Mail-SeCure for the presence of malicious code, vandals &
> computer viruses.
> **************************************************************
> **********
> ************
> 
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe from this list please visit:
> 
>     http://xircles.codehaus.org/manage_email
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe from this list please visit:
> 
>     http://xircles.codehaus.org/manage_email
> 
> 
> 

---------------------------------------------------------------------
To unsubscribe from this list please visit:

    http://xircles.codehaus.org/manage_email

Reply via email to