Announcement Announcement Module
Collapse

Spring Modules forum decommissioned in favor of Spring Extensions

As the Spring Modules project has been replaced by the Spring Extensions (http://www.springsource.org/extensions) project, this forum has been decommissioned in favour of Spring Extensions one at:
http://forum.springsource.org/forumdisplay.php?f=44

Please see the Spring Extensions home page for a complete list of current projects in Java, .NET and ActionScript. You can also propose one if you want.

Cheers,
Costin Leau
SpringSource - http://www.SpringSource.com- Spring Training, Consulting, and Support - "From the Source"
http://twitter.com/costinl
See more
See less
declarative caching with context specific objects Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • declarative caching with context specific objects

    (already mailed this to [email protected], but no responses there)

    I'm currently working with a vendor's closed source API.
    The vendor's software consists of a client library (including
    ServiceLocator) and a set of EJB's deployed on some server. The client
    library is the API I'm talking about.
    Now, everything on the ServiceLocator is authentication protected.
    Whenever I want to get some service, I have to call a login(user,pwd)
    method first. So everything that comes from a service is context
    specific (per-user). Even simple factories to create objects are
    context-specific. It still puzzles me why they ever implemented their
    API like that in the first place, but I'm stuck with it.

    Now the caching part. I want to cache the ServiceLocator reference
    (since logging in is expensive) and objects retrieved by some
    services. And since all objects are ServiceLocator-scoped, when the
    ServiceLocator gets flushed, all the objects that go with it should
    get flushed too.
    My guess is that I'll have to create a per-ServiceLocator cache
    instance/group. This seems possible programatically, but I want to do
    this as declarative as possible.

    Any input on this?

    Thanks!
    Robbie
Working...
X