X-Git-Url: https://gerrit.simantics.org/r/gitweb?p=simantics%2Fplatform.git;a=blobdiff_plain;f=bundles%2Forg.simantics.db.procore%2Fsrc%2Ffi%2Fvtt%2Fsimantics%2Fprocore%2Finternal%2FSessionManagerFactoryImpl.java;h=3ac817beb4625e1deca41c07446b41a2ce5a666b;hp=872af5465819df631c5ffe53233f3e834ca55d6d;hb=51f45bdf95551409666a04f92355638f83c018da;hpb=969bd23cab98a79ca9101af33334000879fb60c5 diff --git a/bundles/org.simantics.db.procore/src/fi/vtt/simantics/procore/internal/SessionManagerFactoryImpl.java b/bundles/org.simantics.db.procore/src/fi/vtt/simantics/procore/internal/SessionManagerFactoryImpl.java index 872af5465..3ac817beb 100644 --- a/bundles/org.simantics.db.procore/src/fi/vtt/simantics/procore/internal/SessionManagerFactoryImpl.java +++ b/bundles/org.simantics.db.procore/src/fi/vtt/simantics/procore/internal/SessionManagerFactoryImpl.java @@ -1,36 +1,36 @@ -/******************************************************************************* - * Copyright (c) 2007, 2010 Association for Decentralized Information Management - * in Industry THTH ry. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * VTT Technical Research Centre of Finland - initial API and implementation - *******************************************************************************/ -package fi.vtt.simantics.procore.internal; - -import java.io.IOException; - -import org.simantics.db.SessionManager; - -public class SessionManagerFactoryImpl implements SessionManagerFactory { - static SessionManagerFactoryImpl sessionManagerFactoryImpl = new SessionManagerFactoryImpl(); - static SessionManagerImpl sessionManagerImpl = null; - - public static SessionManagerFactoryImpl getInstance() { - return sessionManagerFactoryImpl; - } - public static void finish() { - if(sessionManagerImpl != null) - sessionManagerImpl.finish(); - sessionManagerImpl = null; - } - @Override - public SessionManager createSessionManager() throws IOException { - if (null == sessionManagerImpl) - sessionManagerImpl = new SessionManagerImpl(); - return sessionManagerImpl; - } -} +/******************************************************************************* + * Copyright (c) 2007, 2010 Association for Decentralized Information Management + * in Industry THTH ry. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * VTT Technical Research Centre of Finland - initial API and implementation + *******************************************************************************/ +package fi.vtt.simantics.procore.internal; + +import java.io.IOException; + +import org.simantics.db.SessionManager; + +public class SessionManagerFactoryImpl implements SessionManagerFactory { + static SessionManagerFactoryImpl sessionManagerFactoryImpl = new SessionManagerFactoryImpl(); + static SessionManagerImpl sessionManagerImpl = null; + + public static SessionManagerFactoryImpl getInstance() { + return sessionManagerFactoryImpl; + } + public static void finish() { + if(sessionManagerImpl != null) + sessionManagerImpl.finish(); + sessionManagerImpl = null; + } + @Override + public SessionManager createSessionManager() throws IOException { + if (null == sessionManagerImpl) + sessionManagerImpl = new SessionManagerImpl(); + return sessionManagerImpl; + } +}