http://scn.sap.com/thread/1949433
Hi Eyal,
It depends whether you are using SAP Java Application Server or some other AS like Tomcat etc.
If you are using SAP JAVA AS then your destination settings are all done in NetWeaver otherwise you will need to connect with explicit java code.
Have a look at above SCN thread.
Thanks,
Arshid