[prev in list] [next in list] [prev in thread] [next in thread] 

List:       james-user
Subject:    Re: OSGI app/mailet integration question
From:       Eric Charles <eric () apache ! org>
Date:       2012-12-01 7:00:02
Message-ID: 50B9AAF2.5010608 () apache ! org
[Download RAW message or body]

On 30/11/2012 19:23, nate.morrow@conceptaware.com wrote:
> Basically, we're doing some early research into being an email provider for our \
> application users.  So there are a couple of things I'm trying to figure out: 
> 1.  How do I tie together James authentication and our application authentication \
> so I don't have to manage two user sets? 

Just implement your own UserRepository [1] (use JPAUsersRepository [2] 
as an example) and register your implementation in userrepository.conf [3].

We have already tested some small components such the DNS service 
(james-server-dnsservice-dnsjava) in an OSGI container, but for the 
complete James, see Ioan's answers.


[1] 
https://svn.apache.org/repos/asf/james/server/trunk/data-api/src/main/java/org/apache/james/user/api/UsersRepository.java


[2] 
https://svn.apache.org/repos/asf/james/server/trunk/data-jpa/src/main/java/org/apache/james/user/jpa/JPAUsersRepository.java


[3] 
https://svn.apache.org/repos/asf/james/server/trunk/data-api/src/main/resources/usersrepository.conf


> 2.  How do I hook a mailet into our application for things like email \
> notifications?  I was hoping that the mailet could use our existing OSGi services, \
> but we may be able to get around it some other way -- like sockets or maybe polling \
> from the application instead of pushing from the mail server. 

Yes, you need to develop mailet for your application to be notified.
For now, James can not be run in OSGI, so you mailet will need to be 
injected with a way to communicate with your OSGI application. If there 
is no way to do this in plain JAVA, you will need indeed to communicate 
via socket I guess (mailet being the socket client).

> It would be nice to run in Karaf, but I think a lot of my problems can be solved \
> just by getting a better understanding for how James works.  And I'd definitely be \
> interested in helping, but I'm not sure how much time I can give.  What do you \
> mostly need help with? 

You're welcome. Questions are already contributions.
> )

> 
> -----Original Message-----
> From: "Ioan Eugen Stan" <stan.ieugen@gmail.com>
> Sent: Friday, November 30, 2012 1:17pm
> To: "James Users List" <server-user@james.apache.org>
> Subject: Re: OSGI app/mailet integration question
> 
> Hello Nate,
> 
> There has been some work done on James towards moving it to OSGi. I'm
> working on making James run inside Karaf[1] but it's very early work,
> not all components/dependencies are OSGi ready yet. It will take some
> time.
> 
> I'm not sure I fully understand what you are trying to achieve. Are
> you going for a full James-Karaf integration or run James as a
> separate service and integrate over sockets? I think integrating over
> sockets would be faster right now (I'm new to OSGi).
> 
> I could use a helping hand in moving James-Karaf forward and I think
> it would benefit you too. I know James structure and could use help
> with OSGi. Care to help?
> 
> [1] https://github.com/ieugen/james-karaf
> 
> On Fri, Nov 30, 2012 at 7:45 PM,  <nate.morrow@conceptaware.com> wrote:
> > Hey all,
> > 
> > I'm developing an OSGI-based application where we'd like to tie in mail \
> > sending/receiving for our app users.  Ultimately, I'd like to have a mailet that \
> > has access to to the OSGI services on our Karaf instance, but I'm not sure how to \
> > go about it.  Also, we're going to need some way to keep users and domains \
> > synchronized between our app and James.  Should I try to extend and run James as \
> > an OSGI service or is there a simpler way to tie things together? 
> > Thanks!
> > 
> > Nate Morrow
> > Concept Aware, Inc.
> > 
> > 
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: server-user-unsubscribe@james.apache.org
> > For additional commands, e-mail: server-user-help@james.apache.org
> > 
> 
> 
> 

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


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic