01: package com.jat.core.test;
02:
03: import java.util.Enumeration;
04:
05: import com.jat.business.BusinessObjectFactoryImpl;
06: import com.jat.business.BusinessObjectList;
07: import com.jat.core.Project;
08:
09: /**
10: * <p>Title: JAT</p>
11: * <p>Description: </p>
12: * <p>Copyright: Copyright (c) 2004 -2005 Stefano Fratini (stefano.fratini@gmail.com)</p>
13: * <p>Distributed under the terms of the GNU Lesser General Public License, v2.1 or later</p>
14: * @author stf
15: * @version 1.1
16: */
17:
18: public class ProjectTest {
19: public ProjectTest() throws Exception {
20: Project.create("C://Project/JAT/config/general.config");
21: }
22:
23: public void readObject(String source, String query)
24: throws Exception {
25: BusinessObjectList bol = (new BusinessObjectFactoryImpl())
26: .getBusinessObjectList(source, query);
27: for (Enumeration e = bol.elements(); e.hasMoreElements();) {
28: System.out.println(e.nextElement().toString());
29: }
30: }
31:
32: public static void main(String[] args) {
33: try {
34: ProjectTest prj = new ProjectTest();
35:
36: //prj.readObject("DUMMY", "test");
37:
38: //prj.readObject("jdbc_data_source", "account");
39:
40: //prj.readObject("mp3_data_source", "list");
41:
42: com.jat.integration.db.connectionpool.ConnectionPoolStressTester
43: .startStressTester("mp3_data_source", 500, 1000);
44:
45: } catch (Exception ex) {
46: ex.printStackTrace();
47: }
48: }
49:
50: }
|