Re: [Fixed?] Re: James IMAP and Alfresco and refactoring

2010-05-15 Thread Eric Charles
Hi Norman, Just svn up, mvn package and tested. I've got: Exception in thread pool-16-thread-1 openjpa-2.0.0-r422266:935683 nonfatal user error org.apache.openjpa.persistence.InvalidStateException: Can only perform operation while a transaction is active. FailedObject: SELECT user FROM

Re: [Fixed?] Re: James IMAP and Alfresco and refactoring

2010-05-15 Thread Norman Maurer
Hi Eric, your persistence.xml is not up-to-date. Compare it with trunk... Bye Norman 2010/5/15, Eric Charles eric.char...@u-mangate.com: Hi Norman, Just svn up, mvn package and tested. I've got: Exception in thread pool-16-thread-1 openjpa-2.0.0-r422266:935683 nonfatal user error

Re: [Fixed?] Re: James IMAP and Alfresco and refactoring

2010-05-15 Thread Eric Charles
Hi Norman, persistence was up-to-date but spring-beans had been merged with local changes. It's ok now. Tks Eric On 05/15/2010 08:10 AM, Norman Maurer wrote: Hi Eric, your persistence.xml is not up-to-date. Compare it with trunk... Bye Norman 2010/5/15, Eric

Re: [Fixed?] Re: James IMAP and Alfresco and refactoring

2010-05-15 Thread Eric Charles
trunk is now deployed and serving real traffic. Simply copied the derbydb directory in jame/var to migrate users and mails. openjpa2 migration from openjpa1 seems OK (no compatibility issue with the db defined via openjpa1). Will keep you updated on stability and eventual exceptions. Tks, Eric

Re: [Fixed?] Re: James IMAP and Alfresco and refactoring

2010-05-14 Thread Norman Maurer
Any new one this ? I would like to cut a milestone soon, so it would be cool to know if it work out... Bye, Norman 2010/5/7 Norman Maurer nor...@apache.org: Hi Eric, could you update to current trunk and see if it helps? We should now only use one session per thread. Feedback Welcome...

Re: James IMAP and Alfresco and refactoring

2010-05-07 Thread Robert Burrell Donkin
On Fri, May 7, 2010 at 5:58 AM, Norman Maurer norman.mau...@googlemail.com wrote: Hi Robert, to be honest I think it would make things just more complicated. I think we should just make sure we keep the jcr session / entitymanager etc open till we are done with processing the request. Nothing

Re: James IMAP and Alfresco and refactoring

2010-05-07 Thread Norman Maurer
Hi Robert, maybe I just don't get what you want todo.. How about some pseudo code ? I just committed some code to use only one EntityManager/JCR Session per request. Hopefully this will help with Alfresco. Bye, Norman 2010/5/7 Robert Burrell Donkin robertburrelldon...@gmail.com: On Fri, May

[Fixed?] Re: James IMAP and Alfresco and refactoring

2010-05-07 Thread Norman Maurer
Hi Eric, could you update to current trunk and see if it helps? We should now only use one session per thread. Feedback Welcome... Bye Norman 2010/5/7, Norman Maurer norman.mau...@googlemail.com: Hi Robert, maybe I just don't get what you want todo.. How about some pseudo code ? I just

Re: James IMAP and Alfresco and refactoring

2010-05-06 Thread Norman Maurer
Ok so my current toughts are: * Use one MailboxMapper/MessageMapper/SubscriptionMapper per request. Which in fact should share the same JCR Session / EntityManager etc. a request should be handled by a new thread so we would have a ThreaLocal like pattern. The instance should get stored in the

Re: James IMAP and Alfresco and refactoring

2010-05-06 Thread Tim-Christian Mundt
Hi, 05.05.2010, 21:55 +0100, Robert Burrell Donkin: I'd like to build on a relatively stable structure. use an internal API, then any changes can be bridged. a good commons-style Maildir library would be really useful generally and much easier to debug. so that's where i'd start. This

Re: James IMAP and Alfresco and refactoring

2010-05-06 Thread Eric I .
Tim-Christian Mundt dev at tim-erwin.de writes: Alfresco's JCR implementation only allows one session per thread. I think Alfresco stores the session stuff in a Thread Local variable (at least using web services), so there can be only one active session at a time per thread. However, what

Re: James IMAP and Alfresco and refactoring

2010-05-06 Thread Norman Maurer
Hi Eric, comments inside.. 2010/5/6 Eric I. e...@linuxbox.com: Tim-Christian Mundt dev at tim-erwin.de writes: Alfresco's JCR implementation only allows one session per thread. I think Alfresco stores the session stuff in a Thread Local variable (at least using web services), so there can

Re: James IMAP and Alfresco and refactoring

2010-05-06 Thread Robert Burrell Donkin
On Thu, May 6, 2010 at 4:28 PM, Tim-Christian Mundt d...@tim-erwin.de wrote: Hi, 05.05.2010, 21:55 +0100, Robert Burrell Donkin: I'd like to build on a relatively stable structure. use an internal API, then any changes can be bridged. a good commons-style Maildir library would be really

Re: James IMAP and Alfresco and refactoring

2010-05-06 Thread Robert Burrell Donkin
On Thu, May 6, 2010 at 9:17 PM, Norman Maurer norman.mau...@googlemail.com wrote: Hi Eric, comments inside.. 2010/5/6 Eric I. e...@linuxbox.com: Tim-Christian Mundt dev at tim-erwin.de writes: Alfresco's JCR implementation only allows one session per thread. I think Alfresco stores the

Re: James IMAP and Alfresco and refactoring

2010-05-06 Thread Norman Maurer
Hi Robert, to be honest I think it would make things just more complicated. I think we should just make sure we keep the jcr session / entitymanager etc open till we are done with processing the request. Nothing more... I don't see the advance of implement such a callback interface. Maybe you

Re: James IMAP and Alfresco and refactoring

2010-05-05 Thread Tim-Christian Mundt
Hi! Alfresco's JCR implementation only allows one session per thread. I think Alfresco stores the session stuff in a Thread Local variable (at least using web services), so there can be only one active session at a time per thread. However, what does prevent you from simply creating a new

Re: James IMAP and Alfresco and refactoring

2010-05-05 Thread Norman Maurer
Hi comments inline.. 2010/5/5 Tim-Christian Mundt d...@tim-erwin.de: Hi! Alfresco's JCR implementation only allows one session per thread. I think Alfresco stores the session stuff in a Thread Local variable (at least using web services), so there can be only one active session at a time

Re: James IMAP and Alfresco and refactoring

2010-05-05 Thread Robert Burrell Donkin
On Wed, May 5, 2010 at 12:52 PM, Norman Maurer norman.mau...@googlemail.com wrote: snip Would it be worth discussing where James IMAP is going in the near-term and whether we should coordinate. You are totally right. I'd be glad if we could find a good design for IMAP and implement it as

James IMAP and Alfresco and refactoring

2010-05-04 Thread Eric I.
I'm trying to provide an IMAP interface to email stored on an Alfresco repository using James IMAP and JCR as the bridge. The initial problem I ran into a couple weeks ago was that Alfresco's JCR implementation only allows one session per thread. James IMAP, however, creates new JCR sessions

Re: James IMAP and Alfresco and refactoring

2010-05-04 Thread Norman Maurer
Hi Eric, first of welcome :) To be honest the current JCR implementation in the imap source code is more a proof-of-concept then anything else. And thats my fault, my JCR knewledge is not really good ;) So I would be very happy to see how you would tackle it. Feedback and contributions are