james-server-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Norman Maurer <nor...@apache.org>
Subject Re: What's in a store?
Date Sun, 05 Sep 2010 18:11:50 GMT
Hi Eric,

comments inside..

2010/9/5 Eric Charles <eric@apache.org>:
>  Hi All,
>
> The store project has the mappers and imports some classes of mailbox
> (mailboxmanager,...), so 'store depends on mailbox'.
>
> To access some mailbox/subscription, you need to use the maibox project
> (example: imap-processor depends on mailbox, and imapProcessor bean is
> injected with mailboxmanager/subscriptionManager). So far, so good.
>
> mailbox is the interface to the mailboxes,...": I had a quick look at the
> pop3server dependencies and saw that it was depending on store. I didn't
> find that logical, removed it, and it was still compiling. Logical...
> Thinking in "what depends on what" helps much.

pop3server should not depend on store and only depend on mailbox. If
its not the case its a bug..


>
> However, the other '"domain classes" (user, virutalusertable, domain in the
> sense 'domain.tld') are accessed in a all different way. This comes probably
> from the history (before using imap projects, server used its own storage
> system which has been kept). In spring-beans.xml, you've got:
> - users-store: org.apache.james.container.spring.SpringUsersStore class
> being injected via @Resource
> - virtualusertable-store :
> org.apache.james.container.spring.SpringVirtualUserTableStore being injected
> via @Resource
> - domainlist: XML/JDBC/JPADomainList being injected via @Resource
>
> I see there 3 differents access to the persisted domain classes (Mailbox,
> Message, Subscription, Domain, User, VirtualUserTable):
>
>  1. Injection of mailbox project (MailboxManager, MessageManager,
>     SubscriptionManger,...) beans
>  2. Injection of spring-common project (SpringUsersStore,
>     SpringVirtualUserTableStore) beans
>  3. Injection of core-function project (XML/JDBC/JPADomainList) beans
>
> If you persist everything in a database, accesses for JPAUser is done
> completely differently compared to the JPAMailbox for example.
>

Could you explain whats the dfference ?

> Coming to the point, should we:
>
>  1. Continue to live with heterogeneous access the persistence layer?
>  2.   Have uniform access to persistence for all services and all
>     domains? In this case, a store project would be a good name, but      is
> already taken... we could always rename the existing one...
>
> WDYT?
>
> Eric
>
> PS: I didn't even talked of the AbstractFileRepository
>
>

The whole *Store stuff is just a pita (james-server).. The idea with
its was that you can configure for example different UserRepositories
and just lookup the right one via the UsersStore. So its really
flexible. However the loading of the classes + injecting the right
dependencies is really complicated with this. I'm open to new ideas to
make it more easy :)

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


Mime
View raw message