ITeye博客

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

markhe · 2012-04-23 14:46 · 数据库 · Markdown

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);
	session.addToLogicalDatabase(HPC_DEMO_NETWORK_NAME, helper.databaseName);
	System.out.println("Add to logical database:" + helper.databaseName);

评论(0)

暂无评论。

评论功能维护中,当前仅展示历史评论。