One very simple advantage is that it acts as a placeholder for your connection details. When the composite is deployed to the WLS server, this JNDI (the same name is specified in the composite) is used to point to the correct DB, FTP etc from WLS. You can change it directly in the WLS without needing to modify the code and hence additionally this provides a centralized way of managing the resources.