Transaction tx=session.beginTransaction(); String sqlQuery="from ICaptureDbEO as master where master.FORM_ID='LTR19'";//"+formID+"'";
Connection conntn=session.connection(); System.out.println("THIS IS THE CONNECTION OBJECT: "+conntn); System.out.println("B4 THE QUERY"); Query query=session.createQuery(sqlQuery); System.out.println("AFTER THE QUERY"+query);
for(Iterator it=query.iterate();it.hasNext() { System.out.println("inside the iterator"); row=(ICaptureDbEO)it.next(); System.out.println("recid"+row.getREC_ID()); System.out.println("formid:"+row.getFORM_ID()); System.out.println("form descrition:"+row.getFORM_DESCRIPTION()); System.out.println("dyas to complete:"+row.getDAYS_TO_COMPLETE_WORK()); System.out.println("incoming:"+row.getINCOMING()); }
classpath as in, you have a directory with source code in it for your model. so I have
c:\myproject\app\src\org\jboss\model\
in the classpath being set to c:\myproject\app\src, so that is the directory you would put your config file. Then you don't put a specific path to get to the config file, it is in your classpath.