You are viewing a plain text version of this content. The canonical link for it is here.
Posted to server-user@james.apache.org by Ron Jeremy <ro...@hotmail.com> on 2010/11/15 22:11:06 UTC

JDBCSpoolRepository in James 3.0?

I am having a shot at migrating from James 2 to James 3.
 
In james 2, I have everything configured to run from the database, which allows my application to send mail via SQL INSERT statements (INSERT INTO mail.spool...) specifying 'outgoing' for repository_name, as opposed to having to connect to port 25 and send messages one-by-one.
 
In configuring James 3, I can't figure out how to get it to recognize when I have inserted messages for outgoing delivery.  There do not seem to be any threads checking mail.spool for messages that need to be sent.  I believe this was handled in James to via JDBCSpoolRepository.  Is there a different way in James 3 to be able to send mail via database records? 		 	   		  

Re: JDBCSpoolRepository in James 3.0?

Posted by Eric Charles <er...@apache.org>.
Hi,

James 3 uses activemq (jms) to spool mails.
The 2.3 jdbc spool is no more implemented as such.

To have similar functionality , there are 2 options:

1. Inject mailQueuFactory in your class (see 
https://svn.apache.org/repos/asf/james/server/trunk/smtpserver/src/main/java/org/apache/james/smtpserver/SendMailHandler.java)

2. Implement a custom activemq message persistence 
(http://activemq.apache.org/jdbc-support.html).

The first option should be easier (create a Mail object in inject in the 
queue, you need spring context loaded).
The second option is much harder and should probably be the subject of a 
common development within James.

Tks,

Eric

On 15/11/2010 22:11, Ron Jeremy wrote:
> I am having a shot at migrating from James 2 to James 3.
>
> In james 2, I have everything configured to run from the database, which allows my application to send mail via SQL INSERT statements (INSERT INTO mail.spool...) specifying 'outgoing' for repository_name, as opposed to having to connect to port 25 and send messages one-by-one.
>
> In configuring James 3, I can't figure out how to get it to recognize when I have inserted messages for outgoing delivery.  There do not seem to be any threads checking mail.spool for messages that need to be sent.  I believe this was handled in James to via JDBCSpoolRepository.  Is there a different way in James 3 to be able to send mail via database records? 		 	   		


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