public void createClasses(@PName(StoreDesc.STORE_ID) String storeId) throws RpcException {
   try {
     StoreDesc sdesc = StoreDesc.get(storeId);
     createClasses(sdesc);
   } catch (Exception e) {
     e.printStackTrace();
     throw new RpcException(
         ERROR_FROM_METHOD, INTERNAL_SERVER_ERROR, "DomainObjectsServiceImpl.createClasses:", e);
   }
 }
 protected void activate(BundleContext bundleContext, Map<?, ?> props) {
   m_bc = bundleContext;
   System.out.println("DomainObjectsServiceImpl.activate.props:" + props);
   try {
     m_logger.info("DomainObjectsServiceImpl.activate -->");
     Bundle b = bundleContext.getBundle();
     Dictionary d = new Hashtable();
     d.put(EventConstants.EVENT_TOPIC, topics);
     m_serviceRegistration =
         b.getBundleContext().registerService(EventHandler.class.getName(), this, d);
   } catch (Exception e) {
     e.printStackTrace();
   }
 }
 public void handleEvent(Event event) {
   System.out.println("DomainObjectsServiceImpl.Event: " + event);
   try {
     String ns = (String) event.getProperty("namespace");
     StoreDesc sdesc = StoreDesc.getNamespaceData(ns);
     m_permissionService.loginInternal(ns);
     ThreadContext.loadThreadContext(ns, "admin");
     createClasses(sdesc);
     System.out.println(
         ">>>> End handleEvent:"
             + ThreadContext.getThreadContext().get(ThreadContext.SESSION_MANAGER));
     ThreadContext.getThreadContext().finalize(null);
     System.out.println(">>>> End handleEvent");
   } catch (Exception e) {
     e.printStackTrace();
   } finally {
   }
 }