>
> I have also noticed that I have to set a number of extra (unneeded in 
> my view)
> permissions for Castor when running within a container like Tomcat 
> with the
> Java SecurityManager.
>
> I looked at the loadProperties() method in Configuration and would like
> to suggest the following changes:
>
> The current behaviour is:
>
> load properties using current class loader getResource from jar.
> load properties using FileInputStream from java.home lib directory.
> load properties using current class loader getResource as a file.
>
> Note that if all three are available, all three get loaded, but only
> the last loaded properties get used.
>
> I recommend the following change:
>
> load properties using current class loader getResource as a file,
> if it gets loaded, return.
>
> load properties using FileInputStream from java.home lib directory,
> if it gets loaded, return.
>
> load properties using current class loader getResource from jar,
> if it exists return, else throw an exception. 


I think that the loadProperties method only returns at the end of 
processing all files because that way is posible to define defaults 
properties in one location and override only the required ones. So, this 
changes will break this behaviour. My proposal is to define a property 
in the file located as a Resource that can be tested to see if the user 
want to ignore the possible AccessControlException

>
>
> With the above changes, the extra attemps to load the properties will
> never happen if you have a castor.properties in your /WEB-INF/classes
> directory.
>
> Regards,
>
> Glenn
>
>
> ----------------------------------------------------------------------
> Glenn Nielsen             [EMAIL PROTECTED] | /* Spelin donut madder    |
> MOREnet System Programming               |  * if iz ina coment.      |
> Missouri Research and Education Network  |  */                       |
> ----------------------------------------------------------------------
>
> ----------------------------------------------------------- If you 
> wish to unsubscribe from this mailing, send mail to
> [EMAIL PROTECTED] with a subject of:
>     unsubscribe castor-dev
>
>

-- 
Robert Marcano (office: [EMAIL PROTECTED], personal: [EMAIL PROTECTED])
System Architect
http://www.marcanoonline.com/About_me/about_me.html

aol/netscape screen id: robmv
jabber id: [EMAIL PROTECTED]
msn messenger id: [EMAIL PROTECTED]
icq id: 101913663

----------------------------------------------------------- 
If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
        unsubscribe castor-dev

Reply via email to