[jbosscache-dev] [JBCACHE-1342] Lack of lifecycle methods in CacheLoaderConfig classes

Manik Surtani manik at jboss.org
Thu May 15 08:11:43 EDT 2008


On 14 May 2008, at 22:58, Galder Zamarreno wrote:

> There's two other workarounds for this:
>
> - Create SQL strings on the fly, when get operations are called:
>
>   public String getSelectChildNamesSql()
>   {
>      if (selectChildNamesSql == null)
>      {
>         setSelectChildNamesSql("select " + fqnColumn + " from " +  
> table + " where " + parentColumn + "=?");
>      }
>
>      return selectChildNamesSql;
>   }
>
>   public void setSelectChildNamesSql(String selectChildNamesSql)
>   {
>      testImmutability("selectChildNamesSql");
>      this.selectChildNamesSql = selectChildNamesSql;
>   }

+1 - this is my preferred approach, rather than adding lifecycles to  
config elements or to get users to pass in SQL queries.

Cheers,
--
Manik Surtani
Lead, JBoss Cache
manik at jboss.org









More information about the jbosscache-dev mailing list