2 Replies Latest reply on Nov 9, 2011 4:02 AM by Galder Zamarreño

    Infinispan as a shared cache among applications

    Deibys Quintero Newbie

      Hi guys,

       

      I am a newbie in this , so apologies if it is basic stuff.

       

      In my enterpise I will have different applications, they might be wars applications, EJBs, ESBs workflows..etc  .  I want to establish a data cache that will be shared among these different applications,   I could possibly cache java objects , as well "plain objects" like String , Integer....etc.

      The cache should also expiration time, so that a value will be valid only if is "still-alive" time is valid.

       

      I would really appreciate if you provide with mock-ups of code

       

      Questions:

      ----------------

       

      1) What is the best pattern/approach for establishing different caches ? should their elements be grouped based on the data source, so that implementing refresh od data elements might be easy ?

       

      2) How should the cache be implemented ? As a stand-alone application running outside of each of the wars/ejbs etc?

       

      3)  How can I make that the same cache could be accesible from different applications ? Please consider the wars/ejbs example that lie on the same applications server  , how can they access the same cache ? Please provide example

       

      4) Similar to above questions, but if the application that wants to access the cache lies outside of the JEE container , or in another JEE container , how can i access the cache ?

       

      5) Is it possible to access the cache from a ESB as a direct-link ?  I mean not implementing a service that the ESB could connect to