Ah.  I did not realize that I could use the prefix to separate the
regions for cache for differetn session factory.  Thanks.

On Apr 17, 9:21 am, Fabio Maulo <[email protected]> wrote:
> The cache behavior depend from the cache provider, not by NH.You can share
> the cache even between different boxes.
>
> If you want ensure a cache per session-factory you should use different
> cache-prefix per session-factory.
> <property name="cache.region_prefix">YourPrefix</property>
>
> 2009/4/16 Waqar Sadiq <[email protected]>
>
>
>
>
>
>
>
> > I have a web application in which different users may end up opening
> > connections to different databases.  As a result, the application
> > always searches for the session factory for the particular environment
> > that the user is logging into and if it exists then uses that.  If
> > not, then a session factory is created for that environment and also
> > cached for use the next time.
>
> > As a consequence of this, it seems to me that I cannot use the second
> > level cache because second level cache does will not be able to
> > differentiate objects between different session factory.  So if I have
> > a session factory for "CompanyX" and session factory for "CompanyY"
> > the second level cache might not be able to differentiate between
> > customerxyz from first session factory and the customer xyz from the
> > second session factory.
>
> > Is that a correct understanding?  Any help will be appreciated.
>
> > Thanks.
>
> > Waqar
>
> --
> Fabio Maulo- Hide quoted text -
>
> - Show quoted text -
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"nhusers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/nhusers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to