diff --git a/JPA-RS/org.eclipse.persistence.jpars/.classpath b/JPA-RS/org.eclipse.persistence.jpars/.classpath
index 24a3bdc..a52f8c2 100644
--- a/JPA-RS/org.eclipse.persistence.jpars/.classpath
+++ b/JPA-RS/org.eclipse.persistence.jpars/.classpath
@@ -1,24 +1,11 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <classpath>
 	<classpathentry kind="src" path="src"/>
-	<classpathentry combineaccessrules="false" kind="src" path="/javax.persistence 2.0.0"/>
-	<classpathentry combineaccessrules="false" kind="src" path="/org.eclipse.persistence.antlr"/>
-	<classpathentry combineaccessrules="false" kind="src" path="/org.eclipse.persistence.asm"/>
+	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
 	<classpathentry combineaccessrules="false" kind="src" path="/org.eclipse.persistence.core"/>
 	<classpathentry combineaccessrules="false" kind="src" path="/org.eclipse.persistence.jpa"/>
-	<classpathentry combineaccessrules="false" kind="src" path="/org.eclipse.persistence.moxy"/>
-	<classpathentry kind="con" path="org.eclipse.jst.server.core.container/com.sun.enterprise.jst.server.runtimeTarget/GlassFish 3.1">
-		<attributes>
-			<attribute name="owner.project.facets" value="jst.web"/>
-		</attributes>
-	</classpathentry>
-	<classpathentry kind="con" path="org.eclipse.jst.j2ee.internal.web.container"/>
-	<classpathentry kind="con" path="org.eclipse.jst.j2ee.internal.module.container"/>
-	<classpathentry kind="con" path="org.eclipse.datatools.connectivity.jdt.DRIVERLIBRARY/Oracle Database 11g Driver Default">
-		<attributes>
-			<attribute name="org.eclipse.jst.component.nondependency" value=""/>
-		</attributes>
-	</classpathentry>
-	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
-	<classpathentry kind="output" path="build/classes"/>
+	<classpathentry combineaccessrules="false" kind="src" path="/javax.persistence 2.0.0"/>
+	<classpathentry combineaccessrules="false" kind="src" path="/javax.xml.bind-2.1.12"/>
+	<classpathentry kind="con" path="org.eclipse.jst.server.core.container/com.sun.enterprise.jst.server.runtimeTarget/GlassFish 3.1.2 2"/>
+	<classpathentry kind="output" path="classes"/>
 </classpath>
diff --git a/JPA-RS/org.eclipse.persistence.jpars/.project b/JPA-RS/org.eclipse.persistence.jpars/.project
index f54509f..ffc40b5 100644
--- a/JPA-RS/org.eclipse.persistence.jpars/.project
+++ b/JPA-RS/org.eclipse.persistence.jpars/.project
@@ -1,36 +1,17 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <projectDescription>
-	<name>JPA-RS</name>
+	<name>org.eclipse.persistence.jpars</name>
 	<comment></comment>
 	<projects>
 	</projects>
 	<buildSpec>
 		<buildCommand>
-			<name>org.eclipse.wst.jsdt.core.javascriptValidator</name>
-			<arguments>
-			</arguments>
-		</buildCommand>
-		<buildCommand>
 			<name>org.eclipse.jdt.core.javabuilder</name>
 			<arguments>
 			</arguments>
 		</buildCommand>
-		<buildCommand>
-			<name>org.eclipse.wst.common.project.facet.core.builder</name>
-			<arguments>
-			</arguments>
-		</buildCommand>
-		<buildCommand>
-			<name>org.eclipse.wst.validation.validationbuilder</name>
-			<arguments>
-			</arguments>
-		</buildCommand>
 	</buildSpec>
 	<natures>
-		<nature>org.eclipse.jem.workbench.JavaEMFNature</nature>
-		<nature>org.eclipse.wst.common.modulecore.ModuleCoreNature</nature>
-		<nature>org.eclipse.wst.common.project.facet.core.nature</nature>
 		<nature>org.eclipse.jdt.core.javanature</nature>
-		<nature>org.eclipse.wst.jsdt.core.jsNature</nature>
 	</natures>
 </projectDescription>
diff --git a/JPA-RS/org.eclipse.persistence.jpars/WebContent/META-INF/MANIFEST.MF b/JPA-RS/org.eclipse.persistence.jpars/WebContent/META-INF/MANIFEST.MF
deleted file mode 100644
index 5e94951..0000000
--- a/JPA-RS/org.eclipse.persistence.jpars/WebContent/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,3 +0,0 @@
-Manifest-Version: 1.0
-Class-Path: 
-
diff --git a/JPA-RS/org.eclipse.persistence.jpars/WebContent/WEB-INF/beans.xml b/JPA-RS/org.eclipse.persistence.jpars/WebContent/WEB-INF/beans.xml
deleted file mode 100644
index c1a058e..0000000
--- a/JPA-RS/org.eclipse.persistence.jpars/WebContent/WEB-INF/beans.xml
+++ /dev/null
@@ -1,5 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<beans xmlns="http://java.sun.com/xml/ns/javaee"
-       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-       xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/beans_1_0.xsd">
-</beans>
\ No newline at end of file
diff --git a/JPA-RS/org.eclipse.persistence.jpars/WebContent/WEB-INF/sun-web.xml b/JPA-RS/org.eclipse.persistence.jpars/WebContent/WEB-INF/sun-web.xml
deleted file mode 100644
index 0627bea..0000000
--- a/JPA-RS/org.eclipse.persistence.jpars/WebContent/WEB-INF/sun-web.xml
+++ /dev/null
@@ -1,11 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE sun-web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Application Server 9.0 Servlet 2.5//EN" "http://www.sun.com/software/appserver/dtds/sun-web-app_2_5-0.dtd">
-<sun-web-app error-url="">
-  <context-root>/jpa-rs</context-root>
-  <class-loader delegate="true"/>
-  <jsp-config>
-    <property name="keepgenerated" value="true">
-      <description>Keep a copy of the generated servlet class java code.</description>
-    </property>
-  </jsp-config>
-</sun-web-app>
diff --git a/JPA-RS/org.eclipse.persistence.jpars/WebContent/WEB-INF/web.xml b/JPA-RS/org.eclipse.persistence.jpars/WebContent/WEB-INF/web.xml
deleted file mode 100644
index 9da5e9e..0000000
--- a/JPA-RS/org.eclipse.persistence.jpars/WebContent/WEB-INF/web.xml
+++ /dev/null
@@ -1,20 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" id="WebApp_ID" version="2.5">
-  <display-name>JPA-RS POC</display-name>
-  <welcome-file-list>
-    <welcome-file>index.jsp</welcome-file>
-  </welcome-file-list>
-  <servlet>
-    <servlet-name>JPA-RS Service</servlet-name>
-    <servlet-class>com.sun.jersey.spi.container.servlet.ServletContainer</servlet-class>
-    <init-param>
-      <param-name>com.sun.jersey.config.property.packages</param-name>
-      <param-value>org.eclipse.persistence.jpa.rs</param-value>
-    </init-param>
-    <load-on-startup>1</load-on-startup>
-  </servlet>
-  <servlet-mapping>
-    <servlet-name>JPA-RS Service</servlet-name>
-    <url-pattern>/*</url-pattern>
-  </servlet-mapping>
-</web-app>
\ No newline at end of file
diff --git a/JPA-RS/org.eclipse.persistence.jpars/eclipselink.jpa-rs.properties b/JPA-RS/org.eclipse.persistence.jpars/eclipselink.jpa-rs.properties
deleted file mode 100644
index fc98da6..0000000
--- a/JPA-RS/org.eclipse.persistence.jpars/eclipselink.jpa-rs.properties
+++ /dev/null
@@ -1,18 +0,0 @@
-javax.persistence.jdbc.driver=oracle.jdbc.OracleDriver
-javax.persistence.jdbc.url=jdbc:oracle:thin:@localhost:1521:DJCLARKEORCL
-javax.persistence.jdbc.user=avatar
-javax.persistence.jdbc.password=avatar
-
-eclipselink.jdbc.read-connections.min=1
-eclipselink.jdbc.write-connections.min=1
-
-eclipselink.logging.level=CONFIG
-eclipselink.logging.connection=false
-eclipselink.logging.timestamp=false
-eclipselink.logging.thread=false
-eclipselink.logging.session=false
-eclipselink.logging.exceptions=false
-eclipselink.logging.level.sql=FINE
-eclipselink.logging.level.ejb_or_metadata=WARNING
-
-eclipselink.target-server=NONE
\ No newline at end of file
diff --git a/JPA-RS/org.eclipse.persistence.jpars/readme.txt b/JPA-RS/org.eclipse.persistence.jpars/readme.txt
deleted file mode 100644
index e847df7..0000000
--- a/JPA-RS/org.eclipse.persistence.jpars/readme.txt
+++ /dev/null
@@ -1,29 +0,0 @@
-Configuring on GlassFish
-
-- Requires Oracle DB 11.2 or better for change notification
-- Requires GlassFish 3.1.2 or better for web sockets
-- I suggest using OPEE version 12
-- Add 3.1.2 to your OPEE install if you are using GlassFish 3.1.2 or later
-  (update site: http://download.java.net/glassfish/eclipse/indigo)
-
-0)  Stop GlassFish and OEPE if running
-1)  Move the grizzly-utils.jar down a folder from GF_HOME/glassfish/modules to 
-    GF_HOME/glassfish/modules/endorsed. This works around a limitation in the 
-    OEPE GlassFish classpath configuration
-2)  Copy your oracle jdbc driver jar into GF_HOME/domains/<domain>/lib/ext
-3)  Edit GF_HOME/glassfish/osgi.properties. (GF_HOME/glassfish/osgi/felix/conf/config.properties on 3.1.1) 
-    Add oracle.jdbc.*, oracle.jdbc.dcn.* to eclipselink.bootdelegation line.
-    It will look roughly like this: eclipselink.bootdelegation=oracle.sql, oracle.sql.*, oracle.jdbc.*, oracle.jdbc.dcn.*
-4)  Delete domain OSGi caches. By default you'll have a domain1 created and caches
-    are in GF_HOME/glassfish/domains/domain1/osgi-cache
-    Start GlassFish
-5)  Enable websockets with the following asadmin (located in GF_HOME/glassfish/bin)
-    command: 
-    
-    asadmin set configs.config.server-config.network-config.protocols.protocol.http-listener-1.http.websockets-support-enabled=true
-    
-6) You can now compile and deploy websocket applications to GlassFish.
-
-
-
-    
\ No newline at end of file
diff --git a/JPA-RS/org.eclipse.persistence.jpars/src/META-INF/beans.xml b/JPA-RS/org.eclipse.persistence.jpars/src/META-INF/beans.xml
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/JPA-RS/org.eclipse.persistence.jpars/src/META-INF/beans.xml
diff --git a/JPA-RS/org.eclipse.persistence.jpars/src/org/eclipse/persistence/jpa/rs/PersistenceContext.java b/JPA-RS/org.eclipse.persistence.jpars/src/org/eclipse/persistence/jpa/rs/PersistenceContext.java
index b94173c..7122135 100644
--- a/JPA-RS/org.eclipse.persistence.jpars/src/org/eclipse/persistence/jpa/rs/PersistenceContext.java
+++ b/JPA-RS/org.eclipse.persistence.jpars/src/org/eclipse/persistence/jpa/rs/PersistenceContext.java
@@ -21,15 +21,19 @@
 import java.net.URL;
 import java.util.ArrayList;
 import java.util.HashMap;
+import java.util.HashSet;
 import java.util.Iterator;
 import java.util.List;
 import java.util.Map;
+import java.util.Set;
 
+import javax.ejb.EJB;
 import javax.persistence.EntityManager;
 import javax.persistence.EntityManagerFactory;
 import javax.persistence.Query;
 import javax.persistence.spi.PersistenceUnitInfo;
 import javax.ws.rs.core.MediaType;
+
 import org.eclipse.persistence.jaxb.JAXBContext;
 import javax.xml.bind.JAXBElement;
 import javax.xml.bind.JAXBException;
@@ -51,16 +55,19 @@
 import org.eclipse.persistence.jpa.JpaHelper;
 import org.eclipse.persistence.jpa.PersistenceProvider;
 import org.eclipse.persistence.jpa.dynamic.JPADynamicHelper;
+import org.eclipse.persistence.jpa.metadata.XMLMetadataSource;
+import org.eclipse.persistence.jpa.rs.eventlistener.DatabaseEventListenerFactory;
 import org.eclipse.persistence.jpa.rs.util.CustomSerializationMetadataSource;
+import org.eclipse.persistence.jpa.rs.util.DatabaseListener;
 import org.eclipse.persistence.jpa.rs.util.DynamicXMLMetadataSource;
 import org.eclipse.persistence.jpa.rs.util.InMemoryArchive;
+import org.eclipse.persistence.platform.database.events.DatabaseEventListener;
 import org.eclipse.persistence.queries.DatabaseQuery;
 import org.eclipse.persistence.sessions.Session;
 import org.eclipse.persistence.sessions.server.Server;
 import org.eclipse.persistence.sessions.server.ServerSession;
 
 import org.eclipse.persistence.jpa.rs.util.ChangeListener;
-import org.eclipse.persistence.jpa.rs.qcn.JPARSChangeNotificationListener;
 import org.eclipse.persistence.jpa.rs.PersistenceFactory;
 
 
@@ -73,7 +80,8 @@
 public class PersistenceContext {
     
     private static final String PACKAGE_ROOT = "jpars.app.";
-    private static final String MODEL_PACKAGE = ".model";
+    private static final String MODEL_PACKAGE = ".model";   
+    public static DatabaseEventListenerFactory EVENT_LISTENER_FACTORY = null;
     
     private String name = null;
     
@@ -83,6 +91,7 @@
     
     private URI baseURI = null;
 
+
     public PersistenceContext(Archive archive, Map<String, Object> properties, ClassLoader classLoader){
         super();
         List<SEPersistenceUnitInfo> persistenceUnits = PersistenceUnitProcessor.getPersistenceUnits(archive, classLoader);
@@ -97,15 +106,39 @@
         this.emf = emf;
        
         try{
-            JAXBContext jaxbContext = createJAXBContext(persistenceUnitInfo.getPersistenceUnitName(), emf.getServerSession());
+            JAXBContext jaxbContext = createDynamicJAXBContext(persistenceUnitInfo.getPersistenceUnitName(), emf.getServerSession());
            this.context = jaxbContext;
         } catch (Exception e){
-            e.printStackTrace();
             emf.close();
             throw new RuntimeException("JAXB Creation Exception", e);
         }
     }
     
+    @SuppressWarnings("unchecked")
+    public PersistenceContext(String emfName, EntityManagerFactoryImpl emf, URI defaultURI){
+        super();
+        this.emf = emf;
+        
+        boolean createStaticContext = true;
+        if (!emf.getServerSession().getDescriptors().isEmpty()){
+            ClassDescriptor descriptor = emf.getServerSession().getDescriptors().entrySet().iterator().next().getValue();
+            if (DynamicEntity.class.isAssignableFrom(descriptor.getJavaClass())){
+                createStaticContext = false;
+            }
+        }
+        try{
+            JAXBContext jaxbContext = null;
+            if (createStaticContext){
+                jaxbContext = createStaticJAXBContext(emfName, emf.getServerSession());
+            } else {
+                jaxbContext = createDynamicJAXBContext(emfName, emf.getServerSession());
+            }
+           this.context = jaxbContext;
+        } catch (Exception e){
+            throw new RuntimeException("JAXB Creation Exception", e);
+        }
+    }
+    
     protected EntityManagerFactoryImpl createDynamicEMF(PersistenceUnitInfo info, Map<String, ?> properties){
         PersistenceProvider provider = new PersistenceProvider();
         EntityManagerFactory emf = provider.createContainerEntityManagerFactory(info, properties);
@@ -117,25 +150,16 @@
      * @param session
      * @return
      */
-    protected JAXBContext createJAXBContext(String persistenceUnitName, Server session) throws JAXBException, IOException {
+    protected JAXBContext createDynamicJAXBContext(String persistenceUnitName, Server session) throws JAXBException, IOException {
         JAXBContext jaxbContext = (JAXBContext) session.getProperty(JAXBContext.class.getName());
         if (jaxbContext != null) {
             return jaxbContext;
         }
-        String oxmLocation = (String) emf.getProperties().get("eclipselink.jpa-rs.oxm");
-        
         String packageName = PACKAGE_ROOT + persistenceUnitName + MODEL_PACKAGE;
-        Map<String, Object> properties = new HashMap<String, Object>(1);
-        Object metadataLocation = null;
-        if (oxmLocation != null){
-            metadataLocation = new InMemoryArchive((new URL(oxmLocation)).openStream());
-        } else {
-            metadataLocation = new DynamicXMLMetadataSource(persistenceUnitName, session, packageName);
-        }
-        List<Object> metadataLocations = new ArrayList<Object>();
-        metadataLocations.add(metadataLocation);
-        metadataLocations.add(new CustomSerializationMetadataSource(persistenceUnitName, session, packageName));
-        properties.put(JAXBContextFactory.ECLIPSELINK_OXM_XML_KEY, metadataLocations);
+
+        Map<String, Object> properties = createJAXBProperties(persistenceUnitName, session, packageName);      
+
+        ((List<Object>)properties.get(JAXBContextFactory.ECLIPSELINK_OXM_XML_KEY)).add(new CustomSerializationMetadataSource(persistenceUnitName, session, packageName));
 
         ClassLoader cl = session.getPlatform().getConversionManager().getLoader();
         jaxbContext = DynamicJAXBContextFactory.createContextFromOXM(cl, properties);
@@ -145,6 +169,60 @@
         return jaxbContext;
     }
     
+    /**
+     * @param session
+     * @return
+     */
+    protected JAXBContext createStaticJAXBContext(String persistenceUnitName, Server session) throws JAXBException, IOException {
+        JAXBContext jaxbContext = (JAXBContext) session.getProperty(JAXBContext.class.getName());
+        if (jaxbContext != null) {
+            return jaxbContext;
+        }
+        Map<String, Object> properties = createJAXBProperties(persistenceUnitName, session, null);
+
+        Object[] classes = session.getDescriptors().keySet().toArray();
+        Class[] classesToBeBound = new Class[classes.length];
+        for (int i=0;i<classes.length;i++){
+            classesToBeBound[i] = (Class)classes[i];
+        }
+        jaxbContext = (JAXBContext)JAXBContextFactory.createContext(classesToBeBound, properties);
+
+        session.setProperty(JAXBContext.class.getName(), jaxbContext);
+
+        return jaxbContext;
+    }
+    
+    public Map<String, Object> createJAXBProperties(String persistenceUnitName, Server session, String dynamicPackageName) throws IOException{
+        String oxmLocation = (String) emf.getProperties().get("eclipselink.jpa-rs.oxm");
+        
+        Map<String, Object> properties = new HashMap<String, Object>(1);
+        List<Object> metadataLocations = new ArrayList<Object>();
+
+        addDynamicXMLMetadataSources(metadataLocations, persistenceUnitName, session);
+        if (oxmLocation != null){
+            metadataLocations.add(new org.eclipse.persistence.jaxb.metadata.XMLMetadataSource((new URL(oxmLocation)).openStream()));
+        }
+        properties.put(JAXBContextFactory.ECLIPSELINK_OXM_XML_KEY, metadataLocations);
+        return properties;
+    }
+    
+    public void addDynamicXMLMetadataSources(List<Object> metadataSources, String persistenceUnitName, Server session){
+        //   metadataLocation = new DynamicXMLMetadataSource(persistenceUnitName, session, dynamicPackageName);
+        Set<String> packages = new HashSet<String>();
+        Iterator<Class> i = session.getDescriptors().keySet().iterator();
+        while (i.hasNext()){
+            Class descriptorClass = i.next();
+            String packageName = descriptorClass.getName().substring(0, descriptorClass.getName().lastIndexOf('.'));
+            if (!packages.contains(packageName)){
+                packages.add(packageName);
+            }
+        }
+        
+        for(String packageName: packages){
+            metadataSources.add(new DynamicXMLMetadataSource(persistenceUnitName, session, packageName));
+        }
+    }
+    
     public String getName() {
         return name;
     }
@@ -165,7 +243,7 @@
         this.baseURI = baseURI;
     }
 
-    public void create(String tenantId, DynamicEntity entity) {
+    public void create(String tenantId, Object entity) {
         EntityManager em = getEmf().createEntityManager();
 
         try {
@@ -177,22 +255,23 @@
         }
     }
 
-    public DynamicEntity merge(String type, String tenantId, DynamicEntity entity) {
+    public Object merge(String type, String tenantId, Object entity) {
         EntityManager em = getEmf().createEntityManager();
-        DynamicEntity mergedEntity = null;
+        Object mergedEntity = null;
         try {
             em.getTransaction().begin();
             
             if (isList(type)){
-                mergedEntity = newEntity(type);
+                DynamicEntity mergedDynamic = (DynamicEntity)newEntity(type);
                 List<Object> returnValues = new ArrayList<Object>();
-                mergedEntity.set("list", returnValues);
+                mergedDynamic.set("list", returnValues);
                 @SuppressWarnings("unchecked")
-                List<Object> values = (List<Object>)entity.get("list");
+                List<Object> values = (List<Object>)((DynamicEntity)entity).get("list");
                 for (Object value: values){
                     Object merged = em.merge(value);
                     returnValues.add(merged);
                 }
+                mergedEntity = mergedDynamic;
             } else {
                 mergedEntity = em.merge(entity);
             }
@@ -240,7 +319,7 @@
     /**
      * TODO
      */
-    public void save(String tenantId, DynamicEntity entity) {
+    public void save(String tenantId, Object entity) {
         EntityManager em = getEmf().createEntityManager();
 
         try {
@@ -260,7 +339,7 @@
 
         try {
             em.getTransaction().begin();
-            DynamicEntity entity = (DynamicEntity)em.find(getClass(type), id);
+            Object entity = em.find(getClass(type), id);
             em.remove(entity);
             em.getTransaction().commit();
         } finally {
@@ -277,19 +356,19 @@
         this.context = null;
     }
 
-    public DynamicEntity find(String entityName, Object id) {
+    public Object find(String entityName, Object id) {
         return find(null, entityName, id);
     }
 
-    public DynamicEntity find(String tenantId, String entityName, Object id) {
+    public Object find(String tenantId, String entityName, Object id) {
         return find(tenantId, entityName, id, null);
     }
     
-    public DynamicEntity find(String tenantId, String entityName, Object id, Map<String, Object> properties) {
+    public Object find(String tenantId, String entityName, Object id, Map<String, Object> properties) {
         EntityManager em = getEmf().createEntityManager();
 
         try {
-            return (DynamicEntity) em.find(getClass(entityName), id, properties);
+            return em.find(getClass(entityName), id, properties);
         } finally {
             em.close();
         }
@@ -318,11 +397,11 @@
     }
 
     public Object query(String name, Map<?, ?> parameters) {
-        return query(name, parameters, false);
+        return query(name, parameters, null, false);
     }
     
     @SuppressWarnings("rawtypes")
-    public Object query(String name, Map<?, ?> parameters, boolean returnSingleResult) {
+    public Object query(String name, Map<?, ?> parameters, Map<String, ?> hints, boolean returnSingleResult) {
         EntityManager em = getEmf().createEntityManager();
         try{
             Query query = em.createNamedQuery(name);
@@ -343,6 +422,11 @@
                     query.setParameter(key, parameter);
                 }
             }
+            if (hints != null){
+                for (String key:  hints.keySet()){
+                    query.setHint(key, hints.get(key));
+                }
+            }
             if (returnSingleResult){
                 return query.getSingleResult();
             } else {
@@ -356,7 +440,7 @@
         return null;
     }
     
-    public DynamicEntity unmarshalEntity(String entityName, String tenantId, String acceptedMedia, InputStream in) throws JAXBException {
+    public Object unmarshalEntity(String entityName, String tenantId, String acceptedMedia, InputStream in) throws JAXBException {
         Unmarshaller unmarshaller = getJAXBContext().createUnmarshaller();
         if (acceptedMedia == null || acceptedMedia.indexOf(MediaType.APPLICATION_JSON) < 0) {
             unmarshaller.setProperty(MEDIA_TYPE, MediaType.APPLICATION_JSON);
@@ -365,7 +449,7 @@
             unmarshaller.setProperty(MEDIA_TYPE, MediaType.APPLICATION_XML);
         }
         JAXBElement<?> element = unmarshaller.unmarshal(new StreamSource(in), getClass(entityName));
-		return (DynamicEntity) element.getValue();
+		return element.getValue();
     }
 
     protected EntityManager createEntityManager(String tenantId) {
@@ -376,7 +460,7 @@
      * TODO
      */
     public void addListener(ChangeListener listener) {
-        JPARSChangeNotificationListener changeListener = (JPARSChangeNotificationListener) JpaHelper.getDatabaseSession(getEmf()).getProperty(PersistenceFactory.CHANGE_NOTIFICATION_LISTENER);
+        DatabaseListener changeListener = (DatabaseListener) JpaHelper.getDatabaseSession(getEmf()).getProperty(PersistenceFactory.CHANGE_NOTIFICATION_LISTENER);
         if (changeListener == null) {
             throw new RuntimeException("Change Listener not registered properly");
         }
@@ -387,24 +471,34 @@
      * TODO
      */
     public void remove(ChangeListener listener) {
-        JPARSChangeNotificationListener changeListener = (JPARSChangeNotificationListener) JpaHelper.getDatabaseSession(getEmf()).getProperty(PersistenceFactory.CHANGE_NOTIFICATION_LISTENER);
+        DatabaseListener changeListener = (DatabaseListener) JpaHelper.getDatabaseSession(getEmf()).getProperty(PersistenceFactory.CHANGE_NOTIFICATION_LISTENER);
         if (changeListener != null) {
             changeListener.removeChangeListener(listener);
         }
     }
     
-    public static JPARSChangeNotificationListener subscribeToEventNotification(EntityManagerFactory emf) {
-        ServerSession session = (ServerSession) JpaHelper.getServerSession(emf);
-        Iterator<ClassDescriptor> i = session.getDescriptors().values().iterator();
-        JPARSChangeNotificationListener listener = new JPARSChangeNotificationListener();
-        session.setDatabaseEventListener(listener);
-        while (i.hasNext()) {
-            ClassDescriptor descriptor = i.next();
-            listener.initialize(descriptor, session);
+    public static DatabaseEventListener subscribeToEventNotification(EntityManagerFactory emf) {
+        DatabaseEventListener listener = null;
+        if (EVENT_LISTENER_FACTORY != null){
+            listener = EVENT_LISTENER_FACTORY.createDatabaseEventListener();
+            ServerSession session = (ServerSession) JpaHelper.getServerSession(emf);
+            Iterator<ClassDescriptor> i = session.getDescriptors().values().iterator();
+            session.setDatabaseEventListener(listener);
+            System.out.println("--- Subscribe set Listener " + listener);
+
+            while (i.hasNext()) {
+                ClassDescriptor descriptor = i.next();
+                listener.initialize(descriptor, session);
+            }
+            listener.register(session);
+            session.setProperty(PersistenceFactory.CHANGE_NOTIFICATION_LISTENER, listener);
         }
-        listener.register(session);
-        session.setProperty(PersistenceFactory.CHANGE_NOTIFICATION_LISTENER, listener);
         return listener;
     }
 
+    public static void setEventListenerFactory(
+            DatabaseEventListenerFactory eventListenerFactory) {
+        EVENT_LISTENER_FACTORY = eventListenerFactory;
+    }
+
 }
diff --git a/JPA-RS/org.eclipse.persistence.jpars/src/org/eclipse/persistence/jpa/rs/PersistenceFactory.java b/JPA-RS/org.eclipse.persistence.jpars/src/org/eclipse/persistence/jpa/rs/PersistenceFactory.java
index 839c961..3bc1fe4 100644
--- a/JPA-RS/org.eclipse.persistence.jpars/src/org/eclipse/persistence/jpa/rs/PersistenceFactory.java
+++ b/JPA-RS/org.eclipse.persistence.jpars/src/org/eclipse/persistence/jpa/rs/PersistenceFactory.java
@@ -15,17 +15,23 @@
 import java.io.ByteArrayInputStream;
 import java.io.IOException;
 import java.io.InputStream;
+import java.net.URI;
 import java.net.URL;
 import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
 import java.util.Set;
 
+import javax.ejb.EJB;
 import javax.ejb.Singleton;
+import javax.persistence.EntityManagerFactory;
+import javax.persistence.Persistence;
 
 import org.eclipse.persistence.config.PersistenceUnitProperties;
 import org.eclipse.persistence.dynamic.DynamicClassLoader;
+import org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl;
 import org.eclipse.persistence.jpa.Archive;
+import org.eclipse.persistence.jpa.rs.eventlistener.DatabaseEventListenerFactory;
 import org.eclipse.persistence.jpa.rs.metadata.Application;
 import org.eclipse.persistence.jpa.rs.metadata.MetadataStore;
 import org.eclipse.persistence.jpa.rs.util.InMemoryArchive;
@@ -45,6 +51,8 @@
 	private Map<String, PersistenceContext> persistenceContexts = new HashMap<String, PersistenceContext>();
     
     private MetadataStore metadataStore;
+    
+    private DatabaseEventListenerFactory eventListenerFactory;
 	
     public PersistenceFactory(){
     }
@@ -92,6 +100,7 @@
         if (persistenceContext == null || replace){
             DynamicClassLoader dcl = new DynamicClassLoader(Thread.currentThread().getContextClassLoader());
             Map<String, Object> properties = createProperties(dcl, originalProperties);
+            properties.putAll(originalProperties);
             persistenceContext = new PersistenceContext(archive, properties, dcl);
     
             persistenceContexts.put(name, persistenceContext);
@@ -105,9 +114,24 @@
         return persistenceContext;
     }
     
-    public PersistenceContext getPersistenceContext(String name){
+    public PersistenceContext bootstrapPersistenceContext(String name, EntityManagerFactory emf, URI baseURI, boolean replace){
         initialize();
-    	return persistenceContexts.get(name);
+        PersistenceContext persistenceContext = null;
+        if (!replace){
+            persistenceContext = getPersistenceContext(name);
+        }
+        if (persistenceContext == null){
+            persistenceContext = new PersistenceContext(name, (EntityManagerFactoryImpl)emf, baseURI);
+            persistenceContexts.put(name, persistenceContext);
+        }
+        persistenceContext.setBaseURI(baseURI);
+        return persistenceContext;
+    }
+ 
+    
+    public synchronized PersistenceContext getPersistenceContext(String name){
+        initialize();
+        return persistenceContexts.get(name);
     }
     
     public Set<String> getPersistenceContextNames(){
@@ -166,4 +190,14 @@
         this.metadataStore = metadataStore;
     }
     
+
+    public DatabaseEventListenerFactory getEventListenerFactory() {
+        return eventListenerFactory;
+    }
+
+    public void setEventListenerFactory(
+            DatabaseEventListenerFactory eventListenerFactory) {
+        this.eventListenerFactory = eventListenerFactory;
+    }
+    
 }
diff --git a/JPA-RS/org.eclipse.persistence.jpars/src/org/eclipse/persistence/jpa/rs/Service.java b/JPA-RS/org.eclipse.persistence.jpars/src/org/eclipse/persistence/jpa/rs/Service.java
index 309cb8a..7851aa5 100644
--- a/JPA-RS/org.eclipse.persistence.jpars/src/org/eclipse/persistence/jpa/rs/Service.java
+++ b/JPA-RS/org.eclipse.persistence.jpars/src/org/eclipse/persistence/jpa/rs/Service.java
@@ -29,6 +29,8 @@
 import javax.annotation.PreDestroy;
 import javax.ejb.EJB;
 import javax.ejb.Singleton;
+import javax.persistence.EntityManagerFactory;
+import javax.persistence.Persistence;
 import javax.ws.rs.Consumes;
 import javax.ws.rs.GET;
 import javax.ws.rs.POST;
@@ -55,6 +57,7 @@
 
 import org.eclipse.persistence.config.PersistenceUnitProperties;
 import org.eclipse.persistence.descriptors.ClassDescriptor;
+import org.eclipse.persistence.dynamic.DynamicClassLoader;
 import org.eclipse.persistence.dynamic.DynamicEntity;
 import org.eclipse.persistence.jpa.JpaHelper;
 import org.eclipse.persistence.jpa.rs.metadata.DatabaseMetadataStore;
@@ -135,18 +138,20 @@
     public Response bootstrap(@PathParam("context") String persistenceUnit, @PathParam("type") String type, @Context HttpHeaders hh, @Context UriInfo uriInfo, InputStream in){
         ResponseBuilder rb = new ResponseBuilderImpl();
         String urlString = getURL(hh);
+
         PersistenceContext persistenceContext = null;
         boolean replace = false;
         List<String> replaceValues = hh.getRequestHeader("replace");
         if (replaceValues != null && replaceValues.size() > 0){
             replace = Boolean.getBoolean(replaceValues.get(0));
         }
+        Map<String, Object> properties = new HashMap<String, Object>();
         try{
             if (urlString != null){
                 URL url = new URL(urlString);
-                persistenceContext = factory.bootstrapPersistenceContext(persistenceUnit, url, new HashMap<String, Object>(), replace);
+                persistenceContext = factory.bootstrapPersistenceContext(persistenceUnit, url, properties, replace);
             } else {
-                persistenceContext = factory.bootstrapPersistenceContext(persistenceUnit, in, new HashMap<String, Object>(), replace);
+                persistenceContext = factory.bootstrapPersistenceContext(persistenceUnit, in, properties, replace);
             }
        } catch (Exception e){
             e.printStackTrace();
@@ -163,9 +168,9 @@
     @GET
     @Path("{context}")
     @Consumes({ MediaType.WILDCARD})
-    public Response getTypes(@PathParam("context") String persistenceUnit, @Context HttpHeaders hh) {
+    public Response getTypes(@PathParam("context") String persistenceUnit, @Context HttpHeaders hh, @Context UriInfo uriInfo) {
         ResponseBuilder rb = new ResponseBuilderImpl();
-        PersistenceContext app = get(persistenceUnit);
+        PersistenceContext app = get(persistenceUnit, uriInfo.getBaseUri());
         if (app == null){
             rb.status(Status.NOT_FOUND);
         } else {
@@ -199,7 +204,7 @@
     @GET
     @Path("{context}/entity/{type}")
     public Response find(@PathParam("context") String persistenceUnit, @PathParam("type") String type, @Context HttpHeaders hh, @Context UriInfo ui) {
-        PersistenceContext app = get(persistenceUnit);
+        PersistenceContext app = get(persistenceUnit, ui.getBaseUri());
         Object id = IdHelper.buildId(app, type, ui.getQueryParameters());
 
         Object entity = app.find(getTenantId(hh), type, id);
@@ -215,8 +220,8 @@
 
     @PUT
     @Path("{context}/entity/{type}")
-    public Response create(@PathParam("context") String persistenceUnit, @PathParam("type") String type, @Context HttpHeaders hh, InputStream in) {
-        PersistenceContext app = get(persistenceUnit);
+    public Response create(@PathParam("context") String persistenceUnit, @PathParam("type") String type, @Context HttpHeaders hh, @Context UriInfo uriInfo, InputStream in) {
+        PersistenceContext app = get(persistenceUnit, uriInfo.getBaseUri());
         DynamicEntity entity = unmarshalEntity(app, type, getTenantId(hh), mediaType(hh.getAcceptableMediaTypes()), in);
         app.create(getTenantId(hh), entity);
 
@@ -228,11 +233,11 @@
 
     @POST
     @Path("{context}/entity/{type}")
-    public StreamingOutput update(@PathParam("context") String persistenceUnit, @PathParam("type") String type, @Context HttpHeaders hh, InputStream in) {
-        PersistenceContext app = get(persistenceUnit);
+    public StreamingOutput update(@PathParam("context") String persistenceUnit, @PathParam("type") String type, @Context HttpHeaders hh, @Context UriInfo uriInfo, InputStream in) {
+        PersistenceContext app = get(persistenceUnit, uriInfo.getBaseUri());
         String tenantId = getTenantId(hh);
         MediaType contentType = mediaType(hh.getRequestHeader(HttpHeaders.CONTENT_TYPE)); 
-        DynamicEntity entity = unmarshalEntity(app, type, tenantId, contentType, in);
+        Object entity = unmarshalEntity(app, type, tenantId, contentType, in);
         entity = app.merge(type, tenantId, entity);
         return new StreamingOutputMarshaller(app, entity, hh.getAcceptableMediaTypes());
     }
@@ -240,8 +245,13 @@
     @GET
     @Path("{context}/query/{name}")
     public StreamingOutput namedQuery(@PathParam("context") String persistenceUnit, @PathParam("name") String name, @Context HttpHeaders hh, @Context UriInfo ui) {
-        PersistenceContext app = get(persistenceUnit);
-        Object result = app.query(name, Service.getParameterMap(ui), false);
+long millis = System.currentTimeMillis();
+        System.out.println("Start Named Query " + name);
+        PersistenceContext app = get(persistenceUnit, ui.getBaseUri());
+        Object result = app.query(name, Service.getParameterMap(ui), Service.getHintMap(ui), false);
+
+
+        System.out.println("Named Query " + name + " Marshalling. time: " + (System.currentTimeMillis() - millis));
         return new StreamingOutputMarshaller(app, result, hh.getAcceptableMediaTypes());
     }
     
@@ -249,8 +259,8 @@
     @Path("{context}/singleResultQuery/{name}")
     @Produces(MediaType.WILDCARD)
     public StreamingOutput namedQuerySingleResult(@PathParam("context") String persistenceUnit, @PathParam("name") String name, @Context HttpHeaders hh, @Context UriInfo ui) {
-        PersistenceContext app = get(persistenceUnit);
-        Object result = app.query(name, Service.getParameterMap(ui), true);
+        PersistenceContext app = get(persistenceUnit, ui.getBaseUri());
+        Object result = app.query(name, Service.getParameterMap(ui), Service.getHintMap(ui), true);
         return new StreamingOutputMarshaller(app, result, hh.getAcceptableMediaTypes());
     }
 
@@ -271,15 +281,35 @@
         return parameters;
     }
     
+    private static Map<String, Object> getHintMap(UriInfo info){
+        Map<String, Object> hints = new HashMap<String, Object>();
+         for(String key :  info.getQueryParameters().keySet()) { 
+            hints.put(key, info.getQueryParameters().getFirst(key));  
+        }
+        return hints;
+    }
+    
     @GET
     @Path("{context}/query")
     public StreamingOutput adhocQuery(@PathParam("context") String persistenceUnit, @Context HttpHeaders hh, @Context UriInfo ui) {
         throw new WebApplicationException(Status.SERVICE_UNAVAILABLE);
     }
 
-    private PersistenceContext get(String persistenceUnit) {
+    private PersistenceContext get(String persistenceUnit, URI defaultURI) {
         PersistenceContext app = getPersistenceFactory().getPersistenceContext(persistenceUnit);
 
+        if (app == null){
+            try{
+                DynamicClassLoader dcl = new DynamicClassLoader(Thread.currentThread().getContextClassLoader());
+                Map<String, Object> properties = new HashMap<String, Object>();
+                properties.put(PersistenceUnitProperties.CLASSLOADER, dcl);
+                EntityManagerFactory factory = Persistence.createEntityManagerFactory(persistenceUnit, properties);
+                if (factory != null){
+                    app = getPersistenceFactory().bootstrapPersistenceContext(persistenceUnit, factory, defaultURI, true);
+                }
+            } catch (Exception e){}
+        }
+        
         if (app == null) {
             throw new WebApplicationException(Status.NOT_FOUND);
         }
@@ -309,6 +339,7 @@
             throw new WebApplicationException(Status.BAD_REQUEST);
         }
     }
+
     
     private String getURL(HttpHeaders hh){
         List<String> persistenceXmlURLs = hh.getRequestHeader("persistenceXmlURL");
@@ -320,7 +351,7 @@
         }
         return persistenceXmlURLs.get(0);
     }
-    
+
     @PreDestroy
     public void close() {
         factory.close();
diff --git a/JPA-RS/org.eclipse.persistence.jpars/src/org/eclipse/persistence/jpa/rs/eventlistener/DatabaseEventListenerFactory.java b/JPA-RS/org.eclipse.persistence.jpars/src/org/eclipse/persistence/jpa/rs/eventlistener/DatabaseEventListenerFactory.java
new file mode 100644
index 0000000..2e5b1fd
--- /dev/null
+++ b/JPA-RS/org.eclipse.persistence.jpars/src/org/eclipse/persistence/jpa/rs/eventlistener/DatabaseEventListenerFactory.java
@@ -0,0 +1,9 @@
+package org.eclipse.persistence.jpa.rs.eventlistener;
+
+import org.eclipse.persistence.platform.database.events.DatabaseEventListener;
+
+public interface DatabaseEventListenerFactory {
+    
+    public DatabaseEventListener createDatabaseEventListener();
+
+}
diff --git a/JPA-RS/org.eclipse.persistence.jpars/src/org/eclipse/persistence/jpa/rs/qcn/JPARSChangeNotificationListener.java b/JPA-RS/org.eclipse.persistence.jpars/src/org/eclipse/persistence/jpa/rs/qcn/JPARSChangeNotificationListener.java
deleted file mode 100644
index da645ba..0000000
--- a/JPA-RS/org.eclipse.persistence.jpars/src/org/eclipse/persistence/jpa/rs/qcn/JPARSChangeNotificationListener.java
+++ /dev/null
@@ -1,232 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2011 Oracle. All rights reserved.
- * This program and the accompanying materials are made available under the 
- * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0 
- * which accompanies this distribution. 
- * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html
- * and the Eclipse Distribution License is available at 
- * http://www.eclipse.org/org/documents/edl-v10.php.
- *
- * Contributors:
- * 		tware - initial 
- ******************************************************************************/
-package org.eclipse.persistence.jpa.rs.qcn;
-
-import java.sql.SQLException;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Properties;
-import java.util.Set;
-
-import oracle.jdbc.OracleStatement;
-import oracle.jdbc.driver.OracleConnection;
-
-import org.eclipse.persistence.annotations.DatabaseChangeNotificationType;
-import org.eclipse.persistence.descriptors.CacheIndex;
-import org.eclipse.persistence.descriptors.ClassDescriptor;
-import org.eclipse.persistence.descriptors.DescriptorEvent;
-import org.eclipse.persistence.descriptors.DescriptorEventAdapter;
-import org.eclipse.persistence.exceptions.DatabaseException;
-import org.eclipse.persistence.internal.databaseaccess.Accessor;
-import org.eclipse.persistence.internal.expressions.SQLSelectStatement;
-import org.eclipse.persistence.internal.helper.DatabaseField;
-import org.eclipse.persistence.internal.helper.DatabaseTable;
-import org.eclipse.persistence.internal.identitymaps.CacheId;
-import org.eclipse.persistence.internal.identitymaps.CacheKey;
-import org.eclipse.persistence.internal.sessions.AbstractRecord;
-import org.eclipse.persistence.internal.sessions.AbstractSession;
-import org.eclipse.persistence.logging.SessionLog;
-import org.eclipse.persistence.mappings.DatabaseMapping;
-import org.eclipse.persistence.queries.ValueReadQuery;
-import org.eclipse.persistence.sessions.Session;
-
-import org.eclipse.persistence.jpa.rs.util.ChangeListener;
-
-/**
- * TODO
- * 
- * @author tware
- * @since EclipseLink 2.4.0
- */
-public class JPARSChangeNotificationListener extends  org.eclipse.persistence.platform.database.oracle.dcn.OracleChangeNotificationListener {
-    
-	public Set<ChangeListener> changeListeners = null;
-	
-    public JPARSChangeNotificationListener() {
-        super();
-        changeListeners = new HashSet<ChangeListener>();
-    }
-    
-    public void addChangeListener(ChangeListener changeListener){
-    	changeListeners.add(changeListener);
-    }
-    
-    public Set<ChangeListener> getChangeListeners(){
-    	return changeListeners;
-    }
-    
-    public void remove(Session session) {
-        super.remove(session);
-    }
-    
-    /**
-     * INTERNAL:
-     * Register the event listener with the database.
-     */
-    public void register(Session session) {
-        final AbstractSession databaseSession = (AbstractSession)session;
-        // Determine which tables should be tracked for change events.
-        this.descriptorsByTable = new HashMap<DatabaseTable, ClassDescriptor>();
-        for (ClassDescriptor descriptor : session.getDescriptors().values()) {
-            if (!descriptor.getTables().isEmpty()) {
-                if ((descriptor.getCachePolicy().getDatabaseChangeNotificationType() != null)
-                            && (descriptor.getCachePolicy().getDatabaseChangeNotificationType() != DatabaseChangeNotificationType.NONE)) {
-                    this.descriptorsByTable.put(descriptor.getTables().get(0), descriptor);
-                }
-            }
-        }
-        Accessor accessor = databaseSession.getAccessor();
-        accessor.incrementCallCount(databaseSession);
-        try {
-            OracleConnection connection = (OracleConnection)databaseSession.getServerPlatform().unwrapConnection(accessor.getConnection());
-            databaseSession.log(SessionLog.FINEST, SessionLog.CONNECTION, "dcn_registering");
-            Properties properties = new Properties();
-            properties.setProperty(OracleConnection.DCN_NOTIFY_ROWIDS, "true");
-            properties.setProperty(OracleConnection.DCN_IGNORE_INSERTOP, "false");
-            try {
-                // Register with the database change notification, the connection is not relevant, the events occur after the connection is closed,
-                // and a different connection can be used to unregister the event listener.
-                this.register = connection.registerDatabaseChangeNotification(properties);
-                final List<DatabaseField> fields = new ArrayList<DatabaseField>();
-                fields.add(new DatabaseField(ROWID));
-                this.register.addListener(new JPARSDatabaseChangeListener(this, databaseSession));
-                // Register each table for database events, this is done by executing a select from the table.
-                for (DatabaseTable table : this.descriptorsByTable.keySet()) {
-                    OracleStatement statement = (OracleStatement)connection.createStatement();
-                    statement.setDatabaseChangeRegistration(this.register);                
-                    try {
-                        statement.executeQuery("SELECT ROWID FROM " + table.getQualifiedName()).close();
-                        databaseSession.log(SessionLog.FINEST, SessionLog.CONNECTION, "dcn_register_table", table.getQualifiedName());
-                    } catch (Exception failed) {
-                        // This will fail if the table does not exist,
-                        // just log the error to allow table creation to work.
-                        databaseSession.logThrowable(SessionLog.WARNING, SessionLog.SQL, failed);
-                    } finally {
-                        statement.close();
-                    }
-                }
-            } catch (SQLException exception) {
-                throw DatabaseException.sqlException(exception, databaseSession.getAccessor(), databaseSession, false);
-            }
-        } finally {
-            accessor.decrementCallCount();
-        }
-    }
-    
-    /**
-     * Initialize the descriptor to receive database change events.
-     * This is called when the descriptor is initialized.
-     */
-    public void initialize(final ClassDescriptor descriptor, AbstractSession session) {
-        if (descriptor.getOptimisticLockingPolicy() == null) {
-            boolean requiresLocking = descriptor.hasMultipleTables();
-            for (DatabaseMapping mapping : descriptor.getMappings()) {
-                if (mapping.isCollectionMapping()) {
-                    requiresLocking = true;
-                }
-            }
-            if (requiresLocking) {
-                session.log(SessionLog.WARNING, SessionLog.EJB_OR_METADATA, "locking_required_for_database_change_notification", descriptor.getJavaClass());
-            }
-        }
-        final DatabaseField rowId = descriptor.buildField(new DatabaseField(ROWID));
-        final List<DatabaseField> fields = new ArrayList<DatabaseField>();
-        fields.add(rowId);
-        // May already have the index if has inheritance.
-        CacheIndex existingIndex = descriptor.getCachePolicy().getCacheIndex(fields);
-        if (existingIndex == null) {
-            if (descriptor.isChildDescriptor()) {
-                existingIndex = descriptor.getInheritancePolicy().getRootParentDescriptor().getCachePolicy().getCacheIndex(fields);
-            }
-            if (existingIndex == null) {
-                existingIndex = new CacheIndex(fields);
-                existingIndex.setIsUpdatable(false);
-                existingIndex.setIsInsertable(false);
-            }
-            descriptor.getCachePolicy().addCacheIndex(existingIndex);
-        }
-        
-        final CacheIndex index = existingIndex;
-        rowId.setInsertable(false);
-        rowId.setUpdatable(false);
-        rowId.setCreatable(false);
-        descriptor.getFields().add(rowId);
-        descriptor.getAllFields().add(rowId);
-        
-        final ValueReadQuery rowIdQuery = new ValueReadQuery();
-        rowIdQuery.setName(ROWID);
-        SQLSelectStatement sqlStatement = new SQLSelectStatement();
-        sqlStatement.setWhereClause(descriptor.getObjectBuilder().getPrimaryKeyExpression());
-        sqlStatement.addField(rowId);
-        sqlStatement.addTable(descriptor.getTables().get(0));
-        rowIdQuery.setSQLStatement(sqlStatement);
-        sqlStatement.normalize(session, null);
-        
-        descriptor.getEventManager().addListener(new DescriptorEventAdapter() {
-            @Override
-            public void postMerge(DescriptorEvent event) {
-                if ((event.getChangeSet() != null) && event.getChangeSet().hasChanges()) {
-                    Object id = event.getChangeSet().getId();
-                    CacheKey cacheKey = event.getChangeSet().getActiveCacheKey();
-                    if (cacheKey == null) {
-                        cacheKey = event.getSession().getParent().getIdentityMapAccessorInstance().getIdentityMapManager().getCacheKeyForObject(id, descriptor.getJavaClass(), descriptor, false);
-                     }
-                    cacheKey.setTransactionId(event.getSession().getProperty(ORA_TRANSACTION_ID));
-                    if (event.getChangeSet().isNew()) {
-                        AbstractRecord row = descriptor.getObjectBuilder().buildRowFromPrimaryKeyValues(id, event.getSession());
-                        Object rowid = event.getSession().executeQuery(rowIdQuery, row);
-                        CacheId indexValue = new CacheId(new Object[]{rowid});
-                        event.getSession().getParent().getIdentityMapAccessorInstance().getIdentityMapManager().putCacheKeyByIndex(index, indexValue, cacheKey, descriptor);
-                    }
-                }
-            }
-            @Override
-            public void postUpdate(DescriptorEvent event) {
-                Object txId = event.getSession().getProperty(ORA_TRANSACTION_ID);
-                if (txId == null) {
-                    txId = event.getSession().executeQuery(transactionIdQuery);
-                    event.getSession().setProperty(ORA_TRANSACTION_ID, txId);
-                }
-            }
-            
-            @Override
-            public void postInsert(DescriptorEvent event) {
-                Object txId = event.getSession().getProperty(ORA_TRANSACTION_ID);
-                if (txId == null) {
-                    txId = event.getSession().executeQuery(transactionIdQuery);
-                    event.getSession().setProperty(ORA_TRANSACTION_ID, txId);
-                }
-            }
-        });
-    }
-    
-    
-    public void removeChangeListener(ChangeListener changeListener){
-    	changeListeners.remove(changeListener);
-    }
-    
-    public void objectUpdated(Object object){
-    	for (ChangeListener listener: changeListeners){
-    		listener.objectUpdated(object);
-    	}
-    }
-    
-    public void objectInserted(Object object){
-    	for (ChangeListener listener: changeListeners){
-        	listener.objectInserted(object);
-    	}
-    }
-
-}
diff --git a/JPA-RS/org.eclipse.persistence.jpars/src/org/eclipse/persistence/jpa/rs/qcn/JPARSDatabaseChangeListener.java b/JPA-RS/org.eclipse.persistence.jpars/src/org/eclipse/persistence/jpa/rs/qcn/JPARSDatabaseChangeListener.java
deleted file mode 100644
index 72ef625..0000000
--- a/JPA-RS/org.eclipse.persistence.jpars/src/org/eclipse/persistence/jpa/rs/qcn/JPARSDatabaseChangeListener.java
+++ /dev/null
@@ -1,91 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2011 Oracle. All rights reserved.
- * This program and the accompanying materials are made available under the 
- * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0 
- * which accompanies this distribution. 
- * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html
- * and the Eclipse Distribution License is available at 
- * http://www.eclipse.org/org/documents/edl-v10.php.
- *
- * Contributors:
- * 		dclarke/tware - initial 
- *      tware
- ******************************************************************************/
-package org.eclipse.persistence.jpa.rs.qcn;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.persistence.descriptors.CacheIndex;
-import org.eclipse.persistence.descriptors.ClassDescriptor;
-import org.eclipse.persistence.expressions.Expression;
-import org.eclipse.persistence.expressions.ExpressionBuilder;
-import org.eclipse.persistence.internal.helper.DatabaseField;
-import org.eclipse.persistence.internal.helper.DatabaseTable;
-import org.eclipse.persistence.internal.identitymaps.CacheId;
-import org.eclipse.persistence.internal.identitymaps.CacheKey;
-import org.eclipse.persistence.internal.sessions.AbstractSession;
-import org.eclipse.persistence.logging.SessionLog;
-import org.eclipse.persistence.platform.database.oracle.dcn.OracleChangeNotificationListener;
-import org.eclipse.persistence.queries.ReadObjectQuery;
-
-import oracle.jdbc.dcn.DatabaseChangeEvent;
-import oracle.jdbc.dcn.DatabaseChangeListener;
-import oracle.jdbc.dcn.RowChangeDescription;
-import oracle.jdbc.dcn.TableChangeDescription;
-import oracle.jdbc.dcn.RowChangeDescription.RowOperation;
-
-/**
- * TODO
- * 
- * @author tware
- * @since EclipseLink 2.4.0
- */
-public class JPARSDatabaseChangeListener implements DatabaseChangeListener {
-
-    private JPARSChangeNotificationListener owner = null;
-    private AbstractSession session = null;
-    
-    public JPARSDatabaseChangeListener(JPARSChangeNotificationListener owner, AbstractSession session){
-        this.owner = owner;
-        this.session = session;
-    }
-    
-    public void onDatabaseChangeNotification(DatabaseChangeEvent changeEvent) {
-        session.log(SessionLog.FINEST, SessionLog.CONNECTION, "dcn_change_event", changeEvent);
-        if (changeEvent.getTableChangeDescription() != null) {
-            final List<DatabaseField> fields = new ArrayList<DatabaseField>();
-            fields.add(new DatabaseField(OracleChangeNotificationListener.ROWID));
-            for (TableChangeDescription tableChange : changeEvent.getTableChangeDescription()) {
-                ClassDescriptor descriptor = owner.getDescriptorsByTable().get(new DatabaseTable(tableChange.getTableName()));
-                if (descriptor != null) {
-                    CacheIndex index = descriptor.getCachePolicy().getCacheIndex(fields);
-                    for (RowChangeDescription rowChange : tableChange.getRowChangeDescription()) {
-                        if (rowChange.getRowOperation().equals(RowOperation.INSERT) || rowChange.getRowOperation().equals(RowOperation.UPDATE)){
-                            CacheId id = new CacheId(new Object[]{rowChange.getRowid().stringValue()});
-                            CacheKey key = session.getIdentityMapAccessorInstance().getIdentityMapManager().getCacheKeyByIndex(
-                                    index, id, true, descriptor);
-                            Object updatedObject = null;
-                            if ((key == null) || (key.getTransactionId() == null) || !key.getTransactionId().equals(changeEvent.getTransactionId(true))) {
-                                ExpressionBuilder builder = new ExpressionBuilder();
-                                Expression expression = builder.getField(OracleChangeNotificationListener.ROWID).equal(rowChange.getRowid());
-                                ReadObjectQuery query = new ReadObjectQuery(descriptor.getJavaClass(), expression);
-                                query.refreshIdentityMapResult();
-                                updatedObject = session.executeQuery(query);
-                           } else {
-                               updatedObject = key.getObject();
-                           }
-                            if (rowChange.getRowOperation().equals(RowOperation.INSERT)){
-                                owner.objectInserted(updatedObject);
-                            } else {
-                                owner.objectUpdated(updatedObject);
-                            }
-                        }
-                    }
-                }
-                
-            }
-            
-        }
-    }
-}
diff --git a/JPA-RS/org.eclipse.persistence.jpars/src/org/eclipse/persistence/jpa/rs/util/DatabaseListener.java b/JPA-RS/org.eclipse.persistence.jpars/src/org/eclipse/persistence/jpa/rs/util/DatabaseListener.java
new file mode 100644
index 0000000..90fa854
--- /dev/null
+++ b/JPA-RS/org.eclipse.persistence.jpars/src/org/eclipse/persistence/jpa/rs/util/DatabaseListener.java
@@ -0,0 +1,11 @@
+package org.eclipse.persistence.jpa.rs.util;
+
+import org.eclipse.persistence.platform.database.events.DatabaseEventListener;
+
+public interface DatabaseListener extends DatabaseEventListener {
+
+    public void addChangeListener(ChangeListener listener);
+    
+    public void removeChangeListener(ChangeListener listener);
+    
+}
diff --git a/JPA-RS/org.eclipse.persistence.jpars/src/org/eclipse/persistence/jpa/rs/util/DynamicXMLMetadataSource.java b/JPA-RS/org.eclipse.persistence.jpars/src/org/eclipse/persistence/jpa/rs/util/DynamicXMLMetadataSource.java
index 5d1781b..43d8f17 100644
--- a/JPA-RS/org.eclipse.persistence.jpars/src/org/eclipse/persistence/jpa/rs/util/DynamicXMLMetadataSource.java
+++ b/JPA-RS/org.eclipse.persistence.jpars/src/org/eclipse/persistence/jpa/rs/util/DynamicXMLMetadataSource.java
@@ -65,10 +65,14 @@
         xmlBindings.setXmlSchema(xmlSchema);
         
         for (ClassDescriptor ormDescriptor : session.getProject().getOrderedDescriptors()) {
-            javaTypes.getJavaType().add(createJAXBType(ormDescriptor, objectFactory));
+            String descriptorPackageName = ormDescriptor.getJavaClassName().substring(0, ormDescriptor.getJavaClassName().lastIndexOf('.'));
+            if (descriptorPackageName.equals(packageName)){
+                javaTypes.getJavaType().add(createJAXBType(ormDescriptor, objectFactory));
+            }
         }
     }
 
+    
     private JavaType createJAXBType(ClassDescriptor classDescriptor, ObjectFactory objectFactory) {
         JavaType javaType = new JavaType();
         javaType.setName(classDescriptor.getAlias());
diff --git a/JPA-RS/org.eclipse.persistence.jpars/src/org/eclipse/persistence/jpa/rs/util/StreamingOutputMarshaller.java b/JPA-RS/org.eclipse.persistence.jpars/src/org/eclipse/persistence/jpa/rs/util/StreamingOutputMarshaller.java
index 4f6827f..12c330e 100644
--- a/JPA-RS/org.eclipse.persistence.jpars/src/org/eclipse/persistence/jpa/rs/util/StreamingOutputMarshaller.java
+++ b/JPA-RS/org.eclipse.persistence.jpars/src/org/eclipse/persistence/jpa/rs/util/StreamingOutputMarshaller.java
@@ -30,8 +30,10 @@
 import javax.ws.rs.core.MediaType;
 import javax.ws.rs.core.StreamingOutput;
 import javax.xml.bind.JAXBContext;
+import javax.xml.bind.JAXBElement;
 import javax.xml.bind.JAXBException;
 import javax.xml.bind.Marshaller;
+import javax.xml.namespace.QName;
 
 import org.eclipse.persistence.dynamic.DynamicEntity;
 import org.eclipse.persistence.internal.dynamic.DynamicEntityImpl;
@@ -63,6 +65,8 @@
     }
 
     public void write(OutputStream output) throws IOException, WebApplicationException {
+long millis = System.currentTimeMillis();
+        System.out.println("SteamingOutputMarshaller About to write ");
         if (this.context != null && this.context.getJAXBContext() != null && this.result != null && !this.mediaType.equals(MediaType.WILDCARD_TYPE)) {
             try {
                 Marshaller marshaller = createMarshaller(context, mediaType);
@@ -75,7 +79,9 @@
                         Iterator<Object> i = objs.iterator();
                         writer.write("[");
                         if (i.hasNext()) {
-                            marshaller.marshal(i.next(), writer);
+                            Object element = i.next();
+                            //JAXBElement jaxbElement = new JAXBElement(new QName(null, "data"), element.getClass(), element);
+                            marshaller.marshal(element, writer);
                             while (i.hasNext()) {
                                 writer.write(",");
                                 marshaller.marshal(i.next(), writer);
@@ -117,6 +123,8 @@
             oos.close();
             output.write(baos.toByteArray());
         }
+        System.out.println("SteamingOutputMarshaller done write. time: " + (System.currentTimeMillis() - millis));
+
     }
     
     /**
@@ -160,12 +168,14 @@
         marshaller.setAdapter(new LinkAdapter(context.getBaseURI().toString(), context));
         marshaller.setListener(new Marshaller.Listener() {
             @Override
-            public void beforeMarshal(Object source) {
-                DynamicEntityImpl sourceImpl = (DynamicEntityImpl)source;
-                PropertyChangeListener listener = sourceImpl._persistence_getPropertyChangeListener();
-                sourceImpl._persistence_setPropertyChangeListener(null);
-                ((DynamicEntity)source).set("self", source);
-                sourceImpl._persistence_setPropertyChangeListener(listener);
+            public void beforeMarshal(Object source) {   
+                if (source instanceof DynamicEntity){
+                    DynamicEntityImpl sourceImpl = (DynamicEntityImpl)source;
+                    PropertyChangeListener listener = sourceImpl._persistence_getPropertyChangeListener();
+                    sourceImpl._persistence_setPropertyChangeListener(null);
+                    ((DynamicEntity)source).set("self", source);
+                    sourceImpl._persistence_setPropertyChangeListener(listener);
+                }
             }
         });
         return marshaller;
diff --git a/JPA-RS/org.eclipse.persistence.jpars/src/org/eclipse/persistence/jpa/rs/websockets/ApplicationListener.java b/JPA-RS/org.eclipse.persistence.jpars/src/org/eclipse/persistence/jpa/rs/websockets/ApplicationListener.java
deleted file mode 100644
index a24e1e3..0000000
--- a/JPA-RS/org.eclipse.persistence.jpars/src/org/eclipse/persistence/jpa/rs/websockets/ApplicationListener.java
+++ /dev/null
@@ -1,63 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2011 Oracle. All rights reserved.
- * This program and the accompanying materials are made available under the 
- * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0 
- * which accompanies this distribution. 
- * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html
- * and the Eclipse Distribution License is available at 
- * http://www.eclipse.org/org/documents/edl-v10.php.
- *
- * Contributors:
- * 		dclarke/tware - initial 
- *      tware
- ******************************************************************************/
-package org.eclipse.persistence.jpa.rs.websockets;
-
-import java.util.logging.Logger;
-
-import org.eclipse.persistence.jpa.rs.PersistenceContext;
-import org.eclipse.persistence.jpa.rs.util.ChangeListener;;
-
-public class ApplicationListener implements ChangeListener {
-	static final Logger logger = Logger.getLogger("ApplicationListener");
-	
-	private JPARSWebSocket socket;
-	private PersistenceContext context;
-
-	public ApplicationListener(JPARSWebSocket webSocket, PersistenceContext context) {
-		this.socket = webSocket;
-		this.context = context;
-	}
-
-	@Override
-	public void objectUpdated(Object object) {
-		this.socket.sendUpdate(this.context, object);
-	}
-
-	@Override
-	public void objectInserted(Object object) {
-		this.socket.sendInsert(this.context, object);
-	}
-
-	public void register() {
-		logger.info(this + " registering with application");
-		this.context.addListener(this);
-	}
-	
-	public void unregister() {
-		logger.info(this + " unregistering from application");
-		this.context.remove(this);
-	}
-	
-	public JPARSWebSocket getSocket() {
-		return socket;
-	}
-
-	public PersistenceContext getApplication() {
-		return context;
-	}
-
-
-
-
-}
diff --git a/JPA-RS/org.eclipse.persistence.jpars/src/org/eclipse/persistence/jpa/rs/websockets/JPARSWebSocket.java b/JPA-RS/org.eclipse.persistence.jpars/src/org/eclipse/persistence/jpa/rs/websockets/JPARSWebSocket.java
deleted file mode 100644
index 6a865c6..0000000
--- a/JPA-RS/org.eclipse.persistence.jpars/src/org/eclipse/persistence/jpa/rs/websockets/JPARSWebSocket.java
+++ /dev/null
@@ -1,130 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2011 Oracle. All rights reserved.
- * This program and the accompanying materials are made available under the 
- * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0 
- * which accompanies this distribution. 
- * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html
- * and the Eclipse Distribution License is available at 
- * http://www.eclipse.org/org/documents/edl-v10.php.
- *
- * Contributors:
- *      ssmith - initial 
- ******************************************************************************/
-package org.eclipse.persistence.jpa.rs.websockets;
-
-import static org.eclipse.persistence.jaxb.JAXBContext.MEDIA_TYPE;
-
-import java.beans.PropertyChangeListener;
-import java.io.StringWriter;
-import java.util.logging.Logger;
-
-import javax.ws.rs.core.MediaType;
-import javax.xml.bind.JAXBContext;
-import javax.xml.bind.Marshaller;
-
-import org.eclipse.persistence.dynamic.DynamicEntity;
-import org.eclipse.persistence.internal.dynamic.DynamicEntityImpl;
-import org.eclipse.persistence.internal.helper.Helper;
-
-import org.eclipse.persistence.jpa.rs.PersistenceContext;
-import org.eclipse.persistence.jpa.rs.util.LinkAdapter;
-import org.eclipse.persistence.jpa.rs.util.StreamingOutputMarshaller;
-
-import com.sun.grizzly.websockets.DataFrame;
-import com.sun.grizzly.websockets.DefaultWebSocket;
-import com.sun.grizzly.websockets.ProtocolHandler;
-import com.sun.grizzly.websockets.WebSocketListener;
-
-public class JPARSWebSocket extends DefaultWebSocket {
-	static final Logger logger = Logger.getLogger("JPARSWebSocket");
-    private Registration registration;
-    private ApplicationListener listener;
-    
-    public JPARSWebSocket(ProtocolHandler handler, WebSocketListener[] listeners) {
-        super(handler, listeners);
-    }
-
-	public Registration getRegistration() {
-		return registration;
-	}
-
-	public void setRegistration(Registration registration) {
-		this.registration = registration;
-	}
-
-	public void setApplication(PersistenceContext context) {
-		this.listener = new ApplicationListener(this, context);
-		this.listener.register();
-	}
-	
-	@Override
-	public void onClose(DataFrame frame) {
-		if (this.listener != null) {
-			this.listener.unregister();
-		}
-		super.onClose(frame);
-	}
-
-	public void sendInsert(PersistenceContext application, Object entity) {
-		send(application, entity);
-	}
-
-	public void sendUpdate(PersistenceContext application, Object entity) {
-		send(application, entity);
-	}
-	
-	protected void send(PersistenceContext application, Object entity) {
-		String entityName = Helper.getShortClassName(entity.getClass());
-		if (ofInterest(application, entity, entityName)) {
-			String json = marshallEntity(application, entity);
-			if (json == null) {
-				logger.severe("Entity did not marshall, not sending: " + entity);
-			} else {
-				String wrappedJson = 
-						"{" +
-						"\"url\" : \"persistence/" + application.getName() + "/" + entityName + "\", " +
-						"\"data\" : " + json +
-						"}";
-				logger.info(this + " sending: " + wrappedJson);
-				send(wrappedJson);
-			}
-		}
-	}
-
-	/**
-	 * Answer whether the socket should send the update.  The application name must
-	 * match but the entity name is optional and will only be used if not null.  This
-	 * allows clients to register interest in changes to all entities in an application.
-	 * 
-	 * @param application
-	 * @param entity
-	 * @param entityName
-	 * @return
-	 */
-	private boolean ofInterest(PersistenceContext application, Object entity, String entityName) {
-		String appName = application.getName();
-		if ((appName == null) || (getRegistration() == null)) {
-			return false;
-		}
-		
-		boolean appNameMatches = appName.equals(getRegistration().getAppName());
-		boolean entityNameMatches = (getRegistration().getEntityName() == null) 
-				|| (getRegistration().getEntityName().equals(entityName));
-		return appNameMatches && entityNameMatches;
-	}
-
-	protected String marshallEntity(PersistenceContext context, Object entity) {
-		try {
-            Marshaller marshaller = StreamingOutputMarshaller.createMarshaller(context, MediaType.APPLICATION_JSON_TYPE);
-			StringWriter stringWriter = new StringWriter();
-			marshaller.marshal(entity, stringWriter);
-
-			String jsonString = stringWriter.toString();
-			return jsonString;
-		} catch (Exception e) {
-			logger.severe("Failed to marshall object: " + entity + ", exception: " + e.getMessage());
-			return null;
-		}
-	}
-
-}
\ No newline at end of file
diff --git a/JPA-RS/org.eclipse.persistence.jpars/src/org/eclipse/persistence/jpa/rs/websockets/JPARSWebSocketApplication.java b/JPA-RS/org.eclipse.persistence.jpars/src/org/eclipse/persistence/jpa/rs/websockets/JPARSWebSocketApplication.java
deleted file mode 100644
index 928c913..0000000
--- a/JPA-RS/org.eclipse.persistence.jpars/src/org/eclipse/persistence/jpa/rs/websockets/JPARSWebSocketApplication.java
+++ /dev/null
@@ -1,159 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2011 Oracle. All rights reserved.
- * This program and the accompanying materials are made available under the 
- * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0 
- * which accompanies this distribution. 
- * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html
- * and the Eclipse Distribution License is available at 
- * http://www.eclipse.org/org/documents/edl-v10.php.
- *
- * Contributors:
- *      ssmith - initial 
- ******************************************************************************/
-package org.eclipse.persistence.jpa.rs.websockets;
-
-import static org.eclipse.persistence.jaxb.JAXBContext.MEDIA_TYPE;
-
-import java.io.StringReader;
-import java.util.Map;
-import java.util.concurrent.ConcurrentHashMap;
-import java.util.logging.Logger;
-
-import javax.annotation.PostConstruct;
-import javax.annotation.PreDestroy;
-import javax.ejb.EJB;
-import javax.ejb.Singleton;
-import javax.ejb.Startup;
-import javax.ws.rs.core.MediaType;
-import javax.xml.bind.JAXBContext;
-import javax.xml.bind.JAXBElement;
-import javax.xml.bind.JAXBException;
-import javax.xml.bind.PropertyException;
-import javax.xml.bind.Unmarshaller;
-import javax.xml.transform.stream.StreamSource;
-
-import org.eclipse.persistence.jpa.rs.PersistenceContext;
-import org.eclipse.persistence.jpa.rs.PersistenceFactory;
-
-import com.sun.grizzly.tcp.Request;
-import com.sun.grizzly.websockets.ProtocolHandler;
-import com.sun.grizzly.websockets.WebSocket;
-import com.sun.grizzly.websockets.WebSocketApplication;
-import com.sun.grizzly.websockets.WebSocketEngine;
-import com.sun.grizzly.websockets.WebSocketListener;
-
-@Singleton
-@Startup
-public class JPARSWebSocketApplication extends WebSocketApplication {
-	static final Logger logger = Logger.getLogger("JPARSWebSocketApplication");
-	protected JAXBContext jaxbContext;	
-	protected PersistenceFactory factory;
-	protected Map<PersistenceContext, ApplicationListener> applicationToListener = new ConcurrentHashMap<PersistenceContext, ApplicationListener>();
-
-	public JPARSWebSocketApplication() {
-    	logger.info("JPARSWebSocketApplication created: " + this);
-//    	initialize();
-		try {
-			jaxbContext = JAXBContext.newInstance(Registration.class);
-		} catch (JAXBException e) {
-			// TODO Auto-generated catch block
-			e.printStackTrace();
-		}
-	}
-	
-	@PostConstruct
-	public void initialize() {
-    	logger.info(this + " Registering JPARSWebSocket Application with WebSocketEngine");
-        WebSocketEngine.getEngine().register(this);
-	}
-	
-	@PreDestroy
-	public void cleanup() {
-    	logger.info(this + " Unregistering JPARSWebSocket Application from WebSocketEngine");
-		WebSocketEngine.getEngine().unregister(this);
-	}
-	
-    public PersistenceFactory getFactory() {
-        return this.factory;
-    }
-
-    @EJB
-    public void setRepository(PersistenceFactory factory) {
-        this.factory = factory;
-    }
-    
-    @Override
-    public WebSocket createWebSocket(ProtocolHandler protocolHandler, WebSocketListener... listeners) {
-        return new JPARSWebSocket(protocolHandler, listeners);
-    }
-
-    @Override
-    public boolean isApplicationRequest(Request request) {
-        String uri = request.requestURI().toString();
-        return uri.endsWith("/ws");
-    }
-
-    @Override
-    public void onMessage(WebSocket socket, String text) {
-    	logger.info(socket + " message received: " + text);
-		JPARSWebSocket jparsSocket = (JPARSWebSocket) socket;
-		try {
-			Registration message = unmarshallMessage(text);
-			jparsSocket.setRegistration(message);
-			PersistenceContext application = this.factory.getPersistenceContext(message.getAppName());
-			if (application != null){
-			    jparsSocket.setApplication(application);
-			} else {
-			    logger.info("Message recieved for unavailable application: " + message.getAppName() + " closing socket.");
-		        closeSocket(jparsSocket);
-			}
-		} catch (Exception e) {			
-			// TODO Auto-generated catch block
-			e.printStackTrace();
-	        logger.info(jparsSocket + " exception processing message, closing socket");
-			closeSocket(jparsSocket);
-		}
-    }
-
-	@Override
-	public boolean add(WebSocket socket) {
-		logger.info(socket + " add");
-		boolean success = super.add(socket);
-		logger.info("After add now managing sockets: " + getWebSockets().size());
-		return success;
-	}
-
-	@Override
-	public boolean remove(WebSocket socket) {
-		JPARSWebSocket chatSocket = (JPARSWebSocket) socket;
-		logger.info(socket + " remove: " + chatSocket.getRegistration());
-		boolean success = super.remove(socket);
-		logger.info("After remove now managing sockets: " + getWebSockets().size());
-		return success;
-	}
-
-
-	protected void closeSocket(WebSocket socket) {
-		try {
-			socket.close(WebSocket.INVALID_DATA);
-		} catch (Exception e2) {
-			logger.info(socket + " exception closing socket: " + e2.getMessage());
-		}
-	}
-
-	public Registration unmarshallMessage(String text) throws JAXBException,
-			PropertyException {
-		Unmarshaller unmarshaller = jaxbContext.createUnmarshaller();
-		unmarshaller.setProperty(MEDIA_TYPE, MediaType.APPLICATION_JSON);
-		StringReader reader = new StringReader(text);
-		StreamSource inSource = new StreamSource(reader);
-		JAXBElement<Registration> jaxbElement = unmarshaller.unmarshal(
-				inSource, Registration.class);
-		Registration message = jaxbElement.getValue();
-		return message;
-	}
-
-
-    
-    
-}
diff --git a/JPA-RS/org.eclipse.persistence.jpars/src/org/eclipse/persistence/jpa/rs/websockets/Registration.java b/JPA-RS/org.eclipse.persistence.jpars/src/org/eclipse/persistence/jpa/rs/websockets/Registration.java
deleted file mode 100644
index 3d3e908..0000000
--- a/JPA-RS/org.eclipse.persistence.jpars/src/org/eclipse/persistence/jpa/rs/websockets/Registration.java
+++ /dev/null
@@ -1,42 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2011 Oracle. All rights reserved.
- * This program and the accompanying materials are made available under the 
- * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0 
- * which accompanies this distribution. 
- * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html
- * and the Eclipse Distribution License is available at 
- * http://www.eclipse.org/org/documents/edl-v10.php.
- *
- * Contributors:
- * 		dclarke/tware - initial 
- *      tware
- ******************************************************************************/
-package org.eclipse.persistence.jpa.rs.websockets;
-
-import javax.xml.bind.annotation.XmlAccessType;
-import javax.xml.bind.annotation.XmlAccessorType;
-
-@XmlAccessorType(XmlAccessType.FIELD)
-public class Registration {
-
-	private String appName;
-	private String entityName;
-
-	public String getAppName() {
-		return appName;
-	}
-	public void setAppName(String appName) {
-		this.appName = appName;
-	}
-	public String getEntityName() {
-		return entityName;
-	}
-	public void setEntityName(String entityName) {
-		this.entityName = entityName;
-	}
-	@Override
-	public String toString() {
-		return "Registration [appName=" + appName + ", entityName="
-				+ entityName + "]";
-	}
-}
diff --git a/JPA-RS/org.eclipse.persistence.jpars/src/org/eclipse/persistence/jpa/rs/websockets/jaxb.properties b/JPA-RS/org.eclipse.persistence.jpars/src/org/eclipse/persistence/jpa/rs/websockets/jaxb.properties
deleted file mode 100644
index 5837a4c..0000000
--- a/JPA-RS/org.eclipse.persistence.jpars/src/org/eclipse/persistence/jpa/rs/websockets/jaxb.properties
+++ /dev/null
@@ -1 +0,0 @@
-javax.xml.bind.context.factory=org.eclipse.persistence.jaxb.JAXBContextFactory
\ No newline at end of file
