> -----Original Message-----
> From: Stephen McConnell [mailto:[EMAIL PROTECTED]
>
> Are you including theses component using <component ..../> or
> <include.../>?
I am using the include tag (I attached the files for master and [A] and
[B]).
> Have you seperated you API and implementation into seperate jar files?
> Are you using <include>?
Yes, api and impl are separate and I am using the include.
> If you diffeerent componet groups are defined in a block and
> the block exports one or more services, and if you <import>
> that block (using a jar reference or a block refererence)
> then you should achive what you want. At the root level you
> not concerned with how a block delivers a service - your only
> interested in the service it delivers and the exposure of
> that service into a scope of the container you are including
> it within.
At the root level I would like to achieve a state where the root does not
have to be aware at all of the services combined together to form an
application. Not necessary but preferable.
If you look at the attached files, as they are now it starts, but the
component in [B] will get a ClassNotFoundException later on when trying to
call a method on a class that is in <resource id="saguru-cf:saguru-util"
version="SNAPSHOT"/> (the class is there). This happens in run-time not
during deployment (all classes are found during deployment it looks like).
If I remove the reference for the <resource
id="saguru-sisp:saguru-sisp-content-repository-impl" version="SNAPSHOT"/> in
the master BLOCK.XML, it will not start at all, it will instead throw an
exception:
.
.
Message: Assembly of appliance
[/sisp/contentsyndication/contentsyndicationservice] could not be completed
due to an unresolvable service dependency for the key [RepositoryManager].
---- cause
---------------------------------------------------------------------
Exception:
org.apache.avalon.activation.appliance.NoProviderDefinitionException
Message: Unable to resolve dependency: [RepositoryManager]
com.saguru.sisp.content.repository.RepositoryManager:1.0.0
---- stack trace
---------------------------------------------------------------
org.apache.avalon.activation.appliance.NoProviderDefinitionException: Unable
to resolve dependency: [RepositoryManager]
com.saguru.sisp.content.repository.RepositoryManager:1.0.0
The reference for Repository Manager is in the .xinfo file for the
ContentSyndicationService
Boostraping using the combined-block-xml.txt everything works just fine.
/ Nicolai
<?xml version="1.0" encoding="ISO-8859-1"?>
<container>
<classloader>
<classpath>
<repository>
<resource id="saguru-cf:saguru-util"
version="SNAPSHOT"/>
<resource id="mysql:mysql-connector-java"
version="3.0.8"/>
<resource
id="saguru-sisp:saguru-sisp-content-repository-api" version="SNAPSHOT"/>
</repository>
</classpath>
</classloader>
<component
name="contentrepositorymanager"
class="com.saguru.sisp.content.repository.impl.RepositoryManagerImpl"
/>
</container><?xml version="1.0" encoding="ISO-8859-1"?>
<!--
Avalon/Merlin Block Definition for Saguru CF SISP Content Repository.
-->
<container>
<classloader>
<classpath>
<repository>
<resource id="log4j:log4j" version="1.2.8"/>
<resource id="saguru-cf:saguru-util"
version="SNAPSHOT"/>
<resource
id="saguru-sisp:saguru-sisp-content-repository-api" version="SNAPSHOT"/>
<resource
id="saguru-sisp:saguru-sisp-content-syndication-api" version="SNAPSHOT"/>
</repository>
</classpath>
</classloader>
<component
name="contentsyndicationservice"
class="com.saguru.sisp.content.syndication.impl.ContentSyndicationService"
/>
</container><?xml version="1.0" encoding="ISO-8859-1"?>
<container name="sisp">
<!-- These are included for Merlin to be able to resolve the references -->
<classloader>
<classpath>
<repository>
<resource id="saguru-cf:saguru-util"
version="SNAPSHOT"/>
<resource id="mysql:mysql-connector-java"
version="3.0.8"/>
<resource
id="saguru-sisp:saguru-sisp-content-repository-api" version="SNAPSHOT"/>
<resource
id="saguru-sisp:saguru-sisp-content-repository-impl" version="SNAPSHOT"/>
</repository>
</classpath>
</classloader>
<!-- [A] -->
<include name="contentrepository"
id="saguru-sisp:saguru-sisp-content-repository-impl" version="SNAPSHOT"/>
<!-- [B] -->
<include name="contentsyndication"
id="saguru-sisp:saguru-sisp-content-syndication-impl" version="SNAPSHOT"/>
<!-- [C] -->
<include name="contentspider" id="saguru-sisp:saguru-sisp-content-spider-impl"
version="SNAPSHOT"/>
<!-- [D] -->
<include name="contentcache" id="saguru-sisp:saguru-sisp-content-cache-impl"
version="SNAPSHOT"/>
</container><?xml version="1.0" encoding="ISO-8859-1"?>
<container name="sisp">
<classloader>
<classpath>
<repository>
<resource id="log4j:log4j" version="1.2.8"/>
<resource id="saguru-cf:saguru-util"
version="SNAPSHOT"/>
<resource id="mysql:mysql-connector-java"
version="3.0.8"/>
<resource
id="saguru-sisp:saguru-sisp-content-repository-api" version="SNAPSHOT"/>
<resource
id="saguru-sisp:saguru-sisp-content-repository-impl" version="SNAPSHOT"/>
<resource
id="saguru-sisp:saguru-sisp-content-syndication-api" version="SNAPSHOT"/>
<resource
id="saguru-sisp:saguru-sisp-content-syndication-impl" version="SNAPSHOT"/>
</repository>
</classpath>
</classloader>
<component
name="repository"
class="com.saguru.sisp.content.repository.impl.RepositoryManagerImpl"
/>
<component
name="syndicator"
class="com.saguru.sisp.content.syndication.impl.ContentSyndicationService"
/>
</container>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]