Source:
<code>public void validate() { async.validate(); singletonStore.validate(); boolean shared = attributes.attribute(SHARED).get(); boolean fetchPersistentState = attributes.attribute(FETCH_PERSISTENT_STATE).get(); boolean purgeOnStartup = attributes.attribute(PURGE_ON_STARTUP).get(); boolean preload = attributes.attribute(PRELOAD).get(); boolean transactional = attributes.attribute(TRANSACTIONAL).get(); ConfigurationBuilder builder = getBuilder(); Class storeClazz = attributes.getKlass(); <START> if (storeClazz != null && storeClazz.isAnnotationPresent(Store.class)) { <END> Store storeProps = (Store) storeClazz.getAnnotation(Store.class); if (!storeProps.shared() && shared) { throw log.nonSharedStoreConfiguredAsShared(attributes.getName()); } } if (!shared && !fetchPersistentState && !purgeOnStartup && builder.clustering().cacheMode().isClustered()) log.staleEntriesWithoutFetchPersistentStateOrPurgeOnStartup(); if (fetchPersistentState && attributes.attribute(FETCH_PERSISTENT_STATE).isModified() && clustering().cacheMode().isInvalidation()) { throw log.attributeNotAllowedInInvalidationMode(FETCH_PERSISTENT_STATE.name()); } if (shared && !preload && builder.indexing().enabled() && builder.indexing().indexLocalOnly()) log.localIndexingWithSharedCacheLoaderRequiresPreload(); if (transactional && !builder.transaction().transactionMode().isTransactional()) throw log.transactionalStoreInNonTransactionalCache(); if (transactional && builder.persistence().passivation()) throw log.transactionalStoreInPassivatedCache(); }</code><technical_language>Thinking if annotation present shared is enabled log a WARN message verify if cache store shared - in marked @Store annotation</technical_language>

Target:
public void validate() { async.validate(); singletonStore.validate(); boolean shared = attributes.attribute(SHARED).get(); boolean fetchPersistentState = attributes.attribute(FETCH_PERSISTENT_STATE).get(); boolean purgeOnStartup = attributes.attribute(PURGE_ON_STARTUP).get(); boolean preload = attributes.attribute(PRELOAD).get(); boolean transactional = attributes.attribute(TRANSACTIONAL).get(); ConfigurationBuilder builder = getBuilder(); Class storeClazz = attributes.getKlass(); if (storeClazz != null && storeClazz.isAnnotationPresent(Store.class)) { Store storeProps = (Store) storeClazz.getAnnotation(Store.class); if (!storeProps.shared() && shared) { throw log.nonSharedStoreConfiguredAsShared(attributes.getName()); } } else { log.warnStoreAnnotationMissing(attributes.getName()); } if (!shared && !fetchPersistentState && !purgeOnStartup && builder.clustering().cacheMode().isClustered()) log.staleEntriesWithoutFetchPersistentStateOrPurgeOnStartup(); if (fetchPersistentState && attributes.attribute(FETCH_PERSISTENT_STATE).isModified() && clustering().cacheMode().isInvalidation()) { throw log.attributeNotAllowedInInvalidationMode(FETCH_PERSISTENT_STATE.name()); } if (shared && !preload && builder.indexing().enabled() && builder.indexing().indexLocalOnly()) log.localIndexingWithSharedCacheLoaderRequiresPreload(); if (transactional && !builder.transaction().transactionMode().isTransactional()) throw log.transactionalStoreInNonTransactionalCache(); if (transactional && builder.persistence().passivation()) throw log.transactionalStoreInPassivatedCache(); }