From 30cc7f1c3943be87573849864f1f0637fd5cc3c6 Mon Sep 17 00:00:00 2001 From: "Brian S. O'Neill" Date: Tue, 17 Oct 2006 23:32:59 +0000 Subject: Prevent accidental replication of internal storables. --- .../amazon/carbonado/repo/sleepycat/BDBRepository.java | 15 +++------------ .../carbonado/repo/sleepycat/StoredDatabaseInfo.java | 4 ++++ 2 files changed, 7 insertions(+), 12 deletions(-) (limited to 'src/main/java/com/amazon/carbonado/repo/sleepycat') diff --git a/src/main/java/com/amazon/carbonado/repo/sleepycat/BDBRepository.java b/src/main/java/com/amazon/carbonado/repo/sleepycat/BDBRepository.java index b97ec14..3e2feaf 100644 --- a/src/main/java/com/amazon/carbonado/repo/sleepycat/BDBRepository.java +++ b/src/main/java/com/amazon/carbonado/repo/sleepycat/BDBRepository.java @@ -459,19 +459,10 @@ abstract class BDBRepository } LobEngine getLobEngine() throws RepositoryException { - LobEngine engine = mLobEngine; - if (engine == null) { - lockoutShutdown(); - try { - if ((engine = mLobEngine) == null) { - mLobEngine = engine = new LobEngine(this); - } - return engine; - } finally { - unlockoutShutdown(); - } + if (mLobEngine == null) { + mLobEngine = new LobEngine(getRootRepository()); } - return engine; + return mLobEngine; } /** diff --git a/src/main/java/com/amazon/carbonado/repo/sleepycat/StoredDatabaseInfo.java b/src/main/java/com/amazon/carbonado/repo/sleepycat/StoredDatabaseInfo.java index 9925e01..ae005b3 100644 --- a/src/main/java/com/amazon/carbonado/repo/sleepycat/StoredDatabaseInfo.java +++ b/src/main/java/com/amazon/carbonado/repo/sleepycat/StoredDatabaseInfo.java @@ -18,6 +18,8 @@ package com.amazon.carbonado.repo.sleepycat; +import com.amazon.carbonado.Alias; +import com.amazon.carbonado.Independent; import com.amazon.carbonado.Nullable; import com.amazon.carbonado.PrimaryKey; import com.amazon.carbonado.Storable; @@ -35,6 +37,8 @@ import com.amazon.carbonado.repo.indexed.Unindexed; * @author Brian S O'Neill */ @PrimaryKey("databaseName") +@Independent +@Alias("CARBONADO_DATABASE_INFO") public abstract class StoredDatabaseInfo implements Storable, Unevolvable, Unindexed { /** Evolution strategy code */ public static final int EVOLUTION_NONE = 0, EVOLUTION_STANDARD = 1; -- cgit v1.2.3