notify-dpml AT lists.ibiblio.org
Subject: DPML Notify
List archive
svn commit: r2906 - development/main/transit/core/handler/src/main/net/dpml/transit
- From: mcconnell AT dpml.net
- To: notify-dpml AT lists.ibiblio.org
- Subject: svn commit: r2906 - development/main/transit/core/handler/src/main/net/dpml/transit
- Date: Wed, 22 Jun 2005 16:42:11 -0400
Author: mcconnell AT dpml.net
Date: Wed Jun 22 16:42:11 2005
New Revision: 2906
Modified:
development/main/transit/core/handler/src/main/net/dpml/transit/SecuredTransitContext.java
Log:
Cleanup an initialization issue.
Modified:
development/main/transit/core/handler/src/main/net/dpml/transit/SecuredTransitContext.java
==============================================================================
---
development/main/transit/core/handler/src/main/net/dpml/transit/SecuredTransitContext.java
(original)
+++
development/main/transit/core/handler/src/main/net/dpml/transit/SecuredTransitContext.java
Wed Jun 22 16:42:11 2005
@@ -330,8 +330,18 @@
URI uri = model.getCodeBaseURI();
if( null != uri )
{
- handleDisposal( m_registry );
- m_registry = setContentRegistry( model );
+ try
+ {
+ ContentRegistry registry = loadContentRegistry( model );
+ handleDisposal( m_registry );
+ m_registry = registry;
+ }
+ catch( TransitException e )
+ {
+ final String error =
+ "Content handler initialization error (continuing with
defalt registry)";
+ m_logger.warn( error, e );
+ }
}
}
}
@@ -341,7 +351,7 @@
*
* @exception TransitException if an initialization error occurs
*/
- private ContentRegistry setContentRegistry( ContentRegistryModel model )
throws IOException
+ private ContentRegistry loadContentRegistry( ContentRegistryModel model
) throws IOException
{
synchronized( m_registry )
{
@@ -349,7 +359,6 @@
if( null != uri )
{
m_logger.info( "loading custom content handler registry" );
- //ClassLoader classloader = getClass().getClassLoader();
ClassLoader classloader = Transit.class.getClassLoader();
try
{
@@ -364,7 +373,7 @@
"Critical error while attempting to establish content
management subsystem."
+ "\nURI: " + uri
+ "\nClassLoader: " + classloader;
- throw new TransitError( error, e );
+ throw new TransitException( error, e );
}
}
else
@@ -380,7 +389,7 @@
{
final String error =
"Critical error while attempting to establish default
content management subsystem.";
- throw new TransitError( error, e );
+ throw new TransitException( error, e );
}
}
}
@@ -536,16 +545,18 @@
if( model instanceof ContentRegistryModel )
{
- ContentRegistry registry = null;
+ ContentRegistryModel crm = (ContentRegistryModel) model;
try
{
- registry = setContentRegistry( (ContentRegistryModel)
model );
+ ContentRegistry registry = loadContentRegistry( crm );
handleDisposal( m_registry );
m_registry = registry;
}
catch( IOException e )
{
- getLogger().error( e.getMessage(), e.getCause() );
+ final String error =
+ "Content handler change error (registry remains
unchanged)";
+ m_logger.warn( error, e );
}
}
}
- svn commit: r2906 - development/main/transit/core/handler/src/main/net/dpml/transit, mcconnell, 06/22/2005
Archive powered by MHonArc 2.6.24.