[GeoNetwork-devel] How to get the database connection when stopping? [SEC=UNCLASSIFIED]

Zhuhua,

Good question. The start method has a ServiceContext parameter. You obtain a database connection via:

Dbms dbms = (Dbms) context.getResourceManager().open(Geonet.Res.MAIN_DB);

However, the stop method has no parameters. The question for the group is ‘should the Jeeves interface ApplicationHandler be modified so that stop includes the session context?’

What does the group think?

Steve

-----Original Message-----
From: geonetwork-devel-bounces@lists.sourceforge.net [mailto:geonetwork-devel-bounces@lists.sourceforge.net] On Behalf Of zhuhua zha
Sent: Wednesday, 2 July 2008 5:35
To: geonetwork-devel@lists.sourceforge.net
Subject: [GeoNetwork-devel] How to get the database connection when stopping?

hi all,

I want to save some data information into database, so i do it in the stop function, but how can i get the database connectioin Dbms ? Does jeeves open a interface or function to get the dbms?


雅虎邮箱,您的终生邮箱!