Thank you Armin. I add the close() method but it's still the same: my program is waiting for something.
In my repository.xml file there is a dbalias parameter named "SelectMethod=cursor". Do you know what is it and which option can we choose for it? Thank you Sylvain -----Message d'origine----- De: Armin Waibel [mailto:[EMAIL PROTECTED]] Date: mardi, 10. septembre 2002 09:28 �: OJB Users List Objet: Re: OJB.properties file needs change Every seems OK, but don't forget to close the PB instance after use. See below. Maybe this helps. regards, Armin public class OjbTestApplication { private PersistenceBroker broker; /** * Constructor for OjbTestApplication. */ public OjbTestApplication() { /** * Persistence Broker */ broker = null; try { broker=PersistenceBrokerFactory.createPersistenceBroker("repository.xml" ); ### is deprecated, better use PBF.defaultPersistenceBroker() or PBF.createPersistenceBroker(new PBKey("repository.xml")) } catch (Throwable t) { t.printStackTrace(); } } public void getAllApplications() { System.out.println("The list of all Applications:"); Query query = new QueryByCriteria(Application.class, null); try { Collection allApplications =broker.getCollectionByQuery(query); ### // close the PB to return the instance to pool // this also returns the connection to the pool broker.close(); java.util.Iterator iter = allApplications.iterator(); while (iter.hasNext()); { System.out.println(iter.next()); } } catch (Throwable t) { t.printStackTrace(); } } public static void main(String args[]) { System.out.println("OJB first test:"); OjbTestApplication test = new OjbTestApplication(); test.getAllApplications(); } } ----- Original Message ----- From: <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Tuesday, September 10, 2002 8:51 AM Subject: OJB.properties file needs change Hello, Using OJB PersistenceBroker, I have problem with my connection pool. My program start and waiting for something; I have to stop it manually after a moment. Here is my OJB.properties pool section: #------------------------------------ # PersistenceBrokerFactory pool #------------------------------------ maxActive=100 maxIdle=-1 maxWait=2000 timeBetweenEvictionRunsMillis=-1 minEvictableIdleTimeMillis=1000000 whenExhaustedAction=0 #------------------------------------- Is something needs to be changed?? Thank you Sylvain -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]> -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]> -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
