multiple CORBA servers on one machine
This isn't really a LispWorks question, but it is about something
implemented in LW...
I have a little server I wrote which allows a lisp application to
handle requests from a client via CORBA. All it really does is passes
arrays of strings around with a single call, which it then treats as
command lines - it should really have been written on top of plain
sockets, not CORBA. The server writes its IOR into a secret file in
the user's home directory, which the client then uses for getting in
touch with it.
I never intended this thing to actually get used, but in the nature of
things it's become central to our existence because it allows shell
scripts and makefiles to get Lisp to do things completely trivially.
The problem is that there doesn't seem to be a way for multiple
servers to coexist on one machine - so on our Linux `build server'
machine you can't have two people doing things at once. This seems to
be because the servers try and open the same port at some sub-CORBA
level. I presume (or hope, anyway) that CORBA has some answer to this
kind of issue, but my knowledge of CORBA is tiny: does anyone know
what how to do this so I can be lazy and not read huge manuals
(pointers to the manual section would be OK - we have the CORBA
specs...)?
Thanks
--tim
PS the way we start the server now is this:
(defun start-clc-server (&key (threads 1)
(wrapper nil))
;; See above for WRAPPER
(unless (= threads 1)
(error "No multithreaded support yet"))
(let* ((ior-file (ior-file-name))
(orb (ensure-orb)) ;calls op:orb_init if need be
(poa (op:resolve_initial_references orb "RootPOA"))
(manager (op:the_poamanager poa))
(ob (op:narrow
'org.tfeb.corba-modules/clc:server
(op:servant_to_reference
poa
(make-instance 'clc-servant
:wrapper wrapper))))
(ior (op:object_to_string orb ob)))
(op:activate manager)
(with-open-file (out ior-file
:direction :output
:if-exists :supersede)
(format out "~A~%" ior))
(values ob manager)))