avalon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Hamilton Verissimo de Oliveira (Engenharia - SPO)" <hamilton.olive...@agenciaclick.com.br>
Subject DefaultConfigurationBuilder doesn't support external entities.
Date Thu, 01 Apr 2004 15:04:34 GMT

If one wants to use something like below, he can't.
DefaultConfigurationBuilder relies on an SAXConfigurationHandler that
extends DefaultHandler but doesn't overrides the resolveEntity method.

Anyway, to solve this we'll really use our imagination. Fortress, for
instance, uses excalibur SourceResolver so what
DefaultConfigurationBuilder.build gets is something like

resource://com/company/myconfig.xconf

and external entities would be entitled 

resource://com/company/externalfile.xml

Overriding resolveEntity is meaningless in this case. What else is possible?
DefaultConfigurationBuilder could exposes an overloaded build that receives
an EntityResolver. Fortress can set its one, and others may do the same.

What do you think?

<?xml version="1.0" encoding="ISO-8859-1" ?>

<!DOCTYPE document
[
<!ENTITY config SYSTEM "personalconfig.xml">
]>

<SimpleContainer proxy-type="java">

  &config; 

  <!-- 
      Component singleton para gerenciar alteraƧoes em DAOs 
  -->
  <agente id="agente" activation="lazy" />
  
  <!-- 
      Repositorio de entradas utilizadas pelo serviƧo 'Agente' 
  -->
  <component
  	  id="AgenteRepositoryImpl" 
  	  logger="agente.repository" 
  	  default="true"
  	  activation="lazy"
 
class="com.agenciaclick.fiat.sincronizacao.impl.AgenteRepositoryImpl" />

</SimpleContainer>


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@avalon.apache.org
For additional commands, e-mail: dev-help@avalon.apache.org


Mime
View raw message