公开SNS社区即时找朋友链的源代码和部署方案(续三)

Versant数据库可以很容易的建立和数据库之间的连接:

 

Iterator<DatabaseLoginHelper> ite = this.dblist.iterator();

 

DatabaseLoginHelper helper = (DatabaseLoginHelper)ite.next();

session = new TransSession(helper.getDatabaseNodeProperty());

session.setSchemaOption(TransSession.SCHEMA_ADD_DROP_ATTRIBUTES);

 

// System.out.println("Define Logical database:");

session.newLogicalDatabase(HPC_DEMO_NETWORK_NAME);

 

// System.out.println("Add to logical database:"+dbList[0]);

session.addToLogicalDatabase(HPC_DEMO_NETWORK_NAME, helper.databaseName);

System.out.println("Add to logical database:" + helper.databaseName);

posted on 2012-04-23 14:01  mark.he  阅读(102)  评论(0编辑  收藏  举报

导航