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 "David Jencks (JIRA)" <se...@james.apache.org> on 2008/06/15 17:50:45 UTC
[jira] Created: (JAMES-842) Inconsistencies in spring integration
Inconsistencies in spring integration
-------------------------------------
Key: JAMES-842
URL: https://issues.apache.org/jira/browse/JAMES-842
Project: James
Issue Type: Bug
Affects Versions: 3.0
Reporter: David Jencks
I've found a couple inconsistencies in the spring integration:
in AvalonConfigurationFileProvider InputSource is supplied a systemId for the james config files whereas in AvalonBeanDefinitionReader it is not. In my scenario this means that the entities in james-config.xml don't work because for AvalonConfigurationFileProvider the entities are resolved relative to the james-config.xml file location whereas for AvalonBeanDefinitionReader they are resolved relative to some base directory.
There's a FileSystem bean supplied to spring to locate stuff in the file system but it is not used in AvalonConfigurationFileProvider; AFAICT this means that configuration files must be in the classpath.
--
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] Commented: (JAMES-842) Inconsistencies in spring integration
Posted by "Stefano Bagnara (JIRA)" <se...@james.apache.org>.
[ https://issues.apache.org/jira/browse/JAMES-842?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12613200#action_12613200 ]
Stefano Bagnara commented on JAMES-842:
---------------------------------------
Sorry David, I don't remember where I saw the issue. It probably is in some lost cluster of my memory.
I think that if the server correctly starts up without exception during the initialization then you can ignore my null pointer.
> Inconsistencies in spring integration
> -------------------------------------
>
> Key: JAMES-842
> URL: https://issues.apache.org/jira/browse/JAMES-842
> Project: James
> Issue Type: Bug
> Affects Versions: 3.0
> Reporter: David Jencks
> Assignee: Stefano Bagnara
> Fix For: 3.0
>
> Attachments: JAMES-840-2.patch, JAMES-842-2.patch, JAMES-842-3.patch, JAMES-842.patch
>
>
> I've found a couple inconsistencies in the spring integration:
> in AvalonConfigurationFileProvider InputSource is supplied a systemId for the james config files whereas in AvalonBeanDefinitionReader it is not. In my scenario this means that the entities in james-config.xml don't work because for AvalonConfigurationFileProvider the entities are resolved relative to the james-config.xml file location whereas for AvalonBeanDefinitionReader they are resolved relative to some base directory.
> There's a FileSystem bean supplied to spring to locate stuff in the file system but it is not used in AvalonConfigurationFileProvider; AFAICT this means that configuration files must be in the classpath.
--
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] Resolved: (JAMES-842) Inconsistencies in spring integration
Posted by "Stefano Bagnara (JIRA)" <se...@james.apache.org>.
[ https://issues.apache.org/jira/browse/JAMES-842?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Stefano Bagnara resolved JAMES-842.
-----------------------------------
Resolution: Fixed
Fix Version/s: 3.0
Assignee: Stefano Bagnara
Hi David,
I just committed my attempt to solve this issue.
I moved to spring's Resource/ResourceLoader mechanisms to avoid binding the generic avalon/spring bridge to JAMES specific issues.
Please let me know if this works within geronimo.
> Inconsistencies in spring integration
> -------------------------------------
>
> Key: JAMES-842
> URL: https://issues.apache.org/jira/browse/JAMES-842
> Project: James
> Issue Type: Bug
> Affects Versions: 3.0
> Reporter: David Jencks
> Assignee: Stefano Bagnara
> Fix For: 3.0
>
> Attachments: JAMES-842.patch
>
>
> I've found a couple inconsistencies in the spring integration:
> in AvalonConfigurationFileProvider InputSource is supplied a systemId for the james config files whereas in AvalonBeanDefinitionReader it is not. In my scenario this means that the entities in james-config.xml don't work because for AvalonConfigurationFileProvider the entities are resolved relative to the james-config.xml file location whereas for AvalonBeanDefinitionReader they are resolved relative to some base directory.
> There's a FileSystem bean supplied to spring to locate stuff in the file system but it is not used in AvalonConfigurationFileProvider; AFAICT this means that configuration files must be in the classpath.
--
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] Commented: (JAMES-842) Inconsistencies in spring integration
Posted by "David Jencks (JIRA)" <se...@james.apache.org>.
[ https://issues.apache.org/jira/browse/JAMES-842?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12612936#action_12612936 ]
David Jencks commented on JAMES-842:
------------------------------------
After fixing the build problems I had in james these changes appear to work fine with geronimo, as far as I can tell.
I have GeronimoAvalonApplicationContext directly overriding AvalonApplicationContext and implementing the ResourceLoader methods directly. I think this solution is fine.
I still don't know how to do an actual test of the geronimo-james plugin to see if the file.exists() check is reasonable.
> Inconsistencies in spring integration
> -------------------------------------
>
> Key: JAMES-842
> URL: https://issues.apache.org/jira/browse/JAMES-842
> Project: James
> Issue Type: Bug
> Affects Versions: 3.0
> Reporter: David Jencks
> Assignee: Stefano Bagnara
> Fix For: 3.0
>
> Attachments: JAMES-840-2.patch, JAMES-842-2.patch, JAMES-842-3.patch, JAMES-842.patch
>
>
> I've found a couple inconsistencies in the spring integration:
> in AvalonConfigurationFileProvider InputSource is supplied a systemId for the james config files whereas in AvalonBeanDefinitionReader it is not. In my scenario this means that the entities in james-config.xml don't work because for AvalonConfigurationFileProvider the entities are resolved relative to the james-config.xml file location whereas for AvalonBeanDefinitionReader they are resolved relative to some base directory.
> There's a FileSystem bean supplied to spring to locate stuff in the file system but it is not used in AvalonConfigurationFileProvider; AFAICT this means that configuration files must be in the classpath.
--
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-842) Inconsistencies in spring integration
Posted by "David Jencks (JIRA)" <se...@james.apache.org>.
[ https://issues.apache.org/jira/browse/JAMES-842?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
David Jencks updated JAMES-842:
-------------------------------
Attachment: JAMES-842-3.patch
I tried the approach of removing the user of ResourceLoaderAware and that seems to work ok in geronimo also, see the attached patch. I don't know to what extent spring uses ResourceLoaderAware but since I ran into problems with it using the AvalonApplicationContext instead of explicitly configured ResourceLoaders I think that the JAMES-842-2.patch solution is safer since everything is sure to get the ApplicationContext implemented ResourceLoader. I think it's unfortunate that Spring has combined these functions in the same class.
I think that for both patchs changes to the xml config files will be necessary.
> Inconsistencies in spring integration
> -------------------------------------
>
> Key: JAMES-842
> URL: https://issues.apache.org/jira/browse/JAMES-842
> Project: James
> Issue Type: Bug
> Affects Versions: 3.0
> Reporter: David Jencks
> Assignee: Stefano Bagnara
> Fix For: 3.0
>
> Attachments: JAMES-840-2.patch, JAMES-842-3.patch, JAMES-842.patch
>
>
> I've found a couple inconsistencies in the spring integration:
> in AvalonConfigurationFileProvider InputSource is supplied a systemId for the james config files whereas in AvalonBeanDefinitionReader it is not. In my scenario this means that the entities in james-config.xml don't work because for AvalonConfigurationFileProvider the entities are resolved relative to the james-config.xml file location whereas for AvalonBeanDefinitionReader they are resolved relative to some base directory.
> There's a FileSystem bean supplied to spring to locate stuff in the file system but it is not used in AvalonConfigurationFileProvider; AFAICT this means that configuration files must be in the classpath.
--
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] Commented: (JAMES-842) Inconsistencies in spring integration
Posted by "Stefano Bagnara (JIRA)" <se...@james.apache.org>.
[ https://issues.apache.org/jira/browse/JAMES-842?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12612914#action_12612914 ]
Stefano Bagnara commented on JAMES-842:
---------------------------------------
Hi David,
I slightly modified JAMES-842-2.patch and applied it.
Please note that I created now a new module in james for the bridge code, and the James specific AvalonApplicationContext is now named JamesApplicationContext (you probably want to override this one).
I also warn you that the check for file.exists() you have in GeronimoAvalonApplicationContext may not be appropriate because we may have code that try to get File references even if they don't exists.
I don't remember now but I know I had to remove the check from our resource loader in order to run James.
Do you think JamesApplicationContext should be factored to expose a protected method for you to override only the file:// lookup?
> Inconsistencies in spring integration
> -------------------------------------
>
> Key: JAMES-842
> URL: https://issues.apache.org/jira/browse/JAMES-842
> Project: James
> Issue Type: Bug
> Affects Versions: 3.0
> Reporter: David Jencks
> Assignee: Stefano Bagnara
> Fix For: 3.0
>
> Attachments: JAMES-840-2.patch, JAMES-842-2.patch, JAMES-842-3.patch, JAMES-842.patch
>
>
> I've found a couple inconsistencies in the spring integration:
> in AvalonConfigurationFileProvider InputSource is supplied a systemId for the james config files whereas in AvalonBeanDefinitionReader it is not. In my scenario this means that the entities in james-config.xml don't work because for AvalonConfigurationFileProvider the entities are resolved relative to the james-config.xml file location whereas for AvalonBeanDefinitionReader they are resolved relative to some base directory.
> There's a FileSystem bean supplied to spring to locate stuff in the file system but it is not used in AvalonConfigurationFileProvider; AFAICT this means that configuration files must be in the classpath.
--
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] Commented: (JAMES-842) Inconsistencies in spring integration
Posted by "Stefano Bagnara (JIRA)" <se...@james.apache.org>.
[ https://issues.apache.org/jira/browse/JAMES-842?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12605221#action_12605221 ]
Stefano Bagnara commented on JAMES-842:
---------------------------------------
Maybe it would be even better to have a james agnostic component in the spring-avalon container and then have the filesystem service to use this component. It just doesn't seem ok to import james services from the spring container. In a perfect world the avalon-spring container is something not dependant to james.
Currently the only james-aware class in the spring deployment module is FileSystemBridge.java.
Any idea? Bernd?
> Inconsistencies in spring integration
> -------------------------------------
>
> Key: JAMES-842
> URL: https://issues.apache.org/jira/browse/JAMES-842
> Project: James
> Issue Type: Bug
> Affects Versions: 3.0
> Reporter: David Jencks
> Attachments: JAMES-842.patch
>
>
> I've found a couple inconsistencies in the spring integration:
> in AvalonConfigurationFileProvider InputSource is supplied a systemId for the james config files whereas in AvalonBeanDefinitionReader it is not. In my scenario this means that the entities in james-config.xml don't work because for AvalonConfigurationFileProvider the entities are resolved relative to the james-config.xml file location whereas for AvalonBeanDefinitionReader they are resolved relative to some base directory.
> There's a FileSystem bean supplied to spring to locate stuff in the file system but it is not used in AvalonConfigurationFileProvider; AFAICT this means that configuration files must be in the classpath.
--
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
Re: avalon-spring-library (Was: [jira] Commented: (JAMES-842) Inconsistencies in spring integration)
Posted by Bernd Fondermann <be...@googlemail.com>.
On Thu, Jul 3, 2008 at 10:59 AM, Stefano Bagnara <ap...@bago.org> wrote:
> Bernd Fondermann ha scritto:
>>
>> On Wed, Jul 2, 2008 at 10:57 AM, Stefano Bagnara <ap...@bago.org> wrote:
>>>
>>> Bernd Fondermann (JIRA) ha scritto:
>>>>
>>>> [
>>>>
>>>> https://issues.apache.org/jira/browse/JAMES-842?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12609623#action_12609623
>>>> ]
>>>> Bernd Fondermann commented on JAMES-842:
>>>> ----------------------------------------
>>>>
>>>> Great work, Stefano! Thanks for taking care (also for 841 & 840).
>>>
>>> Thank you :-)
>>>
>>> Should we move the "non-james-specific" spring-avalon bridge to an
>>> "avalon-spring-library" and just keep the FileSystemBridge+configurations
>>> in
>>> the spring-deployment module?
>>
>> I see the motivation for this and think its very worthwhile from an
>> architectural POV.
>
> I just realized that I didn't explain well what I meant.
No, rereading this you did, but reading it for the first time I must
have mixed your past remarks in where you said that this spring-avalon
adapter might of interest for other projects than James.
> I was proposing only to create a james server submodule (like the
> core-library module) to host the non-james-specific code. This way the code
> would be part of the main james tree (we would have 1 more module, of
> course) but it would be cleaner what is the bridge and would be easier to
> allow people to just get the bridge and build it (with m2 is already
> possible to build a module without the whole project checked out).
Well, if _you_ propose to add yet another module, there must be
something to it ;-))
<snip/>
> And if people agree it is a positive change I would offer myself for the
> task (not a big issue, if I don't miss something).
+1
Bernd
---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org
Re: avalon-spring-library (Was: [jira] Commented: (JAMES-842)
Inconsistencies in spring integration)
Posted by Norman Maurer <no...@apache.org>.
Am Donnerstag, den 03.07.2008, 13:27 +0100 schrieb Robert Burrell
Donkin:
> On Thu, Jul 3, 2008 at 9:59 AM, Stefano Bagnara <ap...@bago.org> wrote:
> > Bernd Fondermann ha scritto:
> >>
> >> On Wed, Jul 2, 2008 at 10:57 AM, Stefano Bagnara <ap...@bago.org> wrote:
> >>>
> >>> Bernd Fondermann (JIRA) ha scritto:
> >>>>
> >>>> [
> >>>>
> >>>> https://issues.apache.org/jira/browse/JAMES-842?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12609623#action_12609623
> >>>> ]
> >>>> Bernd Fondermann commented on JAMES-842:
> >>>> ----------------------------------------
> >>>>
> >>>> Great work, Stefano! Thanks for taking care (also for 841 & 840).
> >>>
> >>> Thank you :-)
> >>>
> >>> Should we move the "non-james-specific" spring-avalon bridge to an
> >>> "avalon-spring-library" and just keep the FileSystemBridge+configurations
> >>> in
> >>> the spring-deployment module?
> >>
> >> I see the motivation for this and think its very worthwhile from an
> >> architectural POV.
> >
> > I just realized that I didn't explain well what I meant.
> >
> > I was proposing only to create a james server submodule (like the
> > core-library module) to host the non-james-specific code. This way the code
> > would be part of the main james tree (we would have 1 more module, of
> > course) but it would be cleaner what is the bridge and would be easier to
> > allow people to just get the bridge and build it (with m2 is already
> > possible to build a module without the whole project checked out).
> >
> >> And I'd support it, if I'd have the time for it. But I haven't. :-/
> >> Maybe people from springframework.org want to adopt it and develop it
> >> independent from James.
> >
> > *IF* people will have interests in that code or we find that we need to
> > release it indipendently then (and only then) we could move it outside from
> > the james tree (as its own james product or in excalibur, or in
> > springframework..).
> >
> > And if people agree it is a positive change I would offer myself for the
> > task (not a big issue, if I don't miss something).
>
> sounds like a good change to me
>
> - robert
go, Stefano go ;-)
bye
Norman
---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org
Re: avalon-spring-library (Was: [jira] Commented: (JAMES-842) Inconsistencies in spring integration)
Posted by Robert Burrell Donkin <ro...@gmail.com>.
On Thu, Jul 3, 2008 at 9:59 AM, Stefano Bagnara <ap...@bago.org> wrote:
> Bernd Fondermann ha scritto:
>>
>> On Wed, Jul 2, 2008 at 10:57 AM, Stefano Bagnara <ap...@bago.org> wrote:
>>>
>>> Bernd Fondermann (JIRA) ha scritto:
>>>>
>>>> [
>>>>
>>>> https://issues.apache.org/jira/browse/JAMES-842?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12609623#action_12609623
>>>> ]
>>>> Bernd Fondermann commented on JAMES-842:
>>>> ----------------------------------------
>>>>
>>>> Great work, Stefano! Thanks for taking care (also for 841 & 840).
>>>
>>> Thank you :-)
>>>
>>> Should we move the "non-james-specific" spring-avalon bridge to an
>>> "avalon-spring-library" and just keep the FileSystemBridge+configurations
>>> in
>>> the spring-deployment module?
>>
>> I see the motivation for this and think its very worthwhile from an
>> architectural POV.
>
> I just realized that I didn't explain well what I meant.
>
> I was proposing only to create a james server submodule (like the
> core-library module) to host the non-james-specific code. This way the code
> would be part of the main james tree (we would have 1 more module, of
> course) but it would be cleaner what is the bridge and would be easier to
> allow people to just get the bridge and build it (with m2 is already
> possible to build a module without the whole project checked out).
>
>> And I'd support it, if I'd have the time for it. But I haven't. :-/
>> Maybe people from springframework.org want to adopt it and develop it
>> independent from James.
>
> *IF* people will have interests in that code or we find that we need to
> release it indipendently then (and only then) we could move it outside from
> the james tree (as its own james product or in excalibur, or in
> springframework..).
>
> And if people agree it is a positive change I would offer myself for the
> task (not a big issue, if I don't miss something).
sounds like a good change to me
- robert
---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org
Re: avalon-spring-library (Was: [jira] Commented: (JAMES-842) Inconsistencies
in spring integration)
Posted by Stefano Bagnara <ap...@bago.org>.
Bernd Fondermann ha scritto:
> On Wed, Jul 2, 2008 at 10:57 AM, Stefano Bagnara <ap...@bago.org> wrote:
>> Bernd Fondermann (JIRA) ha scritto:
>>> [
>>> https://issues.apache.org/jira/browse/JAMES-842?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12609623#action_12609623
>>> ]
>>> Bernd Fondermann commented on JAMES-842:
>>> ----------------------------------------
>>>
>>> Great work, Stefano! Thanks for taking care (also for 841 & 840).
>> Thank you :-)
>>
>> Should we move the "non-james-specific" spring-avalon bridge to an
>> "avalon-spring-library" and just keep the FileSystemBridge+configurations in
>> the spring-deployment module?
>
> I see the motivation for this and think its very worthwhile from an
> architectural POV.
I just realized that I didn't explain well what I meant.
I was proposing only to create a james server submodule (like the
core-library module) to host the non-james-specific code. This way the
code would be part of the main james tree (we would have 1 more module,
of course) but it would be cleaner what is the bridge and would be
easier to allow people to just get the bridge and build it (with m2 is
already possible to build a module without the whole project checked out).
> And I'd support it, if I'd have the time for it. But I haven't. :-/
> Maybe people from springframework.org want to adopt it and develop it
> independent from James.
*IF* people will have interests in that code or we find that we need to
release it indipendently then (and only then) we could move it outside
from the james tree (as its own james product or in excalibur, or in
springframework..).
And if people agree it is a positive change I would offer myself for the
task (not a big issue, if I don't miss something).
Stefano
---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org
Re: avalon-spring-library (Was: [jira] Commented: (JAMES-842) Inconsistencies in spring integration)
Posted by Bernd Fondermann <be...@googlemail.com>.
On Wed, Jul 2, 2008 at 10:57 AM, Stefano Bagnara <ap...@bago.org> wrote:
> Bernd Fondermann (JIRA) ha scritto:
>>
>> [
>> https://issues.apache.org/jira/browse/JAMES-842?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12609623#action_12609623
>> ]
>> Bernd Fondermann commented on JAMES-842:
>> ----------------------------------------
>>
>> Great work, Stefano! Thanks for taking care (also for 841 & 840).
>
> Thank you :-)
>
> Should we move the "non-james-specific" spring-avalon bridge to an
> "avalon-spring-library" and just keep the FileSystemBridge+configurations in
> the spring-deployment module?
I see the motivation for this and think its very worthwhile from an
architectural POV.
And I'd support it, if I'd have the time for it. But I haven't. :-/
Maybe people from springframework.org want to adopt it and develop it
independent from James.
Right now I'd say that we - in this project - should concentrate on
making James better.
Bernd
---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org
avalon-spring-library (Was: [jira] Commented: (JAMES-842) Inconsistencies
in spring integration)
Posted by Stefano Bagnara <ap...@bago.org>.
Bernd Fondermann (JIRA) ha scritto:
> [ https://issues.apache.org/jira/browse/JAMES-842?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12609623#action_12609623 ]
>
> Bernd Fondermann commented on JAMES-842:
> ----------------------------------------
>
> Great work, Stefano! Thanks for taking care (also for 841 & 840).
Thank you :-)
Should we move the "non-james-specific" spring-avalon bridge to an
"avalon-spring-library" and just keep the
FileSystemBridge+configurations in the spring-deployment module?
Stefano
>> Inconsistencies in spring integration
>> -------------------------------------
>>
>> Key: JAMES-842
>> URL: https://issues.apache.org/jira/browse/JAMES-842
>> Project: James
>> Issue Type: Bug
>> Affects Versions: 3.0
>> Reporter: David Jencks
>> Assignee: Stefano Bagnara
>> Fix For: 3.0
>>
>> Attachments: JAMES-842.patch
>>
>>
>> I've found a couple inconsistencies in the spring integration:
>> in AvalonConfigurationFileProvider InputSource is supplied a systemId for the james config files whereas in AvalonBeanDefinitionReader it is not. In my scenario this means that the entities in james-config.xml don't work because for AvalonConfigurationFileProvider the entities are resolved relative to the james-config.xml file location whereas for AvalonBeanDefinitionReader they are resolved relative to some base directory.
>> There's a FileSystem bean supplied to spring to locate stuff in the file system but it is not used in AvalonConfigurationFileProvider; AFAICT this means that configuration files must be in the classpath.
>
---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org
[jira] Commented: (JAMES-842) Inconsistencies in spring integration
Posted by "Bernd Fondermann (JIRA)" <se...@james.apache.org>.
[ https://issues.apache.org/jira/browse/JAMES-842?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12609623#action_12609623 ]
Bernd Fondermann commented on JAMES-842:
----------------------------------------
Great work, Stefano! Thanks for taking care (also for 841 & 840).
> Inconsistencies in spring integration
> -------------------------------------
>
> Key: JAMES-842
> URL: https://issues.apache.org/jira/browse/JAMES-842
> Project: James
> Issue Type: Bug
> Affects Versions: 3.0
> Reporter: David Jencks
> Assignee: Stefano Bagnara
> Fix For: 3.0
>
> Attachments: JAMES-842.patch
>
>
> I've found a couple inconsistencies in the spring integration:
> in AvalonConfigurationFileProvider InputSource is supplied a systemId for the james config files whereas in AvalonBeanDefinitionReader it is not. In my scenario this means that the entities in james-config.xml don't work because for AvalonConfigurationFileProvider the entities are resolved relative to the james-config.xml file location whereas for AvalonBeanDefinitionReader they are resolved relative to some base directory.
> There's a FileSystem bean supplied to spring to locate stuff in the file system but it is not used in AvalonConfigurationFileProvider; AFAICT this means that configuration files must be in the classpath.
--
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] Commented: (JAMES-842) Inconsistencies in spring integration
Posted by "Stefano Bagnara (JIRA)" <se...@james.apache.org>.
[ https://issues.apache.org/jira/browse/JAMES-842?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12611628#action_12611628 ]
Stefano Bagnara commented on JAMES-842:
---------------------------------------
David, I was about reviewing the patches but I noticed you attached JAMES-840-2.patch instead of JAMES-842-2.patch .. can you attach the right patch?
> Inconsistencies in spring integration
> -------------------------------------
>
> Key: JAMES-842
> URL: https://issues.apache.org/jira/browse/JAMES-842
> Project: James
> Issue Type: Bug
> Affects Versions: 3.0
> Reporter: David Jencks
> Assignee: Stefano Bagnara
> Fix For: 3.0
>
> Attachments: JAMES-840-2.patch, JAMES-842-3.patch, JAMES-842.patch
>
>
> I've found a couple inconsistencies in the spring integration:
> in AvalonConfigurationFileProvider InputSource is supplied a systemId for the james config files whereas in AvalonBeanDefinitionReader it is not. In my scenario this means that the entities in james-config.xml don't work because for AvalonConfigurationFileProvider the entities are resolved relative to the james-config.xml file location whereas for AvalonBeanDefinitionReader they are resolved relative to some base directory.
> There's a FileSystem bean supplied to spring to locate stuff in the file system but it is not used in AvalonConfigurationFileProvider; AFAICT this means that configuration files must be in the classpath.
--
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-842) Inconsistencies in spring integration
Posted by "David Jencks (JIRA)" <se...@james.apache.org>.
[ https://issues.apache.org/jira/browse/JAMES-842?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
David Jencks updated JAMES-842:
-------------------------------
Attachment: JAMES-842.patch
Fixes for the two problems noted.
I have only tried this patch together with the changes in JAMES-841.patch
> Inconsistencies in spring integration
> -------------------------------------
>
> Key: JAMES-842
> URL: https://issues.apache.org/jira/browse/JAMES-842
> Project: James
> Issue Type: Bug
> Affects Versions: 3.0
> Reporter: David Jencks
> Attachments: JAMES-842.patch
>
>
> I've found a couple inconsistencies in the spring integration:
> in AvalonConfigurationFileProvider InputSource is supplied a systemId for the james config files whereas in AvalonBeanDefinitionReader it is not. In my scenario this means that the entities in james-config.xml don't work because for AvalonConfigurationFileProvider the entities are resolved relative to the james-config.xml file location whereas for AvalonBeanDefinitionReader they are resolved relative to some base directory.
> There's a FileSystem bean supplied to spring to locate stuff in the file system but it is not used in AvalonConfigurationFileProvider; AFAICT this means that configuration files must be in the classpath.
--
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-842) Inconsistencies in spring integration
Posted by "David Jencks (JIRA)" <se...@james.apache.org>.
[ https://issues.apache.org/jira/browse/JAMES-842?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
David Jencks updated JAMES-842:
-------------------------------
Attachment: JAMES-842-2.patch
Oops, here's the correct patch (I hope :-)
Another note..... this method of using the ApplicationContext as the ResourceLoader leads to much cleaner code in the geronimo integration since we have a single point where we can directly supply the necessary geronimo services. With the other approach I have to supply the geronimo services via static fields in the ResourceLoader implementation or do something like a singleton lookup. Direct dependency injection, possible with this patch, seems like a much cleaner approach.
> Inconsistencies in spring integration
> -------------------------------------
>
> Key: JAMES-842
> URL: https://issues.apache.org/jira/browse/JAMES-842
> Project: James
> Issue Type: Bug
> Affects Versions: 3.0
> Reporter: David Jencks
> Assignee: Stefano Bagnara
> Fix For: 3.0
>
> Attachments: JAMES-840-2.patch, JAMES-842-2.patch, JAMES-842-3.patch, JAMES-842.patch
>
>
> I've found a couple inconsistencies in the spring integration:
> in AvalonConfigurationFileProvider InputSource is supplied a systemId for the james config files whereas in AvalonBeanDefinitionReader it is not. In my scenario this means that the entities in james-config.xml don't work because for AvalonConfigurationFileProvider the entities are resolved relative to the james-config.xml file location whereas for AvalonBeanDefinitionReader they are resolved relative to some base directory.
> There's a FileSystem bean supplied to spring to locate stuff in the file system but it is not used in AvalonConfigurationFileProvider; AFAICT this means that configuration files must be in the classpath.
--
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-842) Inconsistencies in spring integration
Posted by "David Jencks (JIRA)" <se...@james.apache.org>.
[ https://issues.apache.org/jira/browse/JAMES-842?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
David Jencks updated JAMES-842:
-------------------------------
Attachment: JAMES-840-2.patch
While I think that the switch to ResourceLoader is a very good idea, based on my experience in the geronimo plugin I don't think it is working as you expect. I believe that the JamesResourceLoader is rarely actually used, instead the AvalonApplicationContext implementation of ResourceLoader is being installed by spring as the actual service at runtime. The only way I could find to work around this is to implement the ResourceLoader functionality directly in (my subclass of) AvalonApplicationContext.
There's another problem in that the AvalonApplicationContext constructor is calling refresh(). This effectively prevents remiplmenting the ResourceLoader functionality in subclasses since refresh() involves use of that ResourceLoader functionality. (this is a classic example of why calling (non static, non final) instance methods from a constructor is a bad idea)
I've proposed a patch that solves this latter problem by use of static factory methods. It also makes FileSystemBridge ResourceLoaderAware. It might be possible to solve these problems in another way by making AvalonConfigurationFileProvider no longer ResourceLoaderAware and explicitly configuring the use of the JamesResourceLoader; as it is now (before this patch), in the geronimo plugin the AvalonConfigurationFileProvider always got the resourceLoader set to the AvalonApplicationContext even when explicitly configured to the JamesResourceLoader.
My implementation of an AvalonApplicationContext subclass that implements the ResourceLoader functionality I need for geronimo is at
https://svn.apache.org/repos/asf/geronimo/plugins/james/trunk/geronimo-james/src/main/java/org/apache/geronimo/plugins/james/GeronimoAvalonApplicationContext.java
> Inconsistencies in spring integration
> -------------------------------------
>
> Key: JAMES-842
> URL: https://issues.apache.org/jira/browse/JAMES-842
> Project: James
> Issue Type: Bug
> Affects Versions: 3.0
> Reporter: David Jencks
> Assignee: Stefano Bagnara
> Fix For: 3.0
>
> Attachments: JAMES-840-2.patch, JAMES-842.patch
>
>
> I've found a couple inconsistencies in the spring integration:
> in AvalonConfigurationFileProvider InputSource is supplied a systemId for the james config files whereas in AvalonBeanDefinitionReader it is not. In my scenario this means that the entities in james-config.xml don't work because for AvalonConfigurationFileProvider the entities are resolved relative to the james-config.xml file location whereas for AvalonBeanDefinitionReader they are resolved relative to some base directory.
> There's a FileSystem bean supplied to spring to locate stuff in the file system but it is not used in AvalonConfigurationFileProvider; AFAICT this means that configuration files must be in the classpath.
--
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