OSGIOpenMISInit.java

00001 /*
00002  * OpenMobileIS - a free Java(TM) Framework for mobile applications Java(TM)
00003  * Copyright (C) 2004-2006 Philippe Delrieu
00004  * All rights reserved.
00005  * Contact: pdelrieu@openmobileis.org
00006  *
00007  * This library is free software; you can redistribute it and/or
00008  * modify it under the terms of the GNU Lesser General Public
00009  * License as published by the Free Software Foundation; either
00010  * version 2.1 of the License, or any later version.
00011  *
00012  * This library is distributed in the hope that it will be useful,
00013  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00014  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00015  * Lesser General Public License for more details.
00016  *
00017  * You should have received a copy of the GNU Lesser General Public
00018  * License along with this library; if not, write to the Free Software
00019  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307
00020  * USA
00021  *
00022  *  Author : Philippe Delrieu
00023  *
00024  */
00025 
00026 package org.openmobileis.bundle.osgi.terminal;
00027 
00028 import org.openmobileis.common.util.exception.ServiceException;
00029 import org.openmobileis.services.servlet.OpenMISInit;
00030 
00031 public class OSGIOpenMISInit implements OpenMISInit {
00032 
00033   public OSGIOpenMISInit() {
00034     super();
00035   }
00036 
00037   public void preLoadingInit() throws ServiceException {
00038 /*
00039     //init db propeties.
00040     PropertiesManager.getManager().addProperty("fastobjectdb.database.path", System.getProperty("user.dir")+"/database");
00041     PropertiesManager.getManager().addProperty("fastobjectdb.database.name", "db");
00042 
00043     //init internationalization management.
00044     try {
00045       String locale = IntlResourceManager.getManager().getSystemDefaultLocale();
00046       IntlResourceManager.getManager().addLocalizedProperties(System.getProperty("user.dir")+"/WEB-INF/conf/properties/systemmessages.properties", locale);
00047     } catch (Throwable ex)      {
00048       LogManager.traceError(0, ex);
00049     }
00050 
00051     //init synchro properties
00052     PropertiesManager.getManager().addProperty("org.openmobileis.synchro.client.openmsp.numsyncpropsfile",System.getProperty("user.dir") + "/WEB-INF/conf/numsync.txt");
00053     try {
00054       SynchroFastObjectDBManager.getCurrentFODB(); //init synchro db to be use as default db
00055     } catch (Throwable ex)  {
00056       throw new ServiceException(ex);
00057     }
00058     */
00059 
00060  }
00061 
00062   public void postLoadingInit() throws ServiceException {
00063 
00064             //Start OSGI Container
00065         //        System.setProperty("org.osgi.framework.dir", System.getProperty("user.dir")+"/osgifwk/fwdir");
00066         //        org.knopflerfish.framework.Main.main(new String[0]);
00067 
00068     //load modules after service init and loading.
00069 //    ModuleManager.getManager().registerModuleManagerListener(new ColdUpdateModuleManagerListener());
00070 //    ModuleManager.getManager().initModule();
00071   }
00072 
00073 }

Generated on Mon Jan 11 21:19:16 2010 for OpenMobileIS by  doxygen 1.5.4