I have some confusions with Google App which I hope by getting some comments from you regarding to the question I put here, will be eliminated.

I used a tutorial from:
Episode 2 : GAEJ + XMPP and rolling your own Agent Google App Engine Java Experiments
and built a simple echo-chat-bot as explained there, and deployed to my Google App account. Then I tested it with my Google Talk, and it worked as expected.

Next, I used another tutorial code to connect to Google Talk first just to be sure I learned to connect to:
Java Code:
import org.jivesoftware.smack.ConnectionConfiguration;
import org.jivesoftware.smack.XMPPConnection;
import org.jivesoftware.smack.XMPPException;

public class ChangeStatusMsg {

public void changeStatus() throws XMPPException {

    ConnectionConfiguration connConfig = new ConnectionConfiguration(
        "talk.google.com", 5222, "gmail.com");
        XMPPConnection connection = new XMPPConnection(connConfig);
            System.out.println("connection ID: " + connection.getConnectionID());
            System.out.println("NOT Conected!");
    public static void main(String[] args) throws XMPPException {
        ChangeStatusMsg changeStatusMsg = new ChangeStatusMsg();
This code also worked. I got "Connected!", and a "connection ID: B8E524DA1A107B2E".

Next I change the connection data with my echo-chat-bot to test the connection with the bot:
Java Code:
    ConnectionConfiguration connConfig = new ConnectionConfiguration("apps.google.com", 5222, "mybot"); //suppose my 
bot is installed on: mybot.appspot.com
This fails :-(

What is the right way to express the connection, if this is possible at all please?