The is alread a basic Mbean method to add a user.  I think that the mx4j RMI 
adaptor is disabled by default so you would need to enable this first.

Steve 

-----Original Message-----
From: Jason Webb [mailto:[EMAIL PROTECTED] 
Sent: Thursday, April 14, 2005 3:39 AM
To: 'James Users List'
Subject: RE: Using the API to Dynamically Add Users

If you're willing to get your hands dirty in the code there is an RMI proposal.
I have no idea what state it's in, but it would be cleaner than telnet/screen 
scraping.

-- Jason

> -----Original Message-----
> From: Daniel Perry [mailto:[EMAIL PROTECTED]
> Sent: 14 April 2005 10:44
> To: James Users List; [EMAIL PROTECTED]
> Subject: RE: Using the API to Dynamically Add Users
> 
> That would work.
> 
> Though if you are using database user repositories (others can be file 
> or
> db) it is easier to just do it directly.
> 
> Daniel.
> 
> > -----Original Message-----
> > From: Davide Dalla Rosa [mailto:[EMAIL PROTECTED]
> > Sent: 14 April 2005 10:41
> > To: 'James Users List'
> > Subject: R: Using the API to Dynamically Add Users
> >
> >
> > I think a simple solution could be...
> > write a simple appl that performs a socket connection w/ the remote 
> > manager, gets the input stream, feeds the latter with the siutable 
> > command ("adduser username password") get the output stream, reads 
> > from it the answer then close the
> connection.
> > I suppose this should work whatever the persistence mechanics is...
> > and you can do it whatever your programming language is.
> > Am I that wrong?
> > cheers
> > d.
> >
> > -----Messaggio originale-----
> > Da: Daniel Perry [mailto:[EMAIL PROTECTED]
> > Inviato: gioved� 14 aprile 2005 11.27
> > A: James Users List
> > Oggetto: RE: Using the API to Dynamically Add Users
> >
> >
> > Are you planning on doing this inside of james? (ie in a mailet) or 
> > outside of james (eg webapp)?
> >
> > >From a mailet you can work directly with user repositories.  See
> > commandlistservmanager for an example - it adds users in subscribe-
> confirm
> > command.
> >
> > >From outside of james, if you use a database, you can add
> > entries directly
> > (ie using jdbc / any database connectivity provided by other languages).
> >
> > Not sure how easy it is to work with file repositories from outside 
> > of james.
> >
> > Daniel.
> >
> >
> > > -----Original Message-----
> > > From: Don Kim [mailto:[EMAIL PROTECTED]
> > > Sent: 12 April 2005 17:31
> > > To: [email protected]
> > > Subject: Using the API to Dynamically Add Users
> > >
> > >
> > > Hi all,
> > >
> > > I was looking for some help with user creation in James.  I have 
> > > read the documention that explains how to manage users via the 
> > > James admin, however, we would like to be able to add users 
> > > programmatically.  Looking at the API, I'm going to assume that I 
> > > should primarily be concerned with the 
> > > org.apache.james.userrepository package, but I have a few questions:
> > >
> > > 1) Does anyone know of a "starting point?"
> > >
> > > Right now, I am struggling with basics, such as how do I initiate 
> > > a connection to the server to even start trying to make 
> > > modifictions?  I guess a parallel to this would be that if I were 
> > > trying to connect to a DB, I'd be setting up all of the JDBC info.  
> > > Would I be doing this in the configure() method of one of the user 
> > > repositories?  Or should I be looking elsewhere?
> > >
> > >
> > > 2) Does it matter if I'm using the file system or DB storage methods?
> > >
> > > I contacted someone from a James mailing list to ask some basic 
> > > question (that person had originally been asking if anyone knew of 
> > > any additional doc/training info/examples).  Anyway, this person 
> > > stated that if I wanted to add users programmatically, that I 
> > > should go with DB storage.  Can anyone comment on this?  I see 
> > > that in the UsersFileRepository class, there is an addUser() 
> > > method, so I'd assume it didn't matter.
> > >
> > >
> > > Any help or pointers would be greatly appreciated.
> > >
> > >
> > > Thanks,
> > > Don Kim
> > >
> > > DISCLAIMER:
> > >   The information contained in this e-mail may be confidential and 
> > > is intended solely for the use of the named addressee.
> > > Access, copying or re-use of the e-mail or any information 
> > > contained herein by any other person is not authorized. If you are 
> > > not the intended recipient please notify us immediately by 
> > > returning the e-mail to the originator.
> > >
> > >
> > > ------------------------------------------------------------------
> > > --- To unsubscribe, e-mail: 
> > > [EMAIL PROTECTED]
> > > For additional commands, e-mail: [EMAIL PROTECTED]
> > >
> > >
> >
> >
> > --------------------------------------------------------------------
> > - To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
> > --------------------------------------------------------------------
> > - To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to