Nope, that's the only way - other than reflection, which would have the same issue.
Once you get it working, it shouldn't be a problem unless you update iBATIS or Spring. Larry On Dec 13, 2007 2:00 AM, Darren Davison <[EMAIL PROTECTED]> wrote: > hi, > > on our project we'd like to include an admin page that allows someone > to manually flush any particular cache that ibatis is using. > > It looks like we can get an iterator over the cache models by doing > something like this (untried yet!); > > ExtendedSqlMapClient ext = (ExtendedSqlMapClient) sqlMapClient; > SqlMapExecutorDelegate dlgt = ext.getDelegate(); > Iterator iter = dlgt.getCacheModelNames(); > > and then iterate to get (I assume) CacheModel objects that I can flush > as needed. > > But this looks a bit dodgy because of the initial cast.. I can't > guarantee that our SqlMapClient is also an ExtendedSqlMapClient as we're > using Spring support for ibatis and so we typically deal with the super > interface only [1] > > Is there another way? > > Cheers, > > > > [1] > http://static.springframework.org/spring/docs/2.5.x/api/org/springframework/orm/ibatis/SqlMapClientTemplate.html#getSqlMapClient() > -- > Darren Davison > Public Key: 0xE855B3EA > > -----BEGIN PGP SIGNATURE----- > Version: GnuPG v1.4.6 (GNU/Linux) > > iD8DBQFHYPSYVgOfSOhVs+oRAph8AJ4/WDrfH8yIBSkaB4XUDYx45NOo3QCgk6OV > Wb3JafqkugEIu44jk0ugNZY= > =UvgQ > -----END PGP SIGNATURE----- > >
