public void reset() {
    descriptor.setShouldDisableCacheHitsOnRemote(orgDisableCacheHitsOnRemote);

    serverDescriptor.setShouldDisableCacheHits(orgServerDisableCacheHits);
    serverSession.setSessionLog(oldLog);

    super.reset();
  }
  protected void setup() {
    super.setup();
    orgDisableCacheHitsOnRemote = descriptor.shouldDisableCacheHitsOnRemote();
    descriptor.setShouldDisableCacheHitsOnRemote(true);

    serverSession = ((ClientSession) RemoteModel.getServerSession()).getParent();
    // Set shouldDisableCacheHits to true on the server session
    serverDescriptor =
        serverSession.getDescriptor(
            org.eclipse.persistence.testing.models.employee.domain.Employee.class);
    orgServerDisableCacheHits = serverDescriptor.shouldDisableCacheHits();
    serverDescriptor.setShouldDisableCacheHits(true);
    // Set shouldLogMessages to true on the server session
    oldLog = serverSession.getSessionLog();
    tempStream = new StringWriter();
    serverSession.setLog(tempStream);
    serverSession.setLogLevel(SessionLog.FINE);
  }
 public void reset() {
   m_addressDesc.setShouldDisableCacheHits(m_addressDisableCacheHits);
   m_addressDesc.setShouldAlwaysRefreshCache(m_addressAlwaysrefreshCache);
   m_policyHolderDesc.setShouldDisableCacheHits(m_policyHolderDisableCacheHits);
   m_policyHolderDesc.setShouldAlwaysRefreshCache(m_policyHolderAlwaysrefreshCache);
 }
コード例 #4
0
 public void customize(ClassDescriptor descriptor) {
   descriptor.setShouldDisableCacheHits(false);
 }