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 "Stefano Bagnara (JIRA)" <se...@james.apache.org> on 2006/05/12 23:28:08 UTC

[jira] Created: (JAMES-491) SpoolManager refactorings

SpoolManager refactorings
-------------------------

         Key: JAMES-491
         URL: http://issues.apache.org/jira/browse/JAMES-491
     Project: James
        Type: Improvement

  Components: SpoolManager & Processors  
    Versions: 2.3.0a2    
    Reporter: Stefano Bagnara
 Assigned to: Stefano Bagnara 


JamesSPoolManager and LinearProcessor should be refactored in 3 layers:
1) the spoolmanager: create threads and worker, accept mails and pass them to the "mail processor"
2) JamesProcessor: manage a list of processors and pass the mail to the processor given its current state
3) LInearProcessor: remain almost unchanged, but handle its own configuration.

The 3 objects could be transformed in toplevel components in order to remove the ContainerUtil usage and have a better codebase to run in different containers.

The final goal would be to have a modular spoolmanager: we could then introduce an OutgoingSpoolManager that simply implement the current "scheduling" and people could wire together spoolmanagers and mail processors as they prefer.

It also makes more sense to have the RemoteDelivery in a top level component instead of using Mailet instantiated threads.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


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


[jira] Updated: (JAMES-491) SpoolManager refactorings

Posted by "Stefano Bagnara (JIRA)" <se...@james.apache.org>.
     [ http://issues.apache.org/jira/browse/JAMES-491?page=all ]

Stefano Bagnara updated JAMES-491:
----------------------------------

    Fix Version/s: Trunk
                       (was: Next Major)

The split into 3 layers have been done, but the refactoring to implement different schedulers has not been implemented. Moving to trunk.

> SpoolManager refactorings
> -------------------------
>
>                 Key: JAMES-491
>                 URL: http://issues.apache.org/jira/browse/JAMES-491
>             Project: James
>          Issue Type: Improvement
>          Components: SpoolManager & Processors
>    Affects Versions: 2.3.0rc3
>            Reporter: Stefano Bagnara
>         Assigned To: Stefano Bagnara
>             Fix For: Trunk
>
>
> JamesSPoolManager and LinearProcessor should be refactored in 3 layers:
> 1) the spoolmanager: create threads and worker, accept mails and pass them to the "mail processor"
> 2) JamesProcessor: manage a list of processors and pass the mail to the processor given its current state
> 3) LInearProcessor: remain almost unchanged, but handle its own configuration.
> The 3 objects could be transformed in toplevel components in order to remove the ContainerUtil usage and have a better codebase to run in different containers.
> The final goal would be to have a modular spoolmanager: we could then introduce an OutgoingSpoolManager that simply implement the current "scheduling" and people could wire together spoolmanagers and mail processors as they prefer.
> It also makes more sense to have the RemoteDelivery in a top level component instead of using Mailet instantiated threads.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

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


[jira] Commented: (JAMES-491) SpoolManager refactorings

Posted by "Stefano Bagnara (JIRA)" <se...@james.apache.org>.
    [ http://issues.apache.org/jira/browse/JAMES-491?page=comments#action_12383321 ] 

Stefano Bagnara commented on JAMES-491:
---------------------------------------

I'm happy with this first step.

Now it is possible to specify different MailProcessor in the spoolManager or as a single processor.

E.g:
<spoolmanager>
        <processorClass>org.apache.james.transport.StateAwareProcessorList</processorClass>
        <processor name="root" class="org.apache.james.transport.LinearProcessor>
             ...mailets....
        </processor>
</spoolmanager>

The spoolmanager simply create <thread> spool threads and each thread "accept" a single mail, call the MailProcessor.service(Mail) method. If the Mail.state is set to GHOST the mail is removed from the spool (the cool part is that Mailet.service(Mail) is identical).

The StateAwareProcessorList manage a list of named MailProcessors (by default LinearProcessors). When it service a mail it lookup the State until the result is GHOST and return only when the result is ghost. It does not call persistence operations (spool.store/remove)

The LinearProcessor manager a list of tuple Mailet/Matcher as before: partial matches result in spool.store calls, The processing ends as soon as the state changes. LinearProcessor also manage error handling attributes.

I really don't like the current way we "split" mails. Maybe we should provide "splitting" services at an higher level.

Furthermore we currently manage persistence at the end of each processor: we have no "mailet" level persistence knowledge.


> SpoolManager refactorings
> -------------------------
>
>          Key: JAMES-491
>          URL: http://issues.apache.org/jira/browse/JAMES-491
>      Project: James
>         Type: Improvement

>   Components: SpoolManager & Processors
>     Versions: 2.3.0a2
>     Reporter: Stefano Bagnara
>     Assignee: Stefano Bagnara

>
> JamesSPoolManager and LinearProcessor should be refactored in 3 layers:
> 1) the spoolmanager: create threads and worker, accept mails and pass them to the "mail processor"
> 2) JamesProcessor: manage a list of processors and pass the mail to the processor given its current state
> 3) LInearProcessor: remain almost unchanged, but handle its own configuration.
> The 3 objects could be transformed in toplevel components in order to remove the ContainerUtil usage and have a better codebase to run in different containers.
> The final goal would be to have a modular spoolmanager: we could then introduce an OutgoingSpoolManager that simply implement the current "scheduling" and people could wire together spoolmanagers and mail processors as they prefer.
> It also makes more sense to have the RemoteDelivery in a top level component instead of using Mailet instantiated threads.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


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


[jira] Commented: (JAMES-491) SpoolManager refactorings

Posted by "Stefano Bagnara (JIRA)" <se...@james.apache.org>.
    [ http://issues.apache.org/jira/browse/JAMES-491?page=comments#action_12383335 ] 

Stefano Bagnara commented on JAMES-491:
---------------------------------------

Changed the store behaviour.

Now JamesSPoolManager calls the store for messages processed by its mailProcessor while LInearProcessor calls the store *only* for new mails (mails created by a split / partial match).


> SpoolManager refactorings
> -------------------------
>
>          Key: JAMES-491
>          URL: http://issues.apache.org/jira/browse/JAMES-491
>      Project: James
>         Type: Improvement

>   Components: SpoolManager & Processors
>     Versions: 2.3.0a2
>     Reporter: Stefano Bagnara
>     Assignee: Stefano Bagnara

>
> JamesSPoolManager and LinearProcessor should be refactored in 3 layers:
> 1) the spoolmanager: create threads and worker, accept mails and pass them to the "mail processor"
> 2) JamesProcessor: manage a list of processors and pass the mail to the processor given its current state
> 3) LInearProcessor: remain almost unchanged, but handle its own configuration.
> The 3 objects could be transformed in toplevel components in order to remove the ContainerUtil usage and have a better codebase to run in different containers.
> The final goal would be to have a modular spoolmanager: we could then introduce an OutgoingSpoolManager that simply implement the current "scheduling" and people could wire together spoolmanagers and mail processors as they prefer.
> It also makes more sense to have the RemoteDelivery in a top level component instead of using Mailet instantiated threads.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


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


[jira] Resolved: (JAMES-491) SpoolManager refactorings

Posted by "Stefano Bagnara (JIRA)" <se...@james.apache.org>.
     [ https://issues.apache.org/jira/browse/JAMES-491?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Stefano Bagnara resolved JAMES-491.
-----------------------------------

       Resolution: Fixed
    Fix Version/s:     (was: Trunk)
                   Next Major

Marking this as fixed. The first step has been done.
IF someone think there is a need for the remaining steps to be implemented then feel free to open a new ad-hoc issue.

> SpoolManager refactorings
> -------------------------
>
>                 Key: JAMES-491
>                 URL: https://issues.apache.org/jira/browse/JAMES-491
>             Project: James
>          Issue Type: Improvement
>          Components: SpoolManager & Processors
>    Affects Versions: 2.3.0
>            Reporter: Stefano Bagnara
>         Assigned To: Stefano Bagnara
>             Fix For: Next Major
>
>
> JamesSPoolManager and LinearProcessor should be refactored in 3 layers:
> 1) the spoolmanager: create threads and worker, accept mails and pass them to the "mail processor"
> 2) JamesProcessor: manage a list of processors and pass the mail to the processor given its current state
> 3) LInearProcessor: remain almost unchanged, but handle its own configuration.
> The 3 objects could be transformed in toplevel components in order to remove the ContainerUtil usage and have a better codebase to run in different containers.
> The final goal would be to have a modular spoolmanager: we could then introduce an OutgoingSpoolManager that simply implement the current "scheduling" and people could wire together spoolmanagers and mail processors as they prefer.
> It also makes more sense to have the RemoteDelivery in a top level component instead of using Mailet instantiated threads.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


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


[jira] Updated: (JAMES-491) SpoolManager refactorings

Posted by "Norman Maurer (JIRA)" <se...@james.apache.org>.
     [ http://issues.apache.org/jira/browse/JAMES-491?page=all ]

Norman Maurer updated JAMES-491:
--------------------------------

    Fix Version: 3.0
                     (was: 2.4.0)

> SpoolManager refactorings
> -------------------------
>
>          Key: JAMES-491
>          URL: http://issues.apache.org/jira/browse/JAMES-491
>      Project: James
>         Type: Improvement

>   Components: SpoolManager & Processors
>     Versions: 2.3.0
>     Reporter: Stefano Bagnara
>     Assignee: Stefano Bagnara
>      Fix For: 3.0

>
> JamesSPoolManager and LinearProcessor should be refactored in 3 layers:
> 1) the spoolmanager: create threads and worker, accept mails and pass them to the "mail processor"
> 2) JamesProcessor: manage a list of processors and pass the mail to the processor given its current state
> 3) LInearProcessor: remain almost unchanged, but handle its own configuration.
> The 3 objects could be transformed in toplevel components in order to remove the ContainerUtil usage and have a better codebase to run in different containers.
> The final goal would be to have a modular spoolmanager: we could then introduce an OutgoingSpoolManager that simply implement the current "scheduling" and people could wire together spoolmanagers and mail processors as they prefer.
> It also makes more sense to have the RemoteDelivery in a top level component instead of using Mailet instantiated threads.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


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


[jira] Updated: (JAMES-491) SpoolManager refactorings

Posted by "Stefano Bagnara (JIRA)" <se...@james.apache.org>.
     [ http://issues.apache.org/jira/browse/JAMES-491?page=all ]

Stefano Bagnara updated JAMES-491:
----------------------------------

    Fix Version: 2.4.0
        Version: 2.3.0
                     (was: 2.3.0a2)

> SpoolManager refactorings
> -------------------------
>
>          Key: JAMES-491
>          URL: http://issues.apache.org/jira/browse/JAMES-491
>      Project: James
>         Type: Improvement

>   Components: SpoolManager & Processors
>     Versions: 2.3.0
>     Reporter: Stefano Bagnara
>     Assignee: Stefano Bagnara
>      Fix For: 2.4.0

>
> JamesSPoolManager and LinearProcessor should be refactored in 3 layers:
> 1) the spoolmanager: create threads and worker, accept mails and pass them to the "mail processor"
> 2) JamesProcessor: manage a list of processors and pass the mail to the processor given its current state
> 3) LInearProcessor: remain almost unchanged, but handle its own configuration.
> The 3 objects could be transformed in toplevel components in order to remove the ContainerUtil usage and have a better codebase to run in different containers.
> The final goal would be to have a modular spoolmanager: we could then introduce an OutgoingSpoolManager that simply implement the current "scheduling" and people could wire together spoolmanagers and mail processors as they prefer.
> It also makes more sense to have the RemoteDelivery in a top level component instead of using Mailet instantiated threads.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


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


[jira] Commented: (JAMES-491) SpoolManager refactorings

Posted by "Norman Maurer (JIRA)" <se...@james.apache.org>.
    [ http://issues.apache.org/jira/browse/JAMES-491?page=comments#action_12383364 ] 

Norman Maurer commented on JAMES-491:
-------------------------------------

When i try to start the current version i get an NullPointer:

root@debbox:/tmp/james-2.3-dev# ./bin/run.sh
Using PHOENIX_HOME:   /tmp/james-2.3-dev
Using PHOENIX_TMPDIR: /tmp/james-2.3-dev/temp
Using JAVA_HOME:      /usr/local/lib/jdk
Running Phoenix:

Phoenix 4.2

James Mail Server 2.3-dev
org.apache.avalon.phoenix.containerkit.lifecycle.LifecycleException: Component n
amed "spoolmanager" failed to pass through the Starting stage. (Reason: java.lan
g.NullPointerException).
        at org.apache.avalon.phoenix.containerkit.lifecycle.LifecycleHelper.fail
(LifecycleHelper.java:354)
        at org.apache.avalon.phoenix.containerkit.lifecycle.LifecycleHelper.star
tup(LifecycleHelper.java:226)
        at org.apache.avalon.phoenix.components.application.DefaultApplication.s
tartup(DefaultApplication.java:530)
        at org.apache.avalon.phoenix.components.application.DefaultApplication.d
oRunPhase(DefaultApplication.java:478)
        at org.apache.avalon.phoenix.components.application.DefaultApplication.r
unPhase(DefaultApplication.java:409)
        at org.apache.avalon.phoenix.components.application.DefaultApplication.s
tart(DefaultApplication.java:180)
        at org.apache.avalon.framework.container.ContainerUtil.start(ContainerUt
il.java:260)
        at org.apache.avalon.phoenix.components.kernel.DefaultKernel.startup(Def
aultKernel.java:295)
        at org.apache.avalon.phoenix.components.kernel.DefaultKernel.addApplicat
ion(DefaultKernel.java:376)
        at org.apache.avalon.phoenix.components.deployer.DefaultDeployer.deploy(
DefaultDeployer.java:357)
        at org.apache.avalon.phoenix.components.embeddor.DefaultEmbeddor.deployF
ile(DefaultEmbeddor.java:542)
        at org.apache.avalon.phoenix.components.embeddor.DefaultEmbeddor.deployF
ile(DefaultEmbeddor.java:535)
        at org.apache.avalon.phoenix.components.embeddor.DefaultEmbeddor.deployF
iles(DefaultEmbeddor.java:520)
        at org.apache.avalon.phoenix.components.embeddor.DefaultEmbeddor.deployD
efaultApplications(DefaultEmbeddor.java:509)
        at org.apache.avalon.phoenix.components.embeddor.DefaultEmbeddor.execute
(DefaultEmbeddor.java:268)
        at org.apache.avalon.phoenix.frontends.CLIMain.run(CLIMain.java:198)
        at org.apache.avalon.phoenix.frontends.CLIMain.execute(CLIMain.java:184)
        at org.apache.avalon.phoenix.frontends.CLIMain.main(CLIMain.java:145)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:585)
        at org.apache.avalon.phoenix.launcher.Main.startup(Main.java:128)
        at org.apache.avalon.phoenix.launcher.Main.main(Main.java:83)
Caused by: java.lang.NullPointerException
        at org.apache.james.transport.StateAwareProcessorList.initialize(StateAw
areProcessorList.java:109)
        at org.apache.avalon.framework.container.ContainerUtil.initialize(Contai
nerUtil.java:244)
        at org.apache.james.transport.JamesSpoolManager.initialize(JamesSpoolMan
ager.java:141)
        at org.apache.avalon.framework.container.ContainerUtil.initialize(Contai
nerUtil.java:244)
        at org.apache.avalon.phoenix.containerkit.lifecycle.LifecycleHelper.star
tup(LifecycleHelper.java:200)
        ... 22 more
There was an uncaught exception:
---------------------------------------------------------
--- Message ---
Failed to start application james.
--- Stack Trace ---
org.apache.avalon.phoenix.interfaces.DeploymentException: Failed to start applic
ation james.
        at org.apache.avalon.phoenix.components.deployer.DefaultDeployer.deploy(
DefaultDeployer.java:379)
        at org.apache.avalon.phoenix.components.embeddor.DefaultEmbeddor.deployF
ile(DefaultEmbeddor.java:542)
        at org.apache.avalon.phoenix.components.embeddor.DefaultEmbeddor.deployF
ile(DefaultEmbeddor.java:535)
        at org.apache.avalon.phoenix.components.embeddor.DefaultEmbeddor.deployF
iles(DefaultEmbeddor.java:520)
        at org.apache.avalon.phoenix.components.embeddor.DefaultEmbeddor.deployD
efaultApplications(DefaultEmbeddor.java:509)
        at org.apache.avalon.phoenix.components.embeddor.DefaultEmbeddor.execute
(DefaultEmbeddor.java:268)
        at org.apache.avalon.phoenix.frontends.CLIMain.run(CLIMain.java:198)
        at org.apache.avalon.phoenix.frontends.CLIMain.execute(CLIMain.java:184)
        at org.apache.avalon.phoenix.frontends.CLIMain.main(CLIMain.java:145)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:585)
        at org.apache.avalon.phoenix.launcher.Main.startup(Main.java:128)
        at org.apache.avalon.phoenix.launcher.Main.main(Main.java:83)
Caused by: org.apache.avalon.framework.CascadingException: Failed to start appli
cation james.
        at org.apache.avalon.phoenix.components.kernel.DefaultKernel.startup(Def
aultKernel.java:313)
        at org.apache.avalon.phoenix.components.kernel.DefaultKernel.addApplicat
ion(DefaultKernel.java:376)
        at org.apache.avalon.phoenix.components.deployer.DefaultDeployer.deploy(
DefaultDeployer.java:357)
        ... 14 more
Caused by: org.apache.avalon.phoenix.interfaces.ApplicationException: Component
named "spoolmanager" failed to pass through the Starting stage. (Reason: java.la
ng.NullPointerException).
        at org.apache.avalon.phoenix.components.application.DefaultApplication.s
tart(DefaultApplication.java:186)
        at org.apache.avalon.framework.container.ContainerUtil.start(ContainerUt
il.java:260)
        at org.apache.avalon.phoenix.components.kernel.DefaultKernel.startup(Def
aultKernel.java:295)
        ... 16 more
Caused by: org.apache.avalon.phoenix.containerkit.lifecycle.LifecycleException:
Component named "spoolmanager" failed to pass through the Starting stage. (Reaso
n: java.lang.NullPointerException).
        at org.apache.avalon.phoenix.containerkit.lifecycle.LifecycleHelper.fail
(LifecycleHelper.java:354)
        at org.apache.avalon.phoenix.containerkit.lifecycle.LifecycleHelper.star
tup(LifecycleHelper.java:226)
        at org.apache.avalon.phoenix.components.application.DefaultApplication.s
tartup(DefaultApplication.java:530)
        at org.apache.avalon.phoenix.components.application.DefaultApplication.d
oRunPhase(DefaultApplication.java:478)
        at org.apache.avalon.phoenix.components.application.DefaultApplication.r
unPhase(DefaultApplication.java:409)
        at org.apache.avalon.phoenix.components.application.DefaultApplication.s
tart(DefaultApplication.java:180)
        ... 18 more
Caused by: java.lang.NullPointerException
        at org.apache.james.transport.StateAwareProcessorList.initialize(StateAw
areProcessorList.java:109)
        at org.apache.avalon.framework.container.ContainerUtil.initialize(Contai
nerUtil.java:244)
        at org.apache.james.transport.JamesSpoolManager.initialize(JamesSpoolMan
ager.java:141)
        at org.apache.avalon.framework.container.ContainerUtil.initialize(Contai
nerUtil.java:244)
        at org.apache.avalon.phoenix.containerkit.lifecycle.LifecycleHelper.star
tup(LifecycleHelper.java:200)
        ... 22 more
rethrown from
org.apache.avalon.framework.CascadingException: Failed to start application jame
s.
        at org.apache.avalon.phoenix.components.kernel.DefaultKernel.startup(Def
aultKernel.java:313)
        at org.apache.avalon.phoenix.components.kernel.DefaultKernel.addApplicat
ion(DefaultKernel.java:376)
        at org.apache.avalon.phoenix.components.deployer.DefaultDeployer.deploy(
DefaultDeployer.java:357)
        at org.apache.avalon.phoenix.components.embeddor.DefaultEmbeddor.deployF
ile(DefaultEmbeddor.java:542)
        at org.apache.avalon.phoenix.components.embeddor.DefaultEmbeddor.deployF
ile(DefaultEmbeddor.java:535)
        at org.apache.avalon.phoenix.components.embeddor.DefaultEmbeddor.deployF
iles(DefaultEmbeddor.java:520)
        at org.apache.avalon.phoenix.components.embeddor.DefaultEmbeddor.deployD
efaultApplications(DefaultEmbeddor.java:509)
        at org.apache.avalon.phoenix.components.embeddor.DefaultEmbeddor.execute
(DefaultEmbeddor.java:268)
        at org.apache.avalon.phoenix.frontends.CLIMain.run(CLIMain.java:198)
        at org.apache.avalon.phoenix.frontends.CLIMain.execute(CLIMain.java:184)
        at org.apache.avalon.phoenix.frontends.CLIMain.main(CLIMain.java:145)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:585)
        at org.apache.avalon.phoenix.launcher.Main.startup(Main.java:128)
        at org.apache.avalon.phoenix.launcher.Main.main(Main.java:83)
Caused by: org.apache.avalon.phoenix.interfaces.ApplicationException: Component
named "spoolmanager" failed to pass through the Starting stage. (Reason: java.la
ng.NullPointerException).
        at org.apache.avalon.phoenix.components.application.DefaultApplication.s
tart(DefaultApplication.java:186)
        at org.apache.avalon.framework.container.ContainerUtil.start(ContainerUt
il.java:260)
        at org.apache.avalon.phoenix.components.kernel.DefaultKernel.startup(Def
aultKernel.java:295)
        ... 16 more
Caused by: org.apache.avalon.phoenix.containerkit.lifecycle.LifecycleException:
Component named "spoolmanager" failed to pass through the Starting stage. (Reaso
n: java.lang.NullPointerException).
        at org.apache.avalon.phoenix.containerkit.lifecycle.LifecycleHelper.fail
(LifecycleHelper.java:354)
        at org.apache.avalon.phoenix.containerkit.lifecycle.LifecycleHelper.star
tup(LifecycleHelper.java:226)
        at org.apache.avalon.phoenix.components.application.DefaultApplication.s
tartup(DefaultApplication.java:530)
        at org.apache.avalon.phoenix.components.application.DefaultApplication.d
oRunPhase(DefaultApplication.java:478)
        at org.apache.avalon.phoenix.components.application.DefaultApplication.r
unPhase(DefaultApplication.java:409)
        at org.apache.avalon.phoenix.components.application.DefaultApplication.s
tart(DefaultApplication.java:180)
        ... 18 more
Caused by: java.lang.NullPointerException
        at org.apache.james.transport.StateAwareProcessorList.initialize(StateAw
areProcessorList.java:109)
        at org.apache.avalon.framework.container.ContainerUtil.initialize(Contai
nerUtil.java:244)
        at org.apache.james.transport.JamesSpoolManager.initialize(JamesSpoolMan
ager.java:141)
        at org.apache.avalon.framework.container.ContainerUtil.initialize(Contai
nerUtil.java:244)
        at org.apache.avalon.phoenix.containerkit.lifecycle.LifecycleHelper.star
tup(LifecycleHelper.java:200)
        ... 22 more
rethrown from
org.apache.avalon.phoenix.interfaces.ApplicationException: Component named "spoo
lmanager" failed to pass through the Starting stage. (Reason: java.lang.NullPoin
terException).
        at org.apache.avalon.phoenix.components.application.DefaultApplication.s
tart(DefaultApplication.java:186)
        at org.apache.avalon.framework.container.ContainerUtil.start(ContainerUt
il.java:260)
        at org.apache.avalon.phoenix.components.kernel.DefaultKernel.startup(Def
aultKernel.java:295)
        at org.apache.avalon.phoenix.components.kernel.DefaultKernel.addApplicat
ion(DefaultKernel.java:376)
        at org.apache.avalon.phoenix.components.deployer.DefaultDeployer.deploy(
DefaultDeployer.java:357)
        at org.apache.avalon.phoenix.components.embeddor.DefaultEmbeddor.deployF
ile(DefaultEmbeddor.java:542)
        at org.apache.avalon.phoenix.components.embeddor.DefaultEmbeddor.deployF
ile(DefaultEmbeddor.java:535)
        at org.apache.avalon.phoenix.components.embeddor.DefaultEmbeddor.deployF
iles(DefaultEmbeddor.java:520)
        at org.apache.avalon.phoenix.components.embeddor.DefaultEmbeddor.deployD
efaultApplications(DefaultEmbeddor.java:509)
        at org.apache.avalon.phoenix.components.embeddor.DefaultEmbeddor.execute
(DefaultEmbeddor.java:268)
        at org.apache.avalon.phoenix.frontends.CLIMain.run(CLIMain.java:198)
        at org.apache.avalon.phoenix.frontends.CLIMain.execute(CLIMain.java:184)
        at org.apache.avalon.phoenix.frontends.CLIMain.main(CLIMain.java:145)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:585)
        at org.apache.avalon.phoenix.launcher.Main.startup(Main.java:128)
        at org.apache.avalon.phoenix.launcher.Main.main(Main.java:83)
Caused by: org.apache.avalon.phoenix.containerkit.lifecycle.LifecycleException:
Component named "spoolmanager" failed to pass through the Starting stage. (Reaso
n: java.lang.NullPointerException).
        at org.apache.avalon.phoenix.containerkit.lifecycle.LifecycleHelper.fail
(LifecycleHelper.java:354)
        at org.apache.avalon.phoenix.containerkit.lifecycle.LifecycleHelper.star
tup(LifecycleHelper.java:226)
        at org.apache.avalon.phoenix.components.application.DefaultApplication.s
tartup(DefaultApplication.java:530)
        at org.apache.avalon.phoenix.components.application.DefaultApplication.d
oRunPhase(DefaultApplication.java:478)
        at org.apache.avalon.phoenix.components.application.DefaultApplication.r
unPhase(DefaultApplication.java:409)
        at org.apache.avalon.phoenix.components.application.DefaultApplication.s
tart(DefaultApplication.java:180)
        ... 18 more
Caused by: java.lang.NullPointerException
        at org.apache.james.transport.StateAwareProcessorList.initialize(StateAw
areProcessorList.java:109)
        at org.apache.avalon.framework.container.ContainerUtil.initialize(Contai
nerUtil.java:244)
        at org.apache.james.transport.JamesSpoolManager.initialize(JamesSpoolMan
ager.java:141)
        at org.apache.avalon.framework.container.ContainerUtil.initialize(Contai
nerUtil.java:244)
        at org.apache.avalon.phoenix.containerkit.lifecycle.LifecycleHelper.star
tup(LifecycleHelper.java:200)
        ... 22 more
rethrown from
org.apache.avalon.phoenix.containerkit.lifecycle.LifecycleException: Component n
amed "spoolmanager" failed to pass through the Starting stage. (Reason: java.lan
g.NullPointerException).
        at org.apache.avalon.phoenix.containerkit.lifecycle.LifecycleHelper.fail
(LifecycleHelper.java:354)
        at org.apache.avalon.phoenix.containerkit.lifecycle.LifecycleHelper.star
tup(LifecycleHelper.java:226)
        at org.apache.avalon.phoenix.components.application.DefaultApplication.s
tartup(DefaultApplication.java:530)
        at org.apache.avalon.phoenix.components.application.DefaultApplication.d
oRunPhase(DefaultApplication.java:478)
        at org.apache.avalon.phoenix.components.application.DefaultApplication.r
unPhase(DefaultApplication.java:409)
        at org.apache.avalon.phoenix.components.application.DefaultApplication.s
tart(DefaultApplication.java:180)
        at org.apache.avalon.framework.container.ContainerUtil.start(ContainerUt
il.java:260)
        at org.apache.avalon.phoenix.components.kernel.DefaultKernel.startup(Def
aultKernel.java:295)
        at org.apache.avalon.phoenix.components.kernel.DefaultKernel.addApplicat
ion(DefaultKernel.java:376)
        at org.apache.avalon.phoenix.components.deployer.DefaultDeployer.deploy(
DefaultDeployer.java:357)
        at org.apache.avalon.phoenix.components.embeddor.DefaultEmbeddor.deployF
ile(DefaultEmbeddor.java:542)
        at org.apache.avalon.phoenix.components.embeddor.DefaultEmbeddor.deployF
ile(DefaultEmbeddor.java:535)
        at org.apache.avalon.phoenix.components.embeddor.DefaultEmbeddor.deployF
iles(DefaultEmbeddor.java:520)
        at org.apache.avalon.phoenix.components.embeddor.DefaultEmbeddor.deployD
efaultApplications(DefaultEmbeddor.java:509)
        at org.apache.avalon.phoenix.components.embeddor.DefaultEmbeddor.execute
(DefaultEmbeddor.java:268)
        at org.apache.avalon.phoenix.frontends.CLIMain.run(CLIMain.java:198)
        at org.apache.avalon.phoenix.frontends.CLIMain.execute(CLIMain.java:184)
        at org.apache.avalon.phoenix.frontends.CLIMain.main(CLIMain.java:145)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:585)
        at org.apache.avalon.phoenix.launcher.Main.startup(Main.java:128)
        at org.apache.avalon.phoenix.launcher.Main.main(Main.java:83)
Caused by: java.lang.NullPointerException
        at org.apache.james.transport.StateAwareProcessorList.initialize(StateAw
areProcessorList.java:109)
        at org.apache.avalon.framework.container.ContainerUtil.initialize(Contai
nerUtil.java:244)
        at org.apache.james.transport.JamesSpoolManager.initialize(JamesSpoolMan
ager.java:141)
        at org.apache.avalon.framework.container.ContainerUtil.initialize(Contai
nerUtil.java:244)
        at org.apache.avalon.phoenix.containerkit.lifecycle.LifecycleHelper.star
tup(LifecycleHelper.java:200)
        ... 22 more
rethrown from
java.lang.NullPointerException
        at org.apache.james.transport.StateAwareProcessorList.initialize(StateAw
areProcessorList.java:109)
        at org.apache.avalon.framework.container.ContainerUtil.initialize(Contai
nerUtil.java:244)
        at org.apache.james.transport.JamesSpoolManager.initialize(JamesSpoolMan
ager.java:141)
        at org.apache.avalon.framework.container.ContainerUtil.initialize(Contai
nerUtil.java:244)
        at org.apache.avalon.phoenix.containerkit.lifecycle.LifecycleHelper.star
tup(LifecycleHelper.java:200)
        at org.apache.avalon.phoenix.components.application.DefaultApplication.s
tartup(DefaultApplication.java:530)
        at org.apache.avalon.phoenix.components.application.DefaultApplication.d
oRunPhase(DefaultApplication.java:478)
        at org.apache.avalon.phoenix.components.application.DefaultApplication.r
unPhase(DefaultApplication.java:409)
        at org.apache.avalon.phoenix.components.application.DefaultApplication.s
tart(DefaultApplication.java:180)
        at org.apache.avalon.framework.container.ContainerUtil.start(ContainerUt
il.java:260)
        at org.apache.avalon.phoenix.components.kernel.DefaultKernel.startup(Def
aultKernel.java:295)
        at org.apache.avalon.phoenix.components.kernel.DefaultKernel.addApplicat
ion(DefaultKernel.java:376)
        at org.apache.avalon.phoenix.components.deployer.DefaultDeployer.deploy(
DefaultDeployer.java:357)
        at org.apache.avalon.phoenix.components.embeddor.DefaultEmbeddor.deployF
ile(DefaultEmbeddor.java:542)
        at org.apache.avalon.phoenix.components.embeddor.DefaultEmbeddor.deployF
ile(DefaultEmbeddor.java:535)
        at org.apache.avalon.phoenix.components.embeddor.DefaultEmbeddor.deployF
iles(DefaultEmbeddor.java:520)
        at org.apache.avalon.phoenix.components.embeddor.DefaultEmbeddor.deployD
efaultApplications(DefaultEmbeddor.java:509)
        at org.apache.avalon.phoenix.components.embeddor.DefaultEmbeddor.execute
(DefaultEmbeddor.java:268)
        at org.apache.avalon.phoenix.frontends.CLIMain.run(CLIMain.java:198)
        at org.apache.avalon.phoenix.frontends.CLIMain.execute(CLIMain.java:184)
        at org.apache.avalon.phoenix.frontends.CLIMain.main(CLIMain.java:145)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.                                            java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces                                            sorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:585)
        at org.apache.avalon.phoenix.launcher.Main.startup(Main.java:128)
        at org.apache.avalon.phoenix.launcher.Main.main(Main.java:83)

---------------------------------------------------------
The log file may contain further details of error.
Please check the configuration files and restart Phoenix.
If the problem persists, contact the Avalon project.  See
http://jakarta.apache.org/avalon for more information.
Shutting down Phoenix.


> SpoolManager refactorings
> -------------------------
>
>          Key: JAMES-491
>          URL: http://issues.apache.org/jira/browse/JAMES-491
>      Project: James
>         Type: Improvement

>   Components: SpoolManager & Processors
>     Versions: 2.3.0a2
>     Reporter: Stefano Bagnara
>     Assignee: Stefano Bagnara

>
> JamesSPoolManager and LinearProcessor should be refactored in 3 layers:
> 1) the spoolmanager: create threads and worker, accept mails and pass them to the "mail processor"
> 2) JamesProcessor: manage a list of processors and pass the mail to the processor given its current state
> 3) LInearProcessor: remain almost unchanged, but handle its own configuration.
> The 3 objects could be transformed in toplevel components in order to remove the ContainerUtil usage and have a better codebase to run in different containers.
> The final goal would be to have a modular spoolmanager: we could then introduce an OutgoingSpoolManager that simply implement the current "scheduling" and people could wire together spoolmanagers and mail processors as they prefer.
> It also makes more sense to have the RemoteDelivery in a top level component instead of using Mailet instantiated threads.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


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