Re: no database channel?
Stefan Apelt <[email protected]>
| Newsgroups | gmane.comp.web.webobjects.eof |
|---|---|
| Message-ID | <[email protected]> |
Hi Jonathan, your mail from 09.10.2002, 20:18: > After making no major changes to my application that I am aware of, one > particular page suddenly gives me the following exception in appendToResponse: > > Error: java.lang.IllegalStateException Reason: _obtainOpenChannel -- > com.webobjects.eoaccess.EODatabaseContext > com.webobjects.eoaccess.EODatabaseContext@3754b2: no database channel is > available > > > Any ideas? Maybe it really means what it says - no free channel to the database. If this happens only from time to time, then probably under the exact circumstances all available DB channels are used. Have you implemented 'databaseContextShouldHandleDatabaseException' in a delegate class and called 'EODatabaseContext.setDefaultDelegate(<instance of delegate class>);' from the Application's constructor to provide additional channels when needed? Of course you can implement the delegate method directly into Application.java and then set 'this' as the delegate. While this does not solve the cause (more than one channel needed at a time) it should prevent the exception from happening. I got this exception a lot when we used frames. Three of them displayed stuff from the database and after a full page refresh it was just a race condition - one or two frames displayed properly but the third one always showed this exception. I implemented the delegate method and the exceptions went away. -- Regards, Stefan