|
From: <jue...@we...> - 2004-02-28 23:00:14
|
Okidoki, but I don't think that we need a separate JdbcResourceException = class here - I've just changed it back to = CannotGetJdbcConnectionException, like it initially was (good that I = haven't committed it yet ;-). Given that we use a DataAccessException, = CannotGetJdbcConnectionException seems to be good enough. =20 I'm also not keen on changing the names of the exception base classes. = Granted, "ResourceFailureException" sounds like a double negative, but = it helps to distinguish it from "ResourceUsageException": in the former = case, the resource itself failed; in the latter case, it was used = inappropriately. =20 Juergen =20 ________________________________ Von: spr...@li... im Auftrag = von tri...@tr... Gesendet: Sa 28.02.2004 23:08 An: spr...@li... Betreff: Re: [Springframework-developer] DataFieldMaxValueIncrementer It's not necessarily a bad argument though - it could just be that the = runtime environment is misconfigured - I think a JdbcResourceException (see = previous email) would be appropriate. Thomas Quoting "j=FCrgen h=F6ller [werk3AT]" <jue...@we...>: > But the javax.sql.DataSource interface is plain JDBC, typically to be = =3D > used by Spring DAOs just like any other DataSource. It's getConnection = =3D > methods throw SQLException, according to the DataSource interface. > =3D20 > This is about *setting up* a DriverManagerDataSource; I don't see why = =3D > setDriverClassName or the constructor should throw a = DataAccessException =3D > here. Other Spring beans - including DAO support classes - throw =3D > IllegalArgumentException or the like too when they get bad = configuration =3D > parameters on initialization. > =3D20 > As I said, I changed DriverManagerDataSource initialization to throw = =3D > IllegalArgumentException, after Thomas' remark. The kind of unchecked = =3D > exception thrown on initialization is a rather academic issue... In = =3D > particular, if the driver class name isn't right, you can't do = anything =3D > meaningful anyway. > =3D20 > Juergen > =3D20 > > ________________________________ > > Von: spr...@li... im Auftrag = =3D > von Rod Johnson > Gesendet: Sa 28.02.2004 22:33 > An: spr...@li... > Betreff: Re: [Springframework-developer] DataFieldMaxValueIncrementer > > > > > > > >Good point - changed to IllegalArgumentException. > > >I just didn't want to throw CannotGetJdbcConnectionException like =3D > before; > it arguably wasn't appropriate. In general. the DataSource =3D > implementations > shouldn't use DataAccessExceptions in the first place. > > I disagree. I think that the user should be able to catch > DataAccessException confidently in all cases (which was why I changed = =3D > from > ClassNotFoundException to a DataAccessException). > > I don't have terribly strong views on this as it's not a production = =3D > usage > class anyway--but that also implies it wasn't really worth changing = the > behaviour either... > > > > > ------------------------------------------------------- > SF.Net is sponsored by: Speed Start Your Linux Apps Now. > Build and deploy apps & Web services for Linux with > a free DVD software kit from IBM. Click Now! > http://ads.osdn.com/?ad_id=3D3D1356&alloc_id=3D3D3438&op=3D3Dclick > _______________________________________________ > Springframework-developer mailing list > Spr...@li... > https://lists.sourceforge.net/lists/listinfo/springframework-developer > > > > > ------------------------------------------------------- > SF.Net is sponsored by: Speed Start Your Linux Apps Now. > Build and deploy apps & Web services for Linux with > a free DVD software kit from IBM. Click Now! > http://ads.osdn.com/?ad_id=3D1356&alloc_id=3D3438&op=3Dclick > _______________________________________________ > Springframework-developer mailing list > Spr...@li... > https://lists.sourceforge.net/lists/listinfo/springframework-developer > ------------------------------------------------------- SF.Net is sponsored by: Speed Start Your Linux Apps Now. Build and deploy apps & Web services for Linux with a free DVD software kit from IBM. Click Now! http://ads.osdn.com/?ad_id=3D1356&alloc_id=3D3438&op=3Dclick _______________________________________________ Springframework-developer mailing list Spr...@li... https://lists.sourceforge.net/lists/listinfo/springframework-developer |