Keith Visco wrote:
>>2)When Unmarshalling a stream using one of the generated Classes, an
>>AccessControlException is thrown accesing the java.home system property.
>>I�m using Castor inside a secured Tomcat server, so I fixed this adding
>>to the method "loadProperties" in the class named
>>"org.exolab.castor.util.Configuration" to ignore the exception
>>
>> try {
>> file = new File( System.getProperty( "java.home" ), "lib" );
>> file = new File( file, fileName );
>> if ( file.exists() ) {
>> properties = new Properties( properties );
>> properties.load( new FileInputStream( file ) );
>> }
>> } catch ( IOException except ) {
>> // Do nothing
>> } catch ( AccessControlException except ) {
>> //AccessControl patch added
>> // Do nothing
>> }
>>
>Cool...using Castor for only 3 hours and you're already contributing
>back to the project!
>I think it would be better to make this configurable, as some people
>might want to know about the exceptions and further grant proprerties
>permissions.
>
Hi Keith, The loadProperties method first load the configuration from
the properties file located inside the jar file, I think that we can put
a property inside this file so we can set if we want to ignore the
AccessControlException. What do you think about that?
Robert
-----------------------------------------------------------
If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
unsubscribe castor-dev