[JDEV] Want to run local JUD

Dennis Noordsij dennis.noordsij at wiral.com
Thu Nov 30 13:32:12 CST 2000


I do not remember exactly where (possibly the CVS) but there is sample code 
out there for a JUD, it uses an xml file however, no database backend. It 
also doesn't automatically allow people to search for existing users; users 
have to specifically register with this JUD for their information to show up. 
It works nicely though.

To make it work with jabber 1.2 do the following

Go to file main.c
Approximately line 74 : jud__etherx = ehandler_new(jud.... etc

Change that line to:

jud__etherx = ehandler_new_ex(jud_etherx, name, "jabber:component:accept", 
1234)

(I don't know how my email mangles that, but it is all on one line, the 
function name changes to ehandler_new_ex, the jabber:server changes to 
jabber:component:accept and an extra parameter is added which is the port 
number you decide to use from now on. In this example I will assume you 
picked 1234.

compile and prey you are not missing any symbols anywhere :)


In jabber.xml, BEFORE the big <service id="sessions"> ...

<service id="jud.mydomain">
 <accept>
  <ip>127.0.0.1</ip>
  <port>1234</port>
  <secret>anything</secret>
 </accept>
</service>

In your /etc/hosts

127.0.0.1 localhost jud.mydomain

(ie, "mydomain" has to exist in DNS, but jud.mydomain can be 127.0.0.1)

Then, in the agents section in jabber.xml

<agent jid="jud.mydomain">
 <name>jud.mydomain</name>
 <description>My First Userdirectory</description>
 <service>jud.mydomain</service>
 <register/>
   <!-- this tag meant that users can register with this agent -->
 <search/>
   <!-- this tag meant this agent is searchable -->
</agent>

You then start jud as follows:

/pathto/jud -e jud.mydomain -s anything jud.mydomain /path/to/a/database.xml
(just have an empty file the first time you run it)


In your agents list will now be jud.mydomain. Register with it, then search 
for your own info.

Worked for me, but ymmv :-))  (in jabber 1.2 -> btw, 

Goodluck,
Dennis



> > How would one run one's own JUD?  I didn't see any complete info on this 
in
> the JDEV archives.
>
> CVS has some of the code to do this with the Jabber 1.0 server, but no news
> for the 1.2 server (that I could find).  The 1.0 code uses etherx
> (therefore no good for 1.2, correct?) and has no info on how to change the
> jabber.xml file to send JUD requests to a server other than
> users.jabber.org.
>
> Jer wrote the 1.0 stuff (according to file comments), I guess he's working
> on it for 1.2/1.4?
>
> Any info would be appreciated, even if it's just how to configure the
> jabber.xml file to send the requests to a specified service/server.  Any
> attempts to edit  the line <agent jid="users.jabber.org"> cause jabberd not
> to load.
>
> Colin

----------------------------------------
Content-Type: text/html; charset="iso-8859-1"; name="Attachment: 1"
Content-Transfer-Encoding: quoted-printable
Content-Description: 
----------------------------------------




More information about the JDev mailing list