On 1/10/07, Symeon Breen <[EMAIL PROTECTED]> wrote:
Host your class on a server and use the u2 soap api - or the u2 http api to
"call" the webservice methods required.

This is pretty much what we do.  We already use Tomcat for some other
stuff so I have wrapped a very simple servlet around the classes and
deploy them to tomcat and then use the u2 http api to call them.

This way you avoid the startup/shutdown overhead of starting the jvm
every time you want to run the routine.  You can also do stuff like
put the call URLs in a control panel in your u2 app so it is easy to
fail from one server to another.

A word of caution though.  Running your classes through Tomcat or
similar imposes some design constraints that don't matter if you are
running the class by starting the jvm each time.  There are a number
of these but they aren't hard to work around.  Mostly it boils down to
being careful with anything declared static (threadlocals help here)
and instance variables in your servlets.  I don't have a reference to
hand but you should be able to google  it.

HTH
Adrian
-------
u2-users mailing list
[email protected]
To unsubscribe please visit http://listserver.u2ug.org/

Reply via email to