{
// if pu is null and client is not rdbms OR metadata pu does not match
// with configured one. don't process for anything.
PersistenceUnitMetadata puMetadata = kunderaMetadata.getApplicationMetadata()
.getPersistenceUnitMetadata(persistenceUnit);
String keyspace = puProperties != null ? (String) puProperties.get(PersistenceProperties.KUNDERA_KEYSPACE):null;
keyspace = keyspace == null ? puMetadata.getProperty(PersistenceProperties.KUNDERA_KEYSPACE):keyspace;
if (metadata.getPersistenceUnit() != null && !metadata.getPersistenceUnit().equals(persistenceUnit)
|| (keyspace != null && metadata.getSchema() != null && !metadata.getSchema().equals(keyspace)))
{
metadata = null;