4.2 – Plug-in
The gateway is a multi-thread application, so make sure your plug-in is:
- Thread safe.
- Spawn a thread if the operation takes more than 5 seconds, otherwise, it could cause a network timeout exception and block the gateway.
- Use Collections.synchronizedList(),Collections.synchronizedMap, ConcurrentHashMap etc.
- Avoid anonymous class which could cause memory leak.
- Make your plug-in stateless if possible.
- Logging could be a bottle neck sometimes.