    private C2DMConfig getDataMessagingConfig(PersistenceManager pm) {
        Key key = KeyFactory.createKey(C2DMConfig.class.getSimpleName(), 1);
        C2DMConfig dmConfig = null;
        try {
            dmConfig = pm.getObjectById(C2DMConfig.class, key);
        } catch (JDOObjectNotFoundException e) {
            dmConfig = new C2DMConfig();
            dmConfig.setKey(key);
            try {
                InputStream is = this.getClass().getClassLoader().getResourceAsStream("/dataMessagingToken.txt");
                if (is != null) {
                    BufferedReader reader = new BufferedReader(new InputStreamReader(is));
                    String token = reader.readLine();
                    dmConfig.setAuthToken(token);
                }
            } catch (Throwable t) {
                log.log(Level.SEVERE, 
                        "Can't load initial token, use admin console", t);
            }
            pm.makePersistent(dmConfig);
        }
        return dmConfig;
    }

    private C2DMConfig getDataMessagingConfig(PersistenceManager pm) {
        Key key = KeyFactory.createKey(C2DMConfig.class.getSimpleName(), 1);
        C2DMConfig dmConfig = null;
        try {
            dmConfig = pm.getObjectById(C2DMConfig.class, key);
        } catch (JDOObjectNotFoundException e) {
            dmConfig = new C2DMConfig();
            dmConfig.setKey(key);
            try {
                InputStream is = this.getClass().getClassLoader().getResourceAsStream("dataMessagingToken.txt");
                if (is != null) {
                    BufferedReader reader = new BufferedReader(new InputStreamReader(is));
                    String token = reader.readLine();
                    dmConfig.setAuthToken(token);
                }
            } catch (Throwable t) {
                log.log(Level.SEVERE, 
                        "Can't load initial token, use admin console", t);
            }
            pm.makePersistent(dmConfig);
        }
        return dmConfig;
    }
