Question on Threads and Jigsaw

Sofus Attila Macskassy writes:
 > 
 > Hi,
 > I have a question about starting my own thread within Jigsaw.
 > I've looked through the documentation and the code to figure
 > out how to do it without hacking your code, but so far I've
 > been unsuccessful.

The current version of Jigsaw would support this only through one
mean: write your own main method, that would call the http main method
(you wouild embed Jigsaw into your app). 

Futur releases of Jigsaw may include an API for doing this sort of
thing.

Another way (more Jigsaw related) would be to write a ThreadResource,
that would spawn it won thread of control upon being initialized.

 > What I want to do is have a separate thread running in the
 > background, which is callable through a realm.  (The thread
 > will be an agent of some sort).
 > Ideally, the agent code could just be copied, and the admin
 > could tell the jigsaw server, through properties or the admin
 > realm, to start up the agent as a separate thread.
 > Is this doable?  Also, on a related note, I'd like this agent
 > code to e mobile, such that I could send it to another server
 > and have it run in the background dynamically.  How would this
 > be done with a Jigsaw server?  Again, I'd prefer to not have to
 > touch the jigsaw server code at all (so that it will work with
 > future releases).  If this has been discussed on a mailing list
 > or in the documentation, I'd be more than happy to just get a 
 > reference to where.  Otherwise, do you have any input on how
 > I might go about doing this?

Use resources, you will get serialization for free, just create a
ThreadedResource, use picl/unpickle to write the resource to a socket,
and...you're done !

Anselm.

Received on Tuesday, 30 July 1996 18:14:13 UTC