Domanda

Stiamo configurando un cluster Jboss e stiamo costruendo una soluzione cache distribuita costruita sulla cache Jboss (non può utilizzarlo come la cache del 2 ° livello in ORM Layer nel nostro caso).Vogliamo utilizzare l'invalidazione e non la replica come modalità cache.Per quanto posso vedere dopo (molto) pochi test, entrambe le soluzioni sembrano funzionare, gli oggetti vengono inseriti nella cache e gli oggetti sembrano essere sfrattati quando vengono aggiornati su uno qualsiasi server. Questo mi porta a credere che Pojocache con la strumentazione AOP sia necessaria solo quando si utilizza la replica in modo da poter replicare solo i valori del campo aggiornati e non tutti gli oggetti.Sono corretto qui o ci sono altri vantaggi con l'utilizzo di Pojocache su Treecache nel nostro scenario?E se Pojocache abbiano vantaggi, abbiamo ancora bisogno di una strumentazione AOP e di annotare le nostre entità con @Pojocachable (sì, stiamo usando jbcache 1.4.1) poiché non stiamo usando la relizione?

Saluti Jonas Heineson

È stato utile?

Soluzione

PoJoCache has the ability through AOP to:

  • only replicate changed fields and not whole objects. Makes a difference if e.g. your person object containes a huge image of the person and you only change the password
  • detect changes and thus can automatically put them on the list to be replicated.

TreeCache (plain) does not need AOP, but can thus not replicate individual fields or detect what has changed so that you need to trigger replication yourself.

If you don't replicate, those points are probably irrelevant.

IIrc, you don't need the @PojocaCacheable annotation for Pojo cache - without it, you need to specify the classes to be enhanced in a different way.

I have the feeling that if you are not replicating, the plain TreeCache will be enough.

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top