1 22 23 24 package com.mchange.v2.c3p0.test; 25 26 import javax.naming.*; 27 import com.mchange.v2.naming.*; 28 import com.mchange.v2.c3p0.*; 29 import com.mchange.v2.c3p0.impl.*; 30 31 public final class JavaBeanRefTest 32 { 33 public static void main(String [] argv) 34 { 35 try 36 { 37 ComboPooledDataSource cpds = new ComboPooledDataSource(); 38 Reference ref = cpds.getReference(); 39 ComboPooledDataSource cpdsJBOF = (ComboPooledDataSource) (new JavaBeanObjectFactory()).getObjectInstance( ref, null, null, null ); 40 ComboPooledDataSource cpdsCJBOF = (ComboPooledDataSource) (new C3P0JavaBeanObjectFactory()).getObjectInstance( ref, null, null, null ); 41 System.err.println( "cpds: " + cpds ); 42 System.err.println( "cpdsJBOF: " + cpdsJBOF ); 43 System.err.println( "cpdsCJBOF: " + cpdsCJBOF ); 44 } 45 catch (Exception e) 46 { e.printStackTrace(); } 47 } 48 49 private JavaBeanRefTest() 50 {} 51 } | Popular Tags |