Hi Luc,

From you previous posts, I understand that you access mailbox with a reduced spring context (around 5 beans).
You say that it is very slow and does not refresh automatically.
Can you give more information : in which way is it slow (insert, read, ...), what do you mean with "refresh" (james is loaded with ClassPathXmlApplicationContext(String... configLocations), not with ClassPathXmlApplicationContext(String[] configLocations, boolean refresh), is this what you mean?)

If you want to retrieve an instance of the james instanciated mailboxmanager, you need to act in the "james spring context", meaning that you must access the SpringContext created by the james main. Of well, you embed james in your app, of well your app is embedded in james. The keypoint is that you need a common spring context: this can be achieved with separate xml spring files that you load at the same time with ClassPathXmlApplicationContext(String[] configLocations, boolean refresh).

Tks,
- Eric


On 2/02/2011 12:14, Luc Saulière wrote:
Hello,
I'm trying to build an application based on James DB acces (jdbc mysql).
I've dev a solution (thank's to james dev mailing list:) with a
MailboxManager instance. But it is very slow and it does not refresh
automaticaly...
I was thinking that maybe I could inject directly a living instance of
MailboxManager (instancied by James itself) into my own independent app
(like a tomcat serv app).
Is this possible?

Thx,
Luc.



Response to Norman's answer dated of 2011/1/19 :

Sure there is.. But to be honest I would not do this as you will
always need to look out for db changes etc. So I think the prefered
way would be to inject an instance of MailboxManager in your custom
app and store the mails via it. Or is this not possible ?
Bye,
Norman



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to