|
From: Patrick Y. <kc...@ce...> - 2005-07-05 09:53:24
|
There is no strict reason for using our own implementation. So it would=20 be good to have some contribution to port Hermes to make use of other=20 database pool, like DBCP. Regards, -Patrick Regards, -Patrick Mattias J wrote: > Yes, why not include for example Jakarta Commons DBCP? > > At 2005-06-27 09:29, you wrote: > >> I guess the problem is that you have implemented your own=20 >> databasepool, without sophisticated recovery mechanism. >> Our own application use javax.sql.DataSource, to get a connection. I=20 >> guess there is a recovery mechanism in that solution, as our own=20 >> application runs fine when the connection gets back. >> Is there anyway to use javax.sql.DataSource instead of your=20 >> implementation of the connection pool? I guess my question is more to=20 >> why you are using your own implemtation, are you using some extra=20 >> stuff, I can't get from javax.sql.DataSource? >> >> Regards Kenneth >> >>> From: Patrick Yee <kc...@ce...> >>> To: ebx...@li... >>> CC: tr...@ho... >>> Subject: Re: [ebxmlms-general] Problems after lost connection to=20 >>> database >>> Date: Sun, 26 Jun 2005 19:19:35 +0800 >>> >>> We have not implemented a sophisticated recovery mechanism in the=20 >>> database connection pool. The only mechanism we have done is,=20 >>> whenever a connection is proved to be bad, we will not put it back=20 >>> to the connection pool. Actually there was a suggestion some time=20 >>> ago that we can do a "select *" on some tables before we use the=20 >>> pooled database connection. We think that will create certain=20 >>> performance issue, and so we shelved that idea. Of course, if you=20 >>> want it, you can just patch the database connection pool classes and=20 >>> implement any advanced recovery mechanism as you like. :-) >>> Regards, -Patrick >>> >>> >>> Kenneth Pedersen wrote: >>> >>>> Hi >>>> >>>> If I loose the connection to my database for a short time=20 >>>> (1-2minutes), MSH do not operate properly afterwards. >>>> >>>> When the connection is lost this occurs in the MSH_client.log: >>>> >>>> 2005-06-21 09:13:34,384 DEBUG [Thread-8]: =3D>=20 >>>> DbConnectionPool.getConnection >>>> 2005-06-21 09:13:34,384 DEBUG [Thread-8]: <=3D=20 >>>> DbConnectionPool.getConnection >>>> 2005-06-21 09:13:34,384 ERROR [Thread-8]: [10002] Unknown error >>>> Exception: java.sql.SQLException >>>> Message: I/O Error: Connection reset by peer: socket write error >>>> 2005-06-21 09:13:34,384 DEBUG [Thread-8]: =3D> Transaction.rollback=20 >>>> (txID: #2321) >>>> 2005-06-21 09:13:34,384 ERROR [Thread-8]: [10315] Cannot rollback=20 >>>> DB changes >>>> Exception: java.sql.SQLException >>>> Message: Invalid state, the Connection object is closed. >>>> 2005-06-21 09:13:34,384 DEBUG [Thread-8]: =3D>=20 >>>> DbConnectionPool.freeConnection >>>> 2005-06-21 09:13:34,384 DEBUG [Thread-8]: <=3D=20 >>>> DbConnectionPool.freeConnection >>>> 2005-06-21 09:13:34,384 DEBUG [Thread-8]: <=3D Transaction.rollback >>>> 2005-06-21 09:13:34,384 DEBUG [Thread-8]: =3D>=20 >>>> MessageServiceHandler.getNextUndeliveredMessage >>>> 2005-06-21 09:13:34,384 DEBUG [Thread-8]: =3D>=20 >>>> MessageServer.getUndeliveredMessages >>>> 2005-06-21 09:13:34,384 DEBUG [Thread-8]: =3D>=20 >>>> DbConnectionPool.getConnection >>>> 2005-06-21 09:13:34,384 DEBUG [Thread-8]: =3D>=20 >>>> DbConnectionPool.createConnection >>>> 2005-06-21 09:13:35,352 ERROR [Thread-8]: [10306] Cannot create DB=20 >>>> connection Exception: java.sql.SQLException Message: Network error >>>> IOException: Connection refused: connect >>>> 2005-06-21 09:13:35,352 DEBUG [Thread-8]: =3D> Transaction.rollback=20 >>>> (txID: #2323) >>>> 2005-06-21 09:13:35,352 DEBUG [Thread-8]: <=3D Transaction.rollback >>>> 2005-06-21 09:13:35,352 DEBUG [Thread-8]: =3D>=20 >>>> MessageServiceHandler.getNextUndeliveredMessage >>>> 2005-06-21 09:13:35,352 DEBUG [Thread-8]: =3D>=20 >>>> MessageServer.getUndeliveredMessages >>>> 2005-06-21 09:13:35,352 DEBUG [Thread-8]: =3D>=20 >>>> DbConnectionPool.getConnection >>>> 2005-06-21 09:13:35,352 DEBUG [Thread-8]: =3D>=20 >>>> DbConnectionPool.createConnection >>>> >>>> >>>> After the connection is restored MSH do not seem to get a proper=20 >>>> connection. >>>> This occurs then in the MSH_Client.log: >>>> >>>> 2005-06-21 09:13:42,384 ERROR [Thread-8]: [10306] Cannot create DB=20 >>>> connection >>>> Exception: java.sql.SQLException Message: Network error >>>> IOException: Connection refused: connect >>>> 2005-06-21 09:13:42,384 DEBUG [Thread-8]: =3D> Transaction.rollback=20 >>>> (txID: #2338) >>>> 2005-06-21 09:13:42,384 DEBUG [Thread-8]: <=3D Transaction.rollback >>>> 2005-06-21 09:13:42,384 DEBUG [Thread-8]: =3D>=20 >>>> MessageServiceHandler.getNextUndeliveredMessage >>>> 2005-06-21 09:13:42,384 DEBUG [Thread-8]: =3D>=20 >>>> MessageServer.getUndeliveredMessages >>>> 2005-06-21 09:13:42,384 DEBUG [Thread-8]: =3D>=20 >>>> DbConnectionPool.getConnection >>>> 2005-06-21 09:13:42,384 DEBUG [Thread-8]: =3D>=20 >>>> DbConnectionPool.createConnection >>>> 2005-06-21 09:13:43,384 ERROR [Thread-8]: [10306] Cannot create DB=20 >>>> connection >>>> Exception: java.sql.SQLException >>>> Message: Network error IOException: Connection refused: connect >>>> >>>> >>>> >>>> When i try to send a message through MSH i get this: >>>> hk.hku.cecid.phoenix.message.handler.RequestException: >>>> Failed to send query to MSH. >>>> HTTP response code =3D 200 >>>> HTTP response message =3D OK >>>> at=20 >>>> hk.hku.cecid.phoenix.message.handler.Request.expectMapResponse(Unkno= wn=20 >>>> Source) >>>> at=20 >>>> hk.hku.cecid.phoenix.message.handler.Request.sendMessageServiceHandl= erConfig(Unknown=20 >>>> Source) >>>> at=20 >>>> hk.hku.cecid.phoenix.message.handler.Request.register(Unknown Source= ) >>>> at hk.hku.cecid.phoenix.message.handler.Request.<init>(Unknown=20 >>>> Source) >>>> at hk.hku.cecid.phoenix.message.handler.Request.<init>(Unknown=20 >>>> Source) >>>> at=20 >>>> com.mysupply.ebxi.msh.MessageManager.sendMessage(MessageManager.java= :149)=20 >>>> >>>> >>>> And of course I can not receive any messages through MSH either. >>>> >>>> Does anybody have the same problems, after a lost database=20 >>>> connection? The other part of my application that uses MSH, is=20 >>>> right back in action when the database connection is restored, but=20 >>>> not MSH. >>>> >>>> The app is running on jboss-4.0.1 (Tomcat 5.0.28), Java=20 >>>> jdk1.5.0_01. The database is Microsofts MSSQL 2000. The driver for=20 >>>> MSSQL is JTDS 1.0. >>>> I have added this: >>>> <check-valid-connection-sql>select * from=20 >>>> some_table</check-valid-connection-sql> >>>> to my datasource file: mssql-ds.xml which is deployed along with=20 >>>> msh.war. >>>> >>>> Everything is working fine, for days, until I loose the database=20 >>>> connection for a few minutes. >>>> >>>> _________________________________________________________________ >>>> Del din verden med MSN Spaces http://spaces.msn.com >>>> >>>> >>>> >>>> ------------------------------------------------------- >>>> SF.Net email is sponsored by: Discover Easy Linux Migration Strategi= es >>>> from IBM. Find simple to follow Roadmaps, straightforward articles, >>>> informative Webcasts and more! Get everything you need to get up to >>>> speed, fast. http://ads.osdn.com/?ad_id=3D7477&alloc_id=3D16492&op=3D= click >>>> _______________________________________________ >>>> ebxmlms-general mailing list >>>> ebx...@li... >>>> https://lists.sourceforge.net/lists/listinfo/ebxmlms-general >>> >>> >> >> _________________________________________________________________ >> Undg=E5 pop-ups med MSN Toolbar - http://toolbar.msn.dk/ hent den gra= tis! >> >> >> >> ------------------------------------------------------- >> SF.Net email is sponsored by: Discover Easy Linux Migration Strategies >> from IBM. Find simple to follow Roadmaps, straightforward articles, >> informative Webcasts and more! Get everything you need to get up to >> speed, fast. http://ads.osdn.com/?ad_id=3D7477&alloc_id=3D16492&op=3Dc= lick >> _______________________________________________ >> ebxmlms-general mailing list >> ebx...@li... >> https://lists.sourceforge.net/lists/listinfo/ebxmlms-general > > > > > ------------------------------------------------------- > SF.Net email is sponsored by: Discover Easy Linux Migration Strategies > from IBM. Find simple to follow Roadmaps, straightforward articles, > informative Webcasts and more! Get everything you need to get up to > speed, fast. http://ads.osdn.com/?ad_idt77&alloc_id=16492&op=CCk > _______________________________________________ > ebxmlms-general mailing list > ebx...@li... > https://lists.sourceforge.net/lists/listinfo/ebxmlms-general > |