ProcessOne SiteCustomer Helpdesk and FeedbackFollow us on Twitter
 
   
 
Connect to hosted.im account from java/smack
Posted: 08 March 2014 08:01 PM   [ Ignore ]
Newbie
Rank
Total Posts:  2
Joined  2014-03-08

I would like to send messages from a java server so I set up an account on hosted.im configured to use DNS SRV records at jackbot.net (this is on Amazon AWS). I’m able to send messages from this account using Adium. But I’m not sure how to set up the connection. I have a connection working for talker.im like this:

ConnectionConfiguration connConfig = new ConnectionConfiguration(“conference.talkr.im”, 5222, “talker.im”);

but what do I use for the 1st and 3rd parameters? “hosted.im” or “jackbot.net”. If “jackbot.net” do I need my c-name records set up too? (we aren’t “live” yet).

Profile
 
 
Posted: 11 March 2014 03:41 PM   [ Ignore ]   [ # 1 ]
Member
Avatar
RankRankRank
Total Posts:  63
Joined  2010-06-29

Hello,

according to the javadoc of ConnectionConfiguration, the method you are using is currently overriding the SRV values set on your DNS. In other words, if your DNS for “jackbot.net” is properly configured, then this constructor should be enough:

ConnectionConfiguration connConfig = new ConnectionConfiguration("jackbot.net"); 

Why? Because SRV records for “jackbot.net” already specify the port and server to which you need to connect.

Regards

Profile
 
 
Posted: 12 March 2014 02:16 AM   [ Ignore ]   [ # 2 ]
Newbie
Rank
Total Posts:  2
Joined  2014-03-08

ah, that was too easy. Should have RTFM. In trying to set up a generic service, I was using the same (3 parm) constructor for all of them. Just needed to switch to what you show and it worked.

Thanks!

Profile
 
 
   
 
 
‹‹ Downtime?