How to track Inbound Outbound connections to PID?

I have a Application Server process that hosts my application web & EJB and JMS and Database connectios etc.

Using the PID what is the best way to find out the Inbound connection sockets i.e those parties that connect to my server process on different ports numbers and Outbound connection sockets i.e. those parties that my server connects to like Databases JMS or third party applications.

Need this for Linux and Unix both.

Can someone help ?

lsof, or fuser. Both are third-party utilities.

Did you consider netstat -tp ?