Skip to content
Snippets Groups Projects
Commit 9a313520 authored by Nicole Merkle's avatar Nicole Merkle
Browse files

Errors when stopping ucc.frontend manually in console were fixed.

In Activator of ucc.database for every registered service a ServiceRegistry object was defined. 
parent 0b34357a
No related branches found
No related tags found
No related merge requests found
......@@ -33,7 +33,10 @@ import org.universAAL.ucc.startup.model.UserAccountInfo;
public class Activator implements BundleActivator {
private static BundleContext context;
private ServiceRegistration reg;
private ServiceRegistration reg1;
private ServiceRegistration reg2;
private ServiceRegistration reg3;
private ServiceRegistration reg4;
private static ProfileAgent pAgent;
private static ServiceReference pRef;
public static final String USER_SPACE = "urn:org.universAAL.aal_space:user_env#";
......@@ -73,13 +76,13 @@ public class Activator implements BundleActivator {
+ "/users.xml");
}
reg = context.registerService(Setup.class.getName(), new SetupImpl(),
reg1 = context.registerService(Setup.class.getName(), new SetupImpl(),
null);
reg = context.registerService(DataAccess.class.getName(),
reg2 = context.registerService(DataAccess.class.getName(),
new DataAccessImpl(), null);
reg = context.registerService(OntologySupplierService.class.getName(),
reg3 = context.registerService(OntologySupplierService.class.getName(),
new OntologySupplierServiceImpl(), null);
reg = context.registerService(ParserService.class.getName(),
reg4 = context.registerService(ParserService.class.getName(),
new ParserServiceImpl(), null);
// connection to profile agent and setting an empty user from xml
......@@ -227,7 +230,10 @@ public class Activator implements BundleActivator {
*/
public void stop(BundleContext bundleContext) throws Exception {
Activator.context = null;
reg.unregister();
reg1.unregister();
reg2.unregister();
reg3.unregister();
reg4.unregister();
// registry.unregister();
}
......
......@@ -190,7 +190,7 @@ public class Activator implements BundleActivator {
// Dedication to Gema :D
System.err.println(" ");
System.err
.println("-------------------------------------------------------------------");
.println("\033[36m--------------------------------------------------------------------------");
System.err.println(" ");
System.err
.println("This programm is dedicated to a mad and unique person, whose name starts with G.:P");
......@@ -200,8 +200,10 @@ public class Activator implements BundleActivator {
System.err.println("Greetings from Germany to Spain :D @>->-");
System.err.println(" ");
System.err
.println("---------------------------------------------------------------------");
.println("----------------------------------------------------------------------------------");
System.err.println(" ");
}
public static String getSessionKey() {
......@@ -247,8 +249,7 @@ public class Activator implements BundleActivator {
}
public void stop(BundleContext context) throws Exception {
context.ungetService(ref);
context.ungetService(dRef);
Activator.bc = null;
regis.unregister();
File file = new File(moduleConfigHome.getAbsolutePath()
+ "/tempUsrvFiles/");
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment