use of com.arjuna.ats.arjuna.objectstore.ParticipantStore in project narayana by jbosstm.
the class CachedTest method test.
@Test
public void test() throws Exception {
int cacheSize = 2048;
int threads = 100;
Thread[] t = new Thread[threads];
ObjectStoreEnvironmentBean objectStoreEnvironmentBean = arjPropertyManager.getObjectStoreEnvironmentBean();
objectStoreEnvironmentBean.setCacheStoreSize(cacheSize);
ParticipantStore store = new CacheStore(objectStoreEnvironmentBean);
long stime = Calendar.getInstance().getTime().getTime();
for (int i = 0; i < threads; i++) {
System.err.println("i: " + i);
t[i] = new ThreadWriter(store);
t[i].start();
}
for (int j = 0; j < threads; j++) {
System.err.println("j: " + j);
t[j].join();
assertTrue(((ThreadWriter) t[j]).passed);
}
long ftime = Calendar.getInstance().getTime().getTime();
long timeTaken = ftime - stime;
store.sync();
System.err.println("time for " + threads + " users is " + timeTaken);
}
use of com.arjuna.ats.arjuna.objectstore.ParticipantStore in project narayana by jbosstm.
the class JavaIdlRCManager method initialise.
private synchronized void initialise() {
if (!_initialised) {
_initialised = true;
if (!_runWithoutDaemon) {
try {
ParticipantStore participantStore = StoreManager.getCommunicationStore();
InputObjectState iState = participantStore.read_committed(new Uid(JavaIdlRCServiceInit.uid4Recovery), JavaIdlRCServiceInit.type());
if (iState != null)
ref_ReCoo = iState.unpackString();
else
jtsLogger.i18NLogger.warn_orbspecific_jacorb_recoverycoordinators_JacOrbRCManager_4();
} catch (java.io.FileNotFoundException ex) {
jtsLogger.i18NLogger.warn_orbspecific_jacorb_recoverycoordinators_JacOrbRCManager_4();
} catch (Exception ex) {
jtsLogger.i18NLogger.warn_orbspecific_jacorb_recoverycoordinators_JacOrbRCManager_5(ex);
}
}
}
}
use of com.arjuna.ats.arjuna.objectstore.ParticipantStore in project narayana by jbosstm.
the class JacOrbRCManager method initialise.
private final synchronized void initialise() {
if (!_initialised) {
_initialised = true;
if (!_runWithoutDaemon) {
try {
ParticipantStore participantStore = StoreManager.getCommunicationStore();
InputObjectState iState = participantStore.read_committed(new Uid(JacOrbRCServiceInit.uid4Recovery), JacOrbRCServiceInit.type());
if (iState != null)
ref_ReCoo = iState.unpackString();
else
jtsLogger.i18NLogger.warn_orbspecific_jacorb_recoverycoordinators_JacOrbRCManager_4();
} catch (java.io.FileNotFoundException ex) {
jtsLogger.i18NLogger.warn_orbspecific_jacorb_recoverycoordinators_JacOrbRCManager_4();
} catch (Exception ex) {
jtsLogger.i18NLogger.warn_orbspecific_jacorb_recoverycoordinators_JacOrbRCManager_5(ex);
}
}
}
}
use of com.arjuna.ats.arjuna.objectstore.ParticipantStore in project narayana by jbosstm.
the class JavaIdlRCManager method initialise.
private synchronized void initialise() {
if (!_initialised) {
_initialised = true;
if (!_runWithoutDaemon) {
try {
ParticipantStore participantStore = StoreManager.getCommunicationStore();
InputObjectState iState = participantStore.read_committed(new Uid(JavaIdlRCServiceInit.uid4Recovery), JavaIdlRCServiceInit.type());
if (iState != null)
ref_ReCoo = iState.unpackString();
else
jtsLogger.i18NLogger.warn_orbspecific_jacorb_recoverycoordinators_JacOrbRCManager_4();
} catch (java.io.FileNotFoundException ex) {
jtsLogger.i18NLogger.warn_orbspecific_jacorb_recoverycoordinators_JacOrbRCManager_4();
} catch (Exception ex) {
jtsLogger.i18NLogger.warn_orbspecific_jacorb_recoverycoordinators_JacOrbRCManager_5(ex);
}
}
}
}
Aggregations