[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[aspectj-users] AspectJ and Dao class

Hello, In a JDBC DAO implementatin class, we usually see the following pattern: ... private DataSource ds; public aMethod(){ Connection cx = null; try{ cx = ds.getConnection(); ... }catch(Exception e){ ... }finally{ if(cx!=null){ try{ cx.close(); }catch(){ } } ... } it is tiring to code the same thing in all DAO methods. I am looking for a sample code showing how to use AspectJ to handle this. Thanks! Franck

View this message in context: AspectJ and Dao class
Sent from the AspectJ - users mailing list archive at Nabble.com.