incubator-graffito-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Sean Taylor <>
Subject Re: 2 or more component services for the same interface
Date Thu, 20 Jan 2005 17:08:06 GMT
LOMBART Christophe wrote:
> David Sean Taylor wrote:
>>Say I wanted to have 2 or more component services for the same component interface.
Can I configure that easily in Spring?
>>Its not readily apparent to me...
> Never tested but it should work : with 2 distinct component id:
> Eg :
>   <!-- Content Model Service  1-->
>   <bean id="Model1"  class="org.apache.portals.graffito.impl.ContentModelServiceImpl"
>          <constructor-arg ><ref bean="org.apache.portals.graffito.persistence.impl.ContentPersistenceServiceImpl"/></constructor-arg>
>        <constructor-arg ><ref bean="org.apache.portals.graffito.impl.ContentVersionServiceImpl"/></constructor-arg>
>   </bean>
>   <!-- Content Model Service  2-->
>   <bean id="Model2"  class="org.apache.portals.graffito.impl.ContentModelServiceImpl"
>          <constructor-arg ><ref bean="org.apache.portals.graffito.persistence.impl.ContentPersistenceServiceImpl"/></constructor-arg>
>        <constructor-arg ><ref bean="org.apache.portals.graffito.impl.ContentVersionServiceImpl"/></constructor-arg>
>   </bean>
>>For example, I want to have 3 ContentModelService implementations, one going to WebDAV,
one to default persistence store, and one to the file system.
> ok Now I understand what you want.
> I don't advise you to change the implementation of ContentModelService,  ContentSearchService,
ContentVersionService, ...
> The default implementations of thoses services are using the Persistence service (see
the architecture page in the Graffito Site). By this way, you can plug more than one content
server into the Vitural Content Tree.
> The Persistence service is a key component that can be used in a lot of use cases. Each
time a request is made on a specific uri. The persistence store find the appropriate content
store (depending on a uri mapping).
> Supporting another kind of content stores (WEBDAV, fs, ...)  is made via the ContentStore
interface and Server interface. 
Specifically, right now I need a FS impl with minimal leveling, for now 

So you decided to keep the ContentModelService ;)

Will all the documents and folders in my FS store need to have 
corresponding rows in the master store DB (CMS_OBJECT)?

> What you have to do is :
> * Write a new plugin (eg. new ContentStore implementation for Webdav server and another
implementation for a FS).
> * Define a new Server implementation. This data object contains connection info for a
specific server. One attribute is of course the the plug class to used for this server (one
of the ContentStore implementation). Each server has a scope attribute used to make the URI
> * Register a new server in the Graffito engine (Persistence service).
>           Via the API :  ContentServerService.addServer(server)
>           When starting the application  :  Add a new entry in the Master Graffito Store
(DB) : this store is used by the Persistence Store when you start the Graffito engine. This
store contains all server references to plug into your Graffito running application.
OK, Im going to try to write a FS ContentStore implementation and 
Server. Again I will need to ability to 'attach' FS store root at run 
time, same old problem there :)

> Other comments :
> * Can you review the architecture page in the Graffito site and let me know if it not
clear. My english is really bad :-(

Sure, I'll have a look

> * I can help for the WEBDAV impl. I made one for JCMS 1 and I should be possible to migrate
it for Graffito. Let me know when you need this impl.
> * Should be nice to see the status on the subproject : VFS from Jakarta Commons.
Yes VFS is an interesting project. Do you want to create a VFS 
persistence store?
Now Im wondering if I should write a VFS instead of plain old FS..
Think I'll start with FS just to get me familiarized with Graffito again

David Sean Taylor
Bluesunrise Software
[office] +01 707 773-4646
[mobile] +01 707 529 9194

View raw message