Code: Select all
public void handleServerEvent(ISFSEvent event) throws SFSException {
User theUser = (User) event.getParameter(SFSEventParam.USER);
try {
Connection conn = getParentExtension().getParentZone().getDBManager().getConnection();
PreparedStatement sql = conn.prepareStatement("SELECT 1");
ResultSet result = sql.executeQuery();
conn.close();
} catch (Exception e) {
trace("Exception: " + e);
}
// The name UserVariable is a regular UserVariable
UserVariable name = new SFSUserVariable("name", theUser.getProperty(AppZone.PLAYER_NAME));
// Set the variables
List<UserVariable> vars = Arrays.asList(name);
getApi().setUserVariables(theUser, vars);
}
}
On the client side, "name" will be null. If I remove the try/catch portion of the code, name is no longer null in the client callback. The SQL executes appropriately, though. Anyone have an idea?