We live in 2009 not 2000 and before that, do not downgrade your projects while there are lots of modern and enterprise techs, patterns and tools.
Business Processing techs such as BPEL and BPM engines, JBI, ESB, mule, an implementation of JCA
en....pedia.org/.../Java_EE_Connector_Architecture
This is not the time of using sockets while there are lots of Network programming architecture, language, patterns and tools.
Try EJB, WebServices, JMS ans so on.
You can find lots of distributed transaction handling solutions there.