You are viewing a plain text version of this content. The canonical link for it is here.
Posted to server-dev@james.apache.org by Robert Burrell Donkin <ro...@gmail.com> on 2008/05/10 15:05:46 UTC
OSGi Enable Libraries?
hopefully we'll see some JAMES libraries released this month or next.
i've been wondering whether we should investigate including OSGi
meta-data so that our libraries are OSGi-enabled out of the box.
(http://www.google.co.uk/search?hl=en&q=commons+osgi&btnG=Google+Search&meta=
for reasons to OSGi enable)
opinions?
volunteers?
- robert
---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org
Re: OSGi Enable Libraries?
Posted by Robert Burrell Donkin <ro...@gmail.com>.
On Mon, May 12, 2008 at 11:02 PM, Stefano Bagnara <ap...@bago.org> wrote:
> Robert Burrell Donkin ha scritto:
> >
> > On Mon, May 12, 2008 at 10:31 PM, Stefano Bagnara <ap...@bago.org> wrote:
> >
> > > Are you thinking at a scheduled check for updates in the configuration?
> > >
> >
> > no
> >
> > > But the configuration is injected by Avalon: would you parse the
> config.xml
> > > and resemble a new avalon configuration? (e.g: by implementing the
> > > Reconfigurable interface from avalon, that unfortunately is not
> implemented
> > > in phoenix)
> > >
> >
> > i'm thinking about deploy processors and mailets which are defined
> > outside the configuration
> >
>
> Ok, maybe this time I'm following you. Something like this in config.xml:
>
> <processor name="filter"
> class="org.apache.james.transport.ReloadingLinearProcessor"
> <file>filter.xml</file>
> </processor>
>
> And then "ReloadingLinearProcessor" reads its own configuration from
> filter.xml and is able to reload it ?
>
> Or maybe subclassing the StateAwareProcessorList by using the
> processorClass configuration:
> <spoolmanager>
>
>
> <processorClass>org.apache.james.transport.ReloadingStateAwareProcessorList</processor>
>
> that uses its own "processing.xml" configuration file ?
>
> Or something different at all??
or quite possibly something different ;-)
but yes, you're following me
- robert
---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org
Re: OSGi Enable Libraries?
Posted by Stefano Bagnara <ap...@bago.org>.
Robert Burrell Donkin ha scritto:
> On Mon, May 12, 2008 at 10:31 PM, Stefano Bagnara <ap...@bago.org> wrote:
>> Are you thinking at a scheduled check for updates in the configuration?
>
> no
>
>> But the configuration is injected by Avalon: would you parse the config.xml
>> and resemble a new avalon configuration? (e.g: by implementing the
>> Reconfigurable interface from avalon, that unfortunately is not implemented
>> in phoenix)
>
> i'm thinking about deploy processors and mailets which are defined
> outside the configuration
Ok, maybe this time I'm following you. Something like this in config.xml:
<processor name="filter"
class="org.apache.james.transport.ReloadingLinearProcessor"
<file>filter.xml</file>
</processor>
And then "ReloadingLinearProcessor" reads its own configuration from
filter.xml and is able to reload it ?
Or maybe subclassing the StateAwareProcessorList by using the
processorClass configuration:
<spoolmanager>
<processorClass>org.apache.james.transport.ReloadingStateAwareProcessorList</processor>
that uses its own "processing.xml" configuration file ?
Or something different at all??
Stefano
---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org
Re: OSGi Enable Libraries?
Posted by Robert Burrell Donkin <ro...@gmail.com>.
On Mon, May 12, 2008 at 10:31 PM, Stefano Bagnara <ap...@bago.org> wrote:
> Robert Burrell Donkin ha scritto:
>
> >
> > On Mon, May 12, 2008 at 6:53 PM, Stefano Bagnara <ap...@bago.org> wrote:
> >
> >
> > > I don't understand this.
> > > Can you explain how to use OSGi to load mailets?
> > >
> >
> > the usual way :-)
> >
> >
> > > (e.g: How can you reload/reconfigure mailets if you don't unload the
> > > spoolmanager?)
> > >
> >
> > just reload at the processor level
> >
> > - robert
> >
>
> MailProcessor (LinearProcessor) level, right?
yes
> Are you thinking at a scheduled check for updates in the configuration?
no
> But the configuration is injected by Avalon: would you parse the config.xml
> and resemble a new avalon configuration? (e.g: by implementing the
> Reconfigurable interface from avalon, that unfortunately is not implemented
> in phoenix)
i'm thinking about deploy processors and mailets which are defined
outside the configuration
- robert
---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org
Re: OSGi Enable Libraries?
Posted by Stefano Bagnara <ap...@bago.org>.
Robert Burrell Donkin ha scritto:
> On Mon, May 12, 2008 at 6:53 PM, Stefano Bagnara <ap...@bago.org> wrote:
>> I don't understand this.
>> Can you explain how to use OSGi to load mailets?
>
> the usual way :-)
>
>> (e.g: How can you reload/reconfigure mailets if you don't unload the
>> spoolmanager?)
>
> just reload at the processor level
>
> - robert
MailProcessor (LinearProcessor) level, right?
Are you thinking at a scheduled check for updates in the configuration?
But the configuration is injected by Avalon: would you parse the
config.xml and resemble a new avalon configuration? (e.g: by
implementing the Reconfigurable interface from avalon, that
unfortunately is not implemented in phoenix)
Stefano
---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org
Re: OSGi Enable Libraries?
Posted by Robert Burrell Donkin <ro...@gmail.com>.
On Mon, May 12, 2008 at 6:53 PM, Stefano Bagnara <ap...@bago.org> wrote:
> Robert Burrell Donkin ha scritto:
>
> >
> > On Mon, May 12, 2008 at 3:03 PM, Stefano Bagnara <ap...@bago.org> wrote:
> >
> >
> > > There are probably many "levels" of OSGi support:
> > > 1) Create a single bundle for the whole JAMES Server
> > > 2) Create one bundle for each function
> > > 3) Create one bundle for each library
> > > 4) Create one bundle for each module
> > >
> >
> > AIUI libraries used by OSGi require appropriate MANIFEST entries on a
> > per jar basis
> >
>
> Didn't know this. In this case we are forced to fix it for each module.
i'm not so ambitious as to want to OSGi enable trunk ATM
just thinking about the mailet libraries
> > > IMHO the really needed things would be to be able to undeploy the whole
> > > spoolmanager (and by result all the processors/mailets) and redeploy an
> > > updated version. In the mean times JAMES would be fully working because
> the
> > > incoming channel do not block (because of the spool existence). So I
> think
> > > the "level" that will bring us more advantages with less work in #2. Of
> > > course #4 would be good, but it won't add too much to #2. #1 alone does
> not
> > > give many advantages over what we already do with current standalone
> james.
> > >
> > > I don't really know how complex would be to create a single bundle for
> each
> > > of our functions and then to have an OSGi-deployment that do something
> > > similar to the spring-deployment method (by emulating an avalon
> container
> > > for OSGi).
> > >
> > > I read something about OSGi and if IIRC OSGi would be very unhappy when
> the
> > > same package exists in 2 different bundles, and we know we have a bit of
> > > chaos about packages. Is this a blocker?
> > >
> >
> > OSGi does indeed forwn upon this
> >
> > i wasn't thinking of using OSGi to assemble the whole of JAMES ATM,
> > just mailets. configuration is the main issues with mailets but i
> > wonder whether the specification should really concern itself with
> > configuration at all. i think JAMES would benefit from supporting new
> > mailet loading engines. OSGi enabling our mailets would open up the
> > possibility of using OSGi as a mailet loader.
> >
>
> I don't understand this.
> Can you explain how to use OSGi to load mailets?
the usual way :-)
> (e.g: How can you reload/reconfigure mailets if you don't unload the
> spoolmanager?)
just reload at the processor level
- robert
---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org
Re: OSGi Enable Libraries?
Posted by Stefano Bagnara <ap...@bago.org>.
Robert Burrell Donkin ha scritto:
> On Mon, May 12, 2008 at 3:03 PM, Stefano Bagnara <ap...@bago.org> wrote:
>> There are probably many "levels" of OSGi support:
>> 1) Create a single bundle for the whole JAMES Server
>> 2) Create one bundle for each function
>> 3) Create one bundle for each library
>> 4) Create one bundle for each module
>
> AIUI libraries used by OSGi require appropriate MANIFEST entries on a
> per jar basis
Didn't know this. In this case we are forced to fix it for each module.
>> IMHO the really needed things would be to be able to undeploy the whole
>> spoolmanager (and by result all the processors/mailets) and redeploy an
>> updated version. In the mean times JAMES would be fully working because the
>> incoming channel do not block (because of the spool existence). So I think
>> the "level" that will bring us more advantages with less work in #2. Of
>> course #4 would be good, but it won't add too much to #2. #1 alone does not
>> give many advantages over what we already do with current standalone james.
>>
>> I don't really know how complex would be to create a single bundle for each
>> of our functions and then to have an OSGi-deployment that do something
>> similar to the spring-deployment method (by emulating an avalon container
>> for OSGi).
>>
>> I read something about OSGi and if IIRC OSGi would be very unhappy when the
>> same package exists in 2 different bundles, and we know we have a bit of
>> chaos about packages. Is this a blocker?
>
> OSGi does indeed forwn upon this
>
> i wasn't thinking of using OSGi to assemble the whole of JAMES ATM,
> just mailets. configuration is the main issues with mailets but i
> wonder whether the specification should really concern itself with
> configuration at all. i think JAMES would benefit from supporting new
> mailet loading engines. OSGi enabling our mailets would open up the
> possibility of using OSGi as a mailet loader.
I don't understand this.
Can you explain how to use OSGi to load mailets?
(e.g: How can you reload/reconfigure mailets if you don't unload the
spoolmanager?)
Stefano
---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org
Re: OSGi Enable Libraries?
Posted by Robert Burrell Donkin <ro...@gmail.com>.
On Mon, May 12, 2008 at 3:03 PM, Stefano Bagnara <ap...@bago.org> wrote:
> Robert Burrell Donkin ha scritto:
>
> > On Mon, May 12, 2008 at 11:30 AM, Stefano Bagnara <ap...@bago.org> wrote:
> >
> > > Robert Burrell Donkin ha scritto:
> > >
> > >
> > >
> > >
> > > > hopefully we'll see some JAMES libraries released this month or next.
> > > > i've been wondering whether we should investigate including OSGi
> > > > meta-data so that our libraries are OSGi-enabled out of the box.
> > > >
> > > >
> > >
> (http://www.google.co.uk/search?hl=en&q=commons+osgi&btnG=Google+Search&meta=
> > >
> > > > for reasons to OSGi enable)
> > > >
> > > > opinions?
> > > >
> > > >
> > > it is a good to have thing, not a big priority because no one asked for
> > > them yet.
> > >
> >
> > i've been staring very hard at coupling in the mailet code recently
> > and wondering about mechanisms for configuring and installing mailets
> >
>
> There are probably many "levels" of OSGi support:
> 1) Create a single bundle for the whole JAMES Server
> 2) Create one bundle for each function
> 3) Create one bundle for each library
> 4) Create one bundle for each module
AIUI libraries used by OSGi require appropriate MANIFEST entries on a
per jar basis
> IMHO the really needed things would be to be able to undeploy the whole
> spoolmanager (and by result all the processors/mailets) and redeploy an
> updated version. In the mean times JAMES would be fully working because the
> incoming channel do not block (because of the spool existence). So I think
> the "level" that will bring us more advantages with less work in #2. Of
> course #4 would be good, but it won't add too much to #2. #1 alone does not
> give many advantages over what we already do with current standalone james.
>
> I don't really know how complex would be to create a single bundle for each
> of our functions and then to have an OSGi-deployment that do something
> similar to the spring-deployment method (by emulating an avalon container
> for OSGi).
>
> I read something about OSGi and if IIRC OSGi would be very unhappy when the
> same package exists in 2 different bundles, and we know we have a bit of
> chaos about packages. Is this a blocker?
OSGi does indeed forwn upon this
i wasn't thinking of using OSGi to assemble the whole of JAMES ATM,
just mailets. configuration is the main issues with mailets but i
wonder whether the specification should really concern itself with
configuration at all. i think JAMES would benefit from supporting new
mailet loading engines. OSGi enabling our mailets would open up the
possibility of using OSGi as a mailet loader.
> > > It should be done by someone with OSGi knowledge in order to avoid
> > > releasing artifacts with wrong/bad metadata.
> > >
> >
> > maybe some people from felix would volunteer to help out
> >
>
> This would be cool! Do you think there is someone interested in james in
> the felix community?
the felix community are sometimes interested in OSGi enabling
libraries and may be willing to help us enable ours
- robert
---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org
Re: OSGi Enable Libraries?
Posted by Stefano Bagnara <ap...@bago.org>.
Robert Burrell Donkin ha scritto:
> On Mon, May 12, 2008 at 11:30 AM, Stefano Bagnara <ap...@bago.org> wrote:
>> Robert Burrell Donkin ha scritto:
>>
>>
>>
>>> hopefully we'll see some JAMES libraries released this month or next.
>>> i've been wondering whether we should investigate including OSGi
>>> meta-data so that our libraries are OSGi-enabled out of the box.
>>>
>> (http://www.google.co.uk/search?hl=en&q=commons+osgi&btnG=Google+Search&meta=
>>> for reasons to OSGi enable)
>>>
>>> opinions?
>>>
>> it is a good to have thing, not a big priority because no one asked for
>> them yet.
>
> i've been staring very hard at coupling in the mailet code recently
> and wondering about mechanisms for configuring and installing mailets
There are probably many "levels" of OSGi support:
1) Create a single bundle for the whole JAMES Server
2) Create one bundle for each function
3) Create one bundle for each library
4) Create one bundle for each module
IMHO the really needed things would be to be able to undeploy the whole
spoolmanager (and by result all the processors/mailets) and redeploy an
updated version. In the mean times JAMES would be fully working because
the incoming channel do not block (because of the spool existence). So I
think the "level" that will bring us more advantages with less work in
#2. Of course #4 would be good, but it won't add too much to #2. #1
alone does not give many advantages over what we already do with current
standalone james.
I don't really know how complex would be to create a single bundle for
each of our functions and then to have an OSGi-deployment that do
something similar to the spring-deployment method (by emulating an
avalon container for OSGi).
I read something about OSGi and if IIRC OSGi would be very unhappy when
the same package exists in 2 different bundles, and we know we have a
bit of chaos about packages. Is this a blocker?
>> It should be done by someone with OSGi knowledge in order to avoid
>> releasing artifacts with wrong/bad metadata.
>
> maybe some people from felix would volunteer to help out
This would be cool! Do you think there is someone interested in james in
the felix community?
Stefano
---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org
Re: OSGi Enable Libraries?
Posted by Robert Burrell Donkin <ro...@gmail.com>.
On Mon, May 12, 2008 at 11:30 AM, Stefano Bagnara <ap...@bago.org> wrote:
> Robert Burrell Donkin ha scritto:
>
>
>
> > hopefully we'll see some JAMES libraries released this month or next.
> > i've been wondering whether we should investigate including OSGi
> > meta-data so that our libraries are OSGi-enabled out of the box.
> >
> (http://www.google.co.uk/search?hl=en&q=commons+osgi&btnG=Google+Search&meta=
> > for reasons to OSGi enable)
> >
> > opinions?
> >
>
> it is a good to have thing, not a big priority because no one asked for
> them yet.
i've been staring very hard at coupling in the mailet code recently
and wondering about mechanisms for configuring and installing mailets
> It should be done by someone with OSGi knowledge in order to avoid
> releasing artifacts with wrong/bad metadata.
maybe some people from felix would volunteer to help out
- robert
---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org
Re: OSGi Enable Libraries?
Posted by Stefano Bagnara <ap...@bago.org>.
Robert Burrell Donkin ha scritto:
> hopefully we'll see some JAMES libraries released this month or next.
> i've been wondering whether we should investigate including OSGi
> meta-data so that our libraries are OSGi-enabled out of the box.
> (http://www.google.co.uk/search?hl=en&q=commons+osgi&btnG=Google+Search&meta=
> for reasons to OSGi enable)
>
> opinions?
it is a good to have thing, not a big priority because no one asked for
them yet. It should be done by someone with OSGi knowledge in order to
avoid releasing artifacts with wrong/bad metadata.
Stefano
---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org