Changeset 667 for extensions/net.sf.basedb.examples
- Timestamp:
- Apr 18, 2008, 2:09:41 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/net.sf.basedb.examples/trunk/src/net/sf/basedb/examples/extensions/HelloUserFactory.java
r642 r667 51 51 private String getUserName(ClientContext context) 52 52 { 53 DbControl dc = null; 54 try 55 { 56 SessionControl sc = context.getSessionControl(); 57 dc = sc.newDbControl(); 58 User current = User.getById(dc, sc.getLoggedInUserId()); 59 return current.getName(); 60 } 61 finally 62 { 63 if (dc != null) dc.close(); 64 } 53 SessionControl sc = context.getSessionControl(); 54 DbControl dc = context.getDbControl(); 55 User current = User.getById(dc, sc.getLoggedInUserId()); 56 return current.getName(); 65 57 } 66 58
Note: See TracChangeset
for help on using the changeset viewer.