I have a socketserver to recevie datagram,and than invoke ejb to process.
should I init a context each time when I recevie a datagram?
or lookup a ejb class and keep it(after several invoking it catch no EJB recevie)?
or invoke a useless method to make sure the conn is fine before process?
is there any suggestion?
when init context,when lookup
Creating a new connection every time sounds a bit excessive. Use it while it works, for failures, do a couple of reconnect-tries and then fail as gracefully as possible.
Retrieving data ...