log.debug("GET: Persistence Units:" + persistenceUnits);
sessionToken = sessionToken.replaceAll("^\"|\"$", "");
EntityManager em = EMRepository.INSTANCE.getEM(sessionToken);
StringTokenizer st = new StringTokenizer(persistenceUnits, ",");
EntityManagerFactoryImpl emfImpl = (EntityManagerFactoryImpl) em.getEntityManagerFactory();
SchemaMetadata schemaMetadata = new SchemaMetadata();
String mediaType = headers != null && headers.getRequestHeaders().containsKey("Content-type")? headers.getRequestHeader("Content-type").get(0) : MediaType.APPLICATION_JSON;
mediaType =
mediaType.equalsIgnoreCase(MediaType.APPLICATION_XML) ? MediaType.APPLICATION_XML
: MediaType.APPLICATION_JSON;
while (st.hasMoreTokens()) {
String persistenceUnit = st.nextToken();
PersistenceUnitMetadata puMetadata =
emfImpl.getKunderaMetadataInstance().getApplicationMetadata()
.getPersistenceUnitMetadata(persistenceUnit);
String schemaStr = puMetadata.getProperty("kundera.keyspace");
if (schemaStr != null) {
Schema schema = new Schema();