cayenne-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andrus Adamchik <>
Subject Re: servlet filter and the Configuration
Date Sun, 02 May 2010 03:42:25 GMT
On May 1, 2010, at 12:07 AM, wrote:

> Okay,
>        So I think I've made some progress since my question  
> yesterday.  I
> have a bean in Spring that is a ConfigurationFactory.  It returns a
> singleton and the dataSource can be obtained from that.  Now I just  
> need
> to get that configuration loaded on web startup.  I guess I need to  
> write
> a filter because all the filters (the one in cayenne and the click
> project) create a new shared configuration on init with  
> ServletUtil.  I
> guess I want to override those init()'s and get a reference to my  
> bean and
> call initialize() on it directly.  Is that correct?

Sounds about right.

> When I do this will that Configuration become the shared  
> configuration?  If not how do I make
> it the shared configuration?

It does as long as either of the following is called either in your  
Filter or your Spring factory for Configuration:





View raw message