I’m working on an applet uploaded to an ftp server. That applet should connect to a MySQL database (Which should be on the same server as far as I know).
Note: The applet is self signed.
- If I’m running the applet locally it works fine.
- If I launch the applet locally from a web browser it also works perfectly.
- But when I upload it to the ftp server and launch it from it’s website, it freezes at line 4 (The DriverManager.getConnection() method)
.
public static void initConnection(final Settings info) throws ClassNotFoundException, SQLException
{
Class.forName("com.mysql.jdbc.Driver");
Connection conn = DriverManager.getConnection("jdbc:mysql://" + info.getHost() + ":3306/" + info.getDbName(),
info.getUser(), info.getPass());
stmt = conn.createStatement();
}
It seems I have answered this myself. The problem was that from trying to connect to the database, to have a full working connection took about 3 minutes or so. Technically this question was void all along. I’ll see if I can find out why it’s so slow and ask another question if I can’t find it.
So once again, it had nothing to do with policies or permissions. Just being slow as hell for some reason.