Clustering is independent of EJB's.
Can u tell me the excat way to do that type of clustering & tell me the second thing in case of socket programing clustering is possible or not.
Here's the doc for clustering.
The JBoss clustering wiki also has useful information.
Not sure what your second question is. JBoss itself uses JGroups for cluster node communication; this is usually multicast based. You can also use JGroups independently of JBossAS if what you need is a low level cluster communications module.