KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > codewiz > DataSourceInfo


1 package codewiz;
2
3 import dinamica.GenericTransaction;
4 import dinamica.Recordset;
5
6 /**
7  * DataSourceInfo<br>
8  * Stores default datasource name as a session attribute
9  * <br><br>
10  * Creation date: 24/09/2004<br>
11  * http://www.martincordova.com<br>
12  * @author mcordova - dinamica@martincordova.com
13  */

14 public class DataSourceInfo extends GenericTransaction
15 {
16
17     /* (non-Javadoc)
18      * @see dinamica.GenericTransaction#service(dinamica.Recordset)
19      */

20     public int service(Recordset inputs) throws Throwable JavaDoc
21     {
22         super.service(inputs);
23         
24         String JavaDoc dsName = (String JavaDoc)getSession().getAttribute("dinamica.datasource");
25         if (dsName==null)
26             getSession().setAttribute("dinamica.datasource", getContext().getInitParameter("def-datasource"));
27         
28         return 0;
29     }
30
31 }
32
Popular Tags