Technical FAQ: Questions about WebLogic Events
FAQ Index
Should every thread I'm using make a client connection to WebLogic?
I'm writing an applet to talk to a server-side process. In the applet,
I set up a client-side listener, a thread with an
action() method. In the constructor, I pass the
T3Client object to use when needed for event registration, etc. The
applet waits on an event send, and then executes its action. Is this
a good way to do this? Or should every thread make a client connection
to the WebLogic Server?
With WebLogic Events
,
you do not need separate threads to listen for events. All that is
handled transparently by WebLogic.
Just write your applet
to implement the ActionDef interface, which you will specify as the Action
class, and then provide the action() method.
When
an EventMessage reaches the topic tree, the action() method in your class is
called automatically in a separate thread, on the client or the
server, depending on how you have set it up.
