You are viewing a plain text version of this content. The canonical link for it is here.
Posted to server-user@james.apache.org by Xavier Portefaix <xp...@gmail.com> on 2011/08/02 15:37:13 UTC

james 3.0-beta mailbox provider

Hello,

I try to implement a new mailbox provider, and i was stun that in
configuration file mailbox.xml, the value are restricted.
The possible values are encoded in
org.apache.james.container.spring.factorypostprocessor.MailboxConfigurationBeanFactoryPostProcessor,
and they are not used anywhereelse.

I think the possible value of a provider should be defined in a file
that mailboxconfigurationbeanfactory should read, like this:
<providers>
    <provider value="jpa">
       <mailbox>jpa-mailboxmanager</mailbox>
       <subscription>jpa-subscriptionManager</subscription>
    </provider>
</providers>

With this file, it will be possible to implement all attended mailbox type.

Or there is limitations that i didn't see ?

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


Re: james 3.0-beta mailbox provider

Posted by Eric Charles <er...@apache.org>.
Hi Xavier,

That sounds good.
If you feel like, just open a JIRA 
(https://issues.apache.org/jira/browse/JAMES) and even submit a patch.

Thx.

On 02/08/11 16:29, PORTEFAIX Xavier wrote:
> Hello,
>
> I think it will be a good thing to reuse mailbox.xml and let MailboxConfigurationBeanFactoryPostProcessor be more permissive.
> The prefixing of '-mailboxmanager' and '-subscriptionmanager' will give more liberty, without loose the precision of invoked exception.
> Then it will be possible to verify if a mailbox is well defined and the associated subscription, then return an error which depend on provider defined in mailbox.xml.
> In this case it will be more easy to create new mailbox and plug it to the server, without to recompile the entire james server itself.
>
>
> -----Message d'origine-----
> De : Eric Charles [mailto:eric@apache.org]
> Envoyé : mardi 2 août 2011 15:49
> À : James Users List
> Objet : Re: james 3.0-beta mailbox provider
>
> Hi Xavier,
>
> Glad to read you're working on a new mailbox implementation.
> Yes, for now the list is set in the code, which can limit thing.
>
> The mailbox responsibility spawns the mailbox itself, but also the
> subscription (the link between a user and a mailbox).  So when you say
> JPA, you automatically say jpa-mailboxmanager and
> jpa-subscriptionmanager. Do you see usecases where we should specify
> alternate subscription providers?
>
> We could reuse the mailbox.xml file and let
> MailboxConfigurationBeanFactoryPostProcessor be more permissive in first
> instance, simply by prefixing any given string (jpa for example) to
> '-mailboxmanager' and '-subscriptionmanager'.
>
> In you case, you could use 'foo', and have the 'foo-mailboxmanager' and
> 'foo-subscriptionmanager' beans defined in the spring context.
>
> WDYT?
>
> On 02/08/11 15:37, Xavier Portefaix wrote:
>> Hello,
>>
>> I try to implement a new mailbox provider, and i was stun that in
>> configuration file mailbox.xml, the value are restricted.
>> The possible values are encoded in
>> org.apache.james.container.spring.factorypostprocessor.MailboxConfigurationBeanFactoryPostProcessor,
>> and they are not used anywhereelse.
>>
>> I think the possible value of a provider should be defined in a file
>> that mailboxconfigurationbeanfactory should read, like this:
>> <providers>
>>       <provider value="jpa">
>>          <mailbox>jpa-mailboxmanager</mailbox>
>>          <subscription>jpa-subscriptionManager</subscription>
>>       </provider>
>> </providers>
>>
>> With this file, it will be possible to implement all attended mailbox type.
>>
>> Or there is limitations that i didn't see ?
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: server-user-unsubscribe@james.apache.org
>> For additional commands, e-mail: server-user-help@james.apache.org
>>
>
>


-- 
Eric Charles
http://about.echarles.net

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


RE: james 3.0-beta mailbox provider

Posted by PORTEFAIX Xavier <xa...@fr.thalesgroup.com>.
Hello,

I think it will be a good thing to reuse mailbox.xml and let MailboxConfigurationBeanFactoryPostProcessor be more permissive.
The prefixing of '-mailboxmanager' and '-subscriptionmanager' will give more liberty, without loose the precision of invoked exception.
Then it will be possible to verify if a mailbox is well defined and the associated subscription, then return an error which depend on provider defined in mailbox.xml.
In this case it will be more easy to create new mailbox and plug it to the server, without to recompile the entire james server itself.


-----Message d'origine-----
De : Eric Charles [mailto:eric@apache.org] 
Envoyé : mardi 2 août 2011 15:49
À : James Users List
Objet : Re: james 3.0-beta mailbox provider

Hi Xavier,

Glad to read you're working on a new mailbox implementation.
Yes, for now the list is set in the code, which can limit thing.

The mailbox responsibility spawns the mailbox itself, but also the 
subscription (the link between a user and a mailbox).  So when you say 
JPA, you automatically say jpa-mailboxmanager and 
jpa-subscriptionmanager. Do you see usecases where we should specify 
alternate subscription providers?

We could reuse the mailbox.xml file and let 
MailboxConfigurationBeanFactoryPostProcessor be more permissive in first 
instance, simply by prefixing any given string (jpa for example) to 
'-mailboxmanager' and '-subscriptionmanager'.

In you case, you could use 'foo', and have the 'foo-mailboxmanager' and 
'foo-subscriptionmanager' beans defined in the spring context.

WDYT?

On 02/08/11 15:37, Xavier Portefaix wrote:
> Hello,
>
> I try to implement a new mailbox provider, and i was stun that in
> configuration file mailbox.xml, the value are restricted.
> The possible values are encoded in
> org.apache.james.container.spring.factorypostprocessor.MailboxConfigurationBeanFactoryPostProcessor,
> and they are not used anywhereelse.
>
> I think the possible value of a provider should be defined in a file
> that mailboxconfigurationbeanfactory should read, like this:
> <providers>
>      <provider value="jpa">
>         <mailbox>jpa-mailboxmanager</mailbox>
>         <subscription>jpa-subscriptionManager</subscription>
>      </provider>
> </providers>
>
> With this file, it will be possible to implement all attended mailbox type.
>
> Or there is limitations that i didn't see ?
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: server-user-unsubscribe@james.apache.org
> For additional commands, e-mail: server-user-help@james.apache.org
>


-- 
Eric Charles
http://about.echarles.net

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


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


Re: james 3.0-beta mailbox provider

Posted by Eric Charles <er...@apache.org>.
Hi Xavier,

Glad to read you're working on a new mailbox implementation.
Yes, for now the list is set in the code, which can limit thing.

The mailbox responsibility spawns the mailbox itself, but also the 
subscription (the link between a user and a mailbox).  So when you say 
JPA, you automatically say jpa-mailboxmanager and 
jpa-subscriptionmanager. Do you see usecases where we should specify 
alternate subscription providers?

We could reuse the mailbox.xml file and let 
MailboxConfigurationBeanFactoryPostProcessor be more permissive in first 
instance, simply by prefixing any given string (jpa for example) to 
'-mailboxmanager' and '-subscriptionmanager'.

In you case, you could use 'foo', and have the 'foo-mailboxmanager' and 
'foo-subscriptionmanager' beans defined in the spring context.

WDYT?

On 02/08/11 15:37, Xavier Portefaix wrote:
> Hello,
>
> I try to implement a new mailbox provider, and i was stun that in
> configuration file mailbox.xml, the value are restricted.
> The possible values are encoded in
> org.apache.james.container.spring.factorypostprocessor.MailboxConfigurationBeanFactoryPostProcessor,
> and they are not used anywhereelse.
>
> I think the possible value of a provider should be defined in a file
> that mailboxconfigurationbeanfactory should read, like this:
> <providers>
>      <provider value="jpa">
>         <mailbox>jpa-mailboxmanager</mailbox>
>         <subscription>jpa-subscriptionManager</subscription>
>      </provider>
> </providers>
>
> With this file, it will be possible to implement all attended mailbox type.
>
> Or there is limitations that i didn't see ?
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: server-user-unsubscribe@james.apache.org
> For additional commands, e-mail: server-user-help@james.apache.org
>


-- 
Eric Charles
http://about.echarles.net

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