proxool-developer Mailing List for Proxool: Proxy JDBC Connection Pool (Page 10)
UNMAINTAINED!
Brought to you by:
billhorsman
You can subscribe to this list here.
2002 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(3) |
Dec
(54) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2003 |
Jan
(15) |
Feb
(56) |
Mar
(9) |
Apr
(6) |
May
(12) |
Jun
(4) |
Jul
|
Aug
(9) |
Sep
(21) |
Oct
(10) |
Nov
(19) |
Dec
(29) |
2004 |
Jan
(11) |
Feb
(12) |
Mar
(53) |
Apr
(7) |
May
(15) |
Jun
(6) |
Jul
(6) |
Aug
|
Sep
(11) |
Oct
(7) |
Nov
(3) |
Dec
(3) |
2005 |
Jan
(1) |
Feb
(2) |
Mar
|
Apr
|
May
|
Jun
(1) |
Jul
(4) |
Aug
(2) |
Sep
(10) |
Oct
(4) |
Nov
|
Dec
(1) |
2006 |
Jan
|
Feb
|
Mar
(1) |
Apr
(2) |
May
(1) |
Jun
(5) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(2) |
Dec
|
2007 |
Jan
(4) |
Feb
(1) |
Mar
|
Apr
(2) |
May
(4) |
Jun
(2) |
Jul
(2) |
Aug
(2) |
Sep
|
Oct
|
Nov
(1) |
Dec
(7) |
2008 |
Jan
|
Feb
|
Mar
(2) |
Apr
|
May
(2) |
Jun
|
Jul
(5) |
Aug
(3) |
Sep
(5) |
Oct
|
Nov
(2) |
Dec
(2) |
2009 |
Jan
|
Feb
|
Mar
(1) |
Apr
(18) |
May
(4) |
Jun
(6) |
Jul
|
Aug
(1) |
Sep
|
Oct
|
Nov
|
Dec
|
2010 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(2) |
Oct
|
Nov
|
Dec
|
2011 |
Jan
|
Feb
|
Mar
|
Apr
(1) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: <ca...@ab...> - 2004-03-08 09:20:28
|
Hi, I want to store a proxool database pool within a JNDI tree, I have seen that there are some properties to configure it, but I can´t make it works. How should this be done?. Thank you!! |
From: Jean-Henry B. <ber...@ne...> - 2004-02-27 08:30:49
|
bi...@lo... wrote: > > >>The thread does NOT get interrupted. >>We are using Proxool.0.8.2 >> >>Could you provide any suggestions? How would I interrupt the Thread >>without this error? >> >> > >Not sure. Nobody has ever asked to do that before. What sort of behaviour >would you expect? > >I suppose that if we spot the difference between InterruptedExceptions >that occur in the lock code and those originating from elsewhere we can >just throw the InterruptedException when approriate. > >- Bill > > I guess Throwable.getCause() can be very handy in a case like this. (make sure the lock code initializes the "cause" and when checking, if the cause is different, even if it was not initialized - i.e. null - it would mean it's not generated by the locking code). Alas all this depends on the platform version , since the "cause" handling is only available since version 1.4. Jean |
From: Bill H. <bi...@lo...> - 2004-02-27 08:06:30
|
Parambir, I'm copying your email to the dev list. You should send all questions to one of the lists so that a) you get more people thinking about your problem, and b) other people can learn from the solution. On Thu, 26 Feb 2004, Parambir Gill wrote: > I am running a process in a Thread. This process accesses the DB > through Proxool. If i call Thread.interrupt() on this thread, I > get the following error: > > 1241365 [Thread-9] ERROR proxool.AbstractProxyConnection - Unable > to acquire write lock for status Our concurrent locking code (from Doug Lea) can throw an InterruptedException and we are incorrectly assuming that this exception originates from that code. That is it a bug. > The thread does NOT get interrupted. > We are using Proxool.0.8.2 > > Could you provide any suggestions? How would I interrupt the Thread > without this error? Not sure. Nobody has ever asked to do that before. What sort of behaviour would you expect? I suppose that if we spot the difference between InterruptedExceptions that occur in the lock code and those originating from elsewhere we can just throw the InterruptedException when approriate. - Bill |
From: Bill H. <bi...@lo...> - 2004-02-21 08:44:50
|
Hi Kerry. On Sat, 2004-02-21 at 01:54, Kerry Hew wrote: > I just came across Proxool and am trying to test it out. I am able to > get it up and running fine locally, but when I run the same stuff > (diff't prop file for diff't db) on my web host, I get the following > exception seen at the bottom of this message. Can you tell us where you have installed the proxool.jar file (for example, in WEB-INF/lib)? Does your application work in other respects? > But does it perform? Yes, I believe it does. We are running it on some high usage web sites without problem. > What are alternatives to compare to? Poolman, C3PO, DBCP. Anybody think of any more? - Bill |
From: Bill H. <bi...@lo...> - 2004-02-11 23:06:13
|
Hi Dorte, On Tue, 2004-02-10 at 10:56, Dorte Munk-Jakobsen wrote: > oracle implementation of enqueue and dequeue on the session queues > leaves some cursors open and after some time there is no more cursors > left on the connection. Ugh. > try { > > proxyConnection = (ProxyConnection) > proxyConnections.get(nextAvailableConnection); > > } catch (IndexOutOfBoundsException e) { [snip] > } Thanks for that. I'll commit that fix. > The second is a little more subtile as you can see below: > > killConnecton(String alias, long id, boolean merciful) > > uses > > ConnectionPoolManager.getInstance().getConnectionPool(alias).expireConnection(id, merciful); > > to call: > > expireConnection(long id, boolean forceExpiry) > > The documentation says merciful=false => we force and the value false > is passed to expireConnection.forceExpiry where false => don't force > so ... > > it is easy to make a work around but I suggest that you negate > merciful when you pass it to forceExpiry. Also done. Thanks again. > I wonder if you know a good site or a good book where I can learn some > more about proxies? I'm not sure I can think of a simple answer to that question. Cglib might be a good resource if you want to deep into it - that's the code we use to implement proxies. - Bill |
From: Bill H. <bi...@lo...> - 2004-02-11 23:06:13
|
Hi Shaun, On Mon, 2004-02-09 at 23:45, Shaun Stepanowich wrote: > SEVERE: Housekeeping log.error( : > java.lang.ThreadDeath > at > org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1252) > at > org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1212) > at > java.lang.ClassLoader.loadClassInternal(ClassLoader.java:302) > at > com.enertiasoft.util.pooling.ConnectionPoolStateListener.upStateChanged(Unknown Source) > at > org.logicalcobwebs.proxool.CompositeStateListener.upStateChanged(CompositeStateListener.java:40) I agree with Christian. The only direct control over that Thread by Proxool is to cancel it gracefully. That is, after it has completed its sweep. It seems that your Thread is dying half way through a sweep. Does it die at different places each time? It's a daemon thread, so it will die if the JVM dies. You say you get "a bunch" - can you be more precise? Every 30 seconds? - Bill |
From: Christian N. <chr...@em...> - 2004-02-10 20:05:09
|
My first hunch would be that this has something to do with Proxool shutdown and hot-deploys. Are you hot-deploying your app? If you are, are you sure that you shut down the previous Proxool instance properly? If you use the ServletConfigurator this will be done automatically for you, otherwise you need to call ProxoolFacade.shutdown(0) when your app is unloaded (e.g. from a servlets destroy() method.) Could this be the problem? Please get back to me if its not and I'll investigate further. CHR ----- Original Message ----- From: "Shaun Stepanowich" Date: Mon, 9 Feb 2004 16:45:47 -0700 To: Subject: [Proxool-developer] ThreadDeath Error Hi, Could i please get some information on why I might be getting this error. Some common reason etc. I am having trouble locating the cause. Thanks a bunch SEVERE: Housekeeping log.error( : java.lang.ThreadDeath at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1252) at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1212) at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:302) at com.enertiasoft.util.pooling.ConnectionPoolStateListener.upStateChanged(Unknown Source) at org.logicalcobwebs.proxool.CompositeStateListener.upStateChanged(CompositeStateListener.java:40) at org.logicalcobwebs.proxool.ConnectionPool.setUpState(ConnectionPool.java:816) at org.logicalcobwebs.proxool.HouseKeeper.calculateUpState(HouseKeeper.java:234) at org.logicalcobwebs.proxool.HouseKeeper.sweep(HouseKeeper.java:155) at org.logicalcobwebs.proxool.HouseKeeperThread.run(HouseKeeperThread.java:39) Shaun Stepanowich, Development Team Enertiasoft, a Premier Technologies Company 150s, 3030 3rd AVE NE Calgary, AB, Canada T2A6T7 toll free 1 866 ENERTIA (363 7842) office. 403 228 9292 fax. 403 265 8993 -- ___________________________________________________________ Sign-up for Ads Free at Mail.com http://promo.mail.com/adsfreejump.htm |
From: Dorte Munk-J. <dor...@ya...> - 2004-02-10 10:56:50
|
Still working with oracle AQSessions, I am obliged to close my physical connections at irregular intervals, so I cannot use a timeout. The reason I need to close is that the oracle implementation of enqueue and dequeue on the session queues leaves some cursors open and after some time there is no more cursors left on the connection. Since I don't want to wait for the "out of cursors exception", it occurs at 1000 cursors, which I consider a waste of resources, I have created a counter in my connection pool class (the one that calls the real connection pool, currently proxool, before it was oracle but it lost connections) and when a connection has been reused 100 times I close it with ProxoolFacade.killConnecton(pool-alias,conn-id,false). The purpose it to make it close the connection with the mercifull=false => force=true unfortunately there are two bugs here: the first is in proxool.ConnectionPool.expireConnection(long id, boolean forceExpiry) where the catch catches ArrayIndexOutOfBoundsException, in JDK 1.3.1 the thrown exception is IndexOutOfBoundsException as shown below. try { proxyConnection = (ProxyConnection) proxyConnections.get(nextAvailableConnection); } catch (IndexOutOfBoundsException e) { nextAvailableConnection = 0; proxyConnection = (ProxyConnection) proxyConnections.get(nextAvailableConnection); } The second is a little more subtile as you can see below: killConnecton(String alias, long id, boolean merciful) uses ConnectionPoolManager.getInstance().getConnectionPool(alias).expireConnection(id, merciful); to call: expireConnection(long id, boolean forceExpiry) The documentation says merciful=false => we force and the value false is passed to expireConnection.forceExpiry where false => don't force so ... it is easy to make a work around but I suggest that you negate merciful when you pass it to forceExpiry. Having worked a lot with your source the last week in order to try to implement support for the AQ Sessions (I was successfull, but it did not solve the open cursors problem so I dropped it again) I wonder if you know a good site or a good book where I can learn some more about proxies? Thanks Dorte --------------------------------- Do you Yahoo!? Yahoo! Finance: Get your refund fast by filing online |
From: Shaun S. <sh...@en...> - 2004-02-10 00:44:38
|
Hi, Could i please get some information on why I might be getting this error. Some common reason etc. I am having trouble locating the cause. Thanks a bunch SEVERE: Housekeeping log.error( : java.lang.ThreadDeath at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader .java:1252) at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader .java:1212) at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:302) at com.enertiasoft.util.pooling.ConnectionPoolStateListener.upStateChanged( Unknown Source) at org.logicalcobwebs.proxool.CompositeStateListener.upStateChanged(Composi teStateListener.java:40) at org.logicalcobwebs.proxool.ConnectionPool.setUpState(ConnectionPool.java :816) at org.logicalcobwebs.proxool.HouseKeeper.calculateUpState(HouseKeeper.java :234) at org.logicalcobwebs.proxool.HouseKeeper.sweep(HouseKeeper.java:155) at org.logicalcobwebs.proxool.HouseKeeperThread.run(HouseKeeperThread.java: 39) Shaun Stepanowich, Development Team Enertiasoft <http://www.enertiasoft.com/> , a Premier Technologies Company 150s, 3030 3rd AVE NE Calgary, AB, Canada T2A6T7 toll free 1 866 ENERTIA (363 7842) office. 403 228 9292 fax. 403 265 8993 |
From: Bill H. <bi...@lo...> - 2004-02-05 17:38:22
|
Hi John, On Thu, 2004-02-05 at 17:20, Hume, John - NA US HQ Delray wrote: > If the instance of the Connection-proxy is NOT the same one, then this > problem goes away: calling close() returns the underlying Connection to the > pool and can set the state of the Connection proxy so that any subsequent > attempt to use it can throw "SQLException: connection already closed" or > something like that. It *is* the same instance of the proxy connection. So this is a problem I believe. I quite like the idea of wrapping up the connection inside a disposable wrapper. That would certainly solve this issue. It's not a quick fix however. There isn't a clean separation from the wrapper and the internal component that knows about the state of the connection. It would be good to clean it up though. At the same time, we could get rid of the redundant abstraction we needed when dealing with multiple JDKs (back before we used Cglib). We certainly wouldn't do this before 0.10 (0.9 is due soon to add DataSource implementation). But maybe it should be done before 1.0. - Bill |
From: Hume, J. - NA US HQ D. <joh...@cr...> - 2004-02-05 17:21:45
|
Forgive my lack of familiarity with Proxool's architecture, but we've had some issues with closing connections multiple times (with other pools as well as proxool) and I want to understand where proxool sits in respect to this issue currently. Thread 1 gets a connection from the pool ... what it has is a Connection-implementing proxy for the underlying driver-supplied Connection. Thread 1 uses the Connection-proxy just like a normal Connection then calls close() on it. Thread 2 gets a connection from the pool, and let's say it's the same underlying Connection Thread 1 just returned to the pool. Might it also be the same instance of the Connection-proxy? If so, that's almost surely trouble, as Thread 1 might still have a reference to it and call close() a second time, thereby returning it to the pool and allowing some other thread to get it while Thread 2 is still using it. If the instance of the Connection-proxy is NOT the same one, then this problem goes away: calling close() returns the underlying Connection to the pool and can set the state of the Connection proxy so that any subsequent attempt to use it can throw "SQLException: connection already closed" or something like that. -john. -----Original Message----- From: Bill Horsman [mailto:bi...@lo...] Sent: Thursday, February 05, 2004 11:19 AM To: Proxool Subject: [Proxool-developer] Connections closed and open Hi all, Just investigating what happens when you close a connection twice. At the moment, nothing bad happens but you get a nasty warning message like: ConnectionPool.java:356) - Unable to set status of connection 40 from ACTIVE to AVAILABLE. It remains AVAILABLE We should obviously spot that. I'll have to check but I believe that is okay to close() twice and if you do then it should do so silently. It also got me thinking. I don't think we check the connection status when using it. So it is quite possible to close the connection (i.e. return it to the pool) and then keep on using it. This would be unwise. Perhaps we should be throwing an exception if you try to do anything to a connection that has been closed. But then, what happens if someone else grabs that connection? Then two "users" could be using the same one. I'm not sure how to avoid that problem. Perhaps that is something that the user has to avoid. Our goal is to behave exactly as if you were using the driver directly without a pool. And in that scenario the driver would spot it happening and throw an exception. I can't think of a solution to this. Maybe it's just something to document. - Bill ------------------------------------------------------- The SF.Net email is sponsored by EclipseCon 2004 Premiere Conference on Open Tools Development and Integration See the breadth of Eclipse activity. February 3-5 in Anaheim, CA. http://www.eclipsecon.org/osdn _______________________________________________ Proxool-developer mailing list Pro...@li... https://lists.sourceforge.net/lists/listinfo/proxool-developer |
From: Bill H. <bi...@lo...> - 2004-02-05 16:21:07
|
Hi all, Just investigating what happens when you close a connection twice. At the moment, nothing bad happens but you get a nasty warning message like: ConnectionPool.java:356) - Unable to set status of connection 40 from ACTIVE to AVAILABLE. It remains AVAILABLE We should obviously spot that. I'll have to check but I believe that is okay to close() twice and if you do then it should do so silently. It also got me thinking. I don't think we check the connection status when using it. So it is quite possible to close the connection (i.e. return it to the pool) and then keep on using it. This would be unwise. Perhaps we should be throwing an exception if you try to do anything to a connection that has been closed. But then, what happens if someone else grabs that connection? Then two "users" could be using the same one. I'm not sure how to avoid that problem. Perhaps that is something that the user has to avoid. Our goal is to behave exactly as if you were using the driver directly without a pool. And in that scenario the driver would spot it happening and throw an exception. I can't think of a solution to this. Maybe it's just something to document. - Bill |
From: Bill H. <bi...@lo...> - 2004-02-04 14:43:56
|
Hi Dave, On Tue, 2004-02-03 at 21:28, dav...@fe... wrote: > We've been using Proxool in production for over a year now. That's good. Is that a public web site? > I just started noticing this error message in our logs: > 2592 [http8080-Processor25] WARN proxool.pwdds - 000017 (01/03/00) - > #3 registered a statement as closed which wasn't known to be open. That could happen if you close a statement twice. If that is the case then the only consequence is a WARN log event, but I guess it would be a good idea not to close it twice. Is it possible that is the problem? > Also, I just upgraded from 7.x to 8.3 and Im getting these error > messages now after 30 seconds or so of inactivity: > > 307112 [Shutdown Hook] ERROR proxool.ShutdownHook - Problem calling > "get cause" on IllegalStateException. That message appears during shutdown. We need to make it a less alarming debug message. > org.logicalcobwebs.proxool.ShutdownHook.run(ShutdownHook.java:99) > at java.lang.Thread.run(Thread.java:536) But this line suggests to me (quite strongly) that the JVM is shutting down. The only way that I can think of for the ShutdownHook.run method to be called is by the JVM. What JVM are you using? Do you have any other evidence that might suggest this is happening? Do you see log events for Proxool restarting after this shutdown activity? - Bill |
From: Bertrand R. <ber...@mo...> - 2004-01-28 11:00:58
|
Dear developpers/maintainers, I was wondering were I should report issues regarding the Hibernate test cases... Should I post a mail to the dev mailing list or should I post an entry in JIRA ? If the JIRA solution is the prefered approach, it might be a good idea to add a 'TestCase' component to the list. Feedback ? -bertrand |
From: Christian N. <chr...@em...> - 2004-01-28 10:23:43
|
> Hi everybody, > I just looked at proxool, an it seems very interesting > to me since you are able to monitor your connection pool > more detailed than you are e.g with the jakarta commons pool, > which you use by default in tomcat. > But there is also my question: > Am I able to integrate proxool in my tomcat container by > inserting the neccessary configuration details in server.xml ?? > It would be good, not to use a application-dependent configuration. > And I also would prefer referencing the pool in my application > by using a JNDI lookup. The next Proxool release (0.9 - out in a few weeks time) will add DataSource and ObjectFactory support. So if you have time to wait for that release the answer is yes. > Next question is, why not building a MBean, > which has the same information as the AdminServlet. > Then you would be able to extract this data more easily to > external systems, like a management appilcation by using a > jmx-to-snmp adaptor for instance. As I can see so far you > only get information (from the MBean) about non-changing > values like the maximum-connection-count not the effectively used connections. This is a very good suggestion. I'll try to make sure this is included in the Proxool 1.0 release (hopefully out before summer). CHR > > Thanks for any response, > Philipp. -- ___________________________________________________________ Sign-up for Ads Free at Mail.com http://promo.mail.com/adsfreejump.htm |
From: <phi...@we...> - 2004-01-28 08:35:04
|
Hi everybody, I just looked at proxool, an it seems very interesting to me since you are able to monitor your connection pool more detailed than you are e.g with the jakarta commons pool, which you use by default in tomcat. But there is also my question: Am I able to integrate proxool in my tomcat container by inserting the neccessary configuration details in server.xml ?? It would be good, not to use a application-dependent configuration. And I also would prefer referencing the pool in my application by using a JNDI lookup. Next question is, why not building a MBean, which has the same information as the AdminServlet. Then you would be able to extract this data more easily to external systems, like a management appilcation by using a jmx-to-snmp adaptor for instance. As I can see so far you only get information (from the MBean) about non-changing values like the maximum-connection-count not the effectively used connections. Thanks for any response, Philipp. ______________________________________________________________________________ Erdbeben im Iran: Zehntausende Kinder brauchen Hilfe. UNICEF hilft den Kindern - helfen Sie mit! https://www.unicef.de/spe/spe_03.php |
From: Bill H. <bi...@lo...> - 2004-01-26 23:02:59
|
Hi Kiran, On Mon, 2004-01-26 at 20:13, Kiran T wrote: > Does proxool support, directly or indirectly, determining the execution time > for each query? Yep. Use the ConnectionListenerIF. > Does onExecute() event triggered at the beginning or the end of execution? At the end. Although I seem to remember someone else asking for another event at the beginning of execution too. onExecute() conveniently passes you the elapsed time for each execution. It doesn't take account of the time taken to fetch any information from a Connection, however. For instance, iterating through a large ResultSet or reading a large Clob. - Bill |
From: Kiran T <mah...@ho...> - 2004-01-26 20:13:33
|
Hello all, Does proxool support, directly or indirectly, determining the execution time for each query? For any given connection, I can get the total time by tracking the time taken between getting the connection out of a pool and dumping back to the pool but a single connection can have multiple queries associated with it. Does onExecute() event triggered at the beginning or the end of execution? Thanks in advance Kiran _________________________________________________________________ Check out the new MSN 9 Dial-up fast & reliable Internet access with prime features! http://join.msn.com/?pgmarket=en-us&page=dialup/home&ST=1 |
From: Bill H. <bi...@lo...> - 2004-01-13 16:02:26
|
Hi Per Thomas, On Tue, 2004-01-13 at 16:44, Per Thomas Jahr wrote: > I'm using Proxool with Hibernate 2.1.1 and in the hibernate.cfg.xml > there is the Proxool property set to maximum-active-time 500. Is that > milliseconds? It seems like my application closes databases connections > to early. Could maximum-active-time = 500 be the problem? Yep, it's in milliseconds. That important bit of information seems to be missing from the doc. I'll fix that. maximum-active-time = 500 means that if the house keeper spots that a connection is used for more than half a second it will kill it. Since the house keeper only runs every 30 seconds (by default) it effectively means the maximum-active-time is anywhere between 0.5 seconds and a tad over 30.5 seconds. - Bill |
From: Per T. J. <Per...@nr...> - 2004-01-13 15:45:11
|
Hi, I'm using Proxool with Hibernate 2.1.1 and in the hibernate.cfg.xml there is the Proxool property set to maximum-active-time 500. Is that milliseconds? It seems like my application closes databases connections to early. Could maximum-active-time = 500 be the problem? Thanks Per Thomas Stack trace: 2004-01-13 15:36:45,406 DEBUG [ThreadPoolWorker:Thread-9] (per@156.116.2.165) (JDBCExceptionReporter.java:36) - SQL Exception java.sql.SQLException: No operations allowed after connection closed. Connection was closed explicitly by the application at the following location: ** BEGIN NESTED EXCEPTION ** java.lang.Throwable STACKTRACE: java.lang.Throwable at com.mysql.jdbc.Connection.close(Connection.java:1107) at org.logicalcobwebs.proxool.AbstractProxyConnection.reallyClose(AbstractProxyConnection.java:173) at org.logicalcobwebs.proxool.ConnectionPool.removeProxyConnection(ConnectionPool.java:413) at org.logicalcobwebs.proxool.HouseKeeper.sweep(HouseKeeper.java:139) at org.logicalcobwebs.proxool.HouseKeeperThread.run(HouseKeeperThread.java:39) ** END NESTED EXCEPTION ** at com.mysql.jdbc.Connection.checkClosed(Connection.java:2741) at com.mysql.jdbc.Connection.prepareStatement(Connection.java:1373) at com.mysql.jdbc.Connection.prepareStatement(Connection.java:1353) at sun.reflect.GeneratedMethodAccessor31.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:324) at org.logicalcobwebs.proxool.ProxyConnection.invoke(ProxyConnection.java:68) at org.logicalcobwebs.cglib.proxy.Proxy$ProxyImpl$$EnhancerByCGLIB$$9d354a27.prepareStatement(<generated>) at net.sf.hibernate.impl.BatcherImpl.getPreparedStatement(BatcherImpl.java:228) at net.sf.hibernate.impl.BatcherImpl.prepareQueryStatement(BatcherImpl.java:61) at net.sf.hibernate.loader.Loader.prepareQueryStatement(Loader.java:703) at net.sf.hibernate.loader.Loader.doQuery(Loader.java:184) at net.sf.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:132) at net.sf.hibernate.loader.Loader.loadCollection(Loader.java:909) at net.sf.hibernate.loader.Loader.loadCollection(Loader.java:884) at net.sf.hibernate.loader.CollectionLoader.initialize(CollectionLoader.java:69) at net.sf.hibernate.collection.AbstractCollectionPersister.initialize(AbstractCollectionPersister.java:284) at net.sf.hibernate.impl.SessionImpl.initializeCollection(SessionImpl.java:3133) at net.sf.hibernate.collection.PersistentCollection.initialize(PersistentCollection.java:203) at net.sf.hibernate.collection.PersistentCollection.read(PersistentCollection.java:69) at net.sf.hibernate.collection.Bag.size(Bag.java:231) -- Per Thomas Jahr |
From: Bill H. <bi...@lo...> - 2004-01-10 10:15:15
|
Hi Claudio, On Sat, 2004-01-10 at 11:02, Claudio Destro wrote: > On the countrary, proxool-0.8.3 logs messages using its Jdk14Logger; so I get > my messages in a text file while proxool messages go to stdout. > > Moreover, setting the org.logicalcobwebs.logging.Log System property > (with -Dorg.logicalcobwebs.logging.Log=com.tntstudio.log.ConsoleLogger) > produces the following stack trace: > > Exception in thread "main" java.lang.ExceptionInInitializerError > at com.tntstudio.skyware.Skyware.startup(Unknown Source) > at com.tntstudio.skyware.Skyware.main(Unknown Source) > Caused by: org.logicalcobwebs.logging.LogConfigurationException: > org.logicalcobwebs.logging.LogConfigurationException: > org.logicalcobwebs.logging.LogConfigurationException: Class > com.tntstudio.log.ConsoleLogger does not implement Log We can easily fix the first issue: getting Proxool to use the standard property value, but that second one is a bit trickier. Of course, you could make your ConsoleLogger also implement org.logicalcobwebs.logging.Log but that is a bit clumsy. I'd like to have this all working transparently, I really would. It is starting to look like we should switch back to including JCL as a separate JAR. For the record, I have no compulsion to do the same for the concurrent and collection classes we have. They have no public interaction at all. Ditto with cglib. > I think proxool's > internal JCL prevents usage of any other org.apache.commons.logging.Log > implementation. Agreed. Bill |
From: Claudio D. <o1...@ti...> - 2004-01-10 10:04:59
|
Hi Bill, I use the following commons-logging.properties file to force the Jakarta Commons Logging system to use a specific Log: --BOF-- # # Instruct the JCL default LogFactory to instantiate our specific # implementation. # org.apache.commons.logging.Log=com.tntstudio.log.ConsoleLogger # Our logger can be configured by setting few properties in the # "console-logger.properties" file. --EOF-- (I've written the ConsoleLogger class just for fun...) Everything is logged by our class correctly to a text file, also proxool-0.6 messages. On the countrary, proxool-0.8.3 logs messages using its Jdk14Logger; so I get my messages in a text file while proxool messages go to stdout. Moreover, setting the org.logicalcobwebs.logging.Log System property (with -Dorg.logicalcobwebs.logging.Log=com.tntstudio.log.ConsoleLogger) produces the following stack trace: Exception in thread "main" java.lang.ExceptionInInitializerError at com.tntstudio.skyware.Skyware.startup(Unknown Source) at com.tntstudio.skyware.Skyware.main(Unknown Source) Caused by: org.logicalcobwebs.logging.LogConfigurationException: org.logicalcobwebs.logging.LogConfigurationException: org.logicalcobwebs.logging.LogConfigurationException: Class com.tntstudio.log.ConsoleLogger does not implement Log at org.logicalcobwebs.logging.impl.LogFactoryImpl.newInstance(LogFactoryImpl.java:526) at org.logicalcobwebs.logging.impl.LogFactoryImpl.getInstance(LogFactoryImpl.java:279) at org.logicalcobwebs.logging.impl.LogFactoryImpl.getInstance(LogFactoryImpl.java:250) at org.logicalcobwebs.logging.LogFactory.getLog(LogFactory.java:380) at org.logicalcobwebs.proxool.ProxoolDriver.<clinit>(ProxoolDriver.java:28) ... 2 more Caused by: org.logicalcobwebs.logging.LogConfigurationException: org.logicalcobwebs.logging.LogConfigurationException: Class com.tntstudio.log.ConsoleLogger does not implement Log at org.logicalcobwebs.logging.impl.LogFactoryImpl.getLogConstructor(LogFactoryImpl.java:410) at org.logicalcobwebs.logging.impl.LogFactoryImpl.newInstance(LogFactoryImpl.java:519) ... 6 more Caused by: org.logicalcobwebs.logging.LogConfigurationException: Class com.tntstudio.log.ConsoleLogger does not implement Log at org.logicalcobwebs.logging.impl.LogFactoryImpl.getLogConstructor(LogFactoryImpl.java:406) ... 7 more I know it's silly to write a new SimpleLog as I did :(, but I think proxool's internal JCL prevents usage of any other org.apache.commons.logging.Log implementation. Claudio |
From: Bill H. <bi...@lo...> - 2004-01-09 15:16:52
|
HI Claudio, On Wed, 2004-01-07 at 20:47, Claudio Destro wrote: > I think the problem is in the re-writing of "org.apache.commons.logging.Log" > property in "org.logicalcobwebs.logging.Log" (internal JCL does not act the > same way as external one). I understand that. We made the decision to repackage all *internal* dependencies, but logging is not entirely internal so maybe we need to make a special case for it. It does handle configuration surprisingly well and will co-exist with the commons' logging library. But there may be some specific cases here that we need to deal with. > So, I understand version problems, but why not simply retain external package > original names instead of embeed them into org.logicalcobwebs super-package? If we used the same package names then it would not be clear which class was being used - it would depend on the classpath order. I don't think that is very satisfactory. Class loader issues are best avoided. Issues: 1) It's nice that Proxool doesn't have any dependencies at the moment. Some projects can't avoid them, but as long as we can I'd like to. 2) We don't want different behaviour depending on whether other libraries get loaded first or not. 3) On the other hand, logging should be transparent. If you setup Commons' logging in your project then Proxool should react correctly. Maybe the answer is to fix the precise logging problem you are having. I have never fully understood that "org.apache.commons.logging.Log" property. Perhaps it's time I did. Bill |
From: Claudio D. <o1...@ti...> - 2004-01-07 19:49:34
|
These days I was thinkering with an annoying _bug_: while my classes logs - using external JCL/SimpleLog - to a text file, proxool-0.8.3 logs - using its internal JCL/Jdk14Logger - to System.out. I think the problem is in the re-writing of "org.apache.commons.logging.Log" property in "org.logicalcobwebs.logging.Log" (internal JCL does not act the same way as external one). So, I understand version problems, but why not simply retain external package original names instead of embeed them into org.logicalcobwebs super-package? I understand this for one or few more classes (see util.FastArrayList, I did the same with a *modified* version of catalina.util.FastDateFormat). This gives users the ability to un-embeed external packages (avoiding useless duplication of code), and saves you from version problems (even if I think this is not a real problem expecially for packages like Concurrent and Logging). In any case you can distribute all sources needed by Proxool (see Apache XmlRpc which boundles uk.co.wilson.xml.MinML and uk.org.xml.* in its source distribution). I mean: proxool-x.x.x-src.jar | +-- org/logicalcobwebs/proxool/*.java | +-- org/apache/commons/logging/*.java | +-- EDU/oswego/cl/dl/util/concurrent/*.java | +-- net/sf/cglib/*.java | +-- ... ...Just an opinion. Claudio Destro <cd...@tn...> |
From: Bill H. <bi...@lo...> - 2003-12-22 17:51:35
|
Hi Kiran, On Mon, 2003-12-22 at 17:22, Kiran T wrote: > I have been trying to make use of ConnectionListener events and I somehow > feel that the events are not comprehensive. Just for an example, I was > trying to make use of onDeath() to send out emails whenever connection gets > "killed" but I didn't want to send emails when these connections were > terminated naturally( ie after 4 hours of being in the pool). I suppose we could send a code that described why the connection was being destroyed. Off the top of my head, a connection can be killed because: a) it has reached its maximum lifetime (default 4 hours) b) it has failed its house keeping test c) it has thrown a fatal SQL exception There might be some other cases too. > Also, I figured out that the java.sql.Connection parameter passed to the > onDeath() is not the Proxool Connection but the native java.sql Connection. > Was there any reason to not pass proxool's connection? I normally put the > connection in the map while getting the connection and pop out during > onDeath() call. Because it was not a proxool connection I had to use > ProxoolFacade.getDelegateConnection() and then use it. Hmm, I can't think of any reason not to set the Proxool connection. I think the only reason you get a connection (in that method) is so that you can perform a resource clean up. And I don't see why you can't do that with a Proxool Connection. I'll have a think about the implications of this. > I remember an earlier discussion on splitting onExecute() to > onExecuteStart() and onExecuteEnd(). Thats a great idea. Would it be > possible to integrate in 0.9.0? That means a change to the API and is not something we do lightly. However, we are pre-1.0 and that is something that we are prepared to change if there is a good reason. Your suggestions sound good to me. Anybody going to argue against them? Thanks for your constructive comments, Kiran. Cheers, Bill |