@Override
 public void activate(ComponentContext context) {
   super.activate(context);
   pageReg = new PageRegistry();
   flavorReg = new FlavorRegistry();
   styleReg = new StyleRegistry();
   negReg = new NegotiationRegistry();
 }
 @Override
 public void registerContribution(
     Object contribution, String extensionPoint, ComponentInstance contributor) throws Exception {
   if (contribution instanceof RedisPoolDescriptor) {
     registry.addContribution((RedisPoolDescriptor) contribution);
   } else {
     super.registerContribution(contribution, extensionPoint, contributor);
   }
 }
 @Override
 public void deactivate(ComponentContext context) {
   super.deactivate(context);
   for (DataSourceLinkDescriptor desc : links.values()) {
     unbindDataSourceLink(desc);
   }
   links.clear();
   for (DataSourceDescriptor desc : datasources.values()) {
     unbindDataSource(desc);
   }
   datasources.clear();
   namingContext = null;
 }
 @Override
 public void deactivate(ComponentContext context) {
   super.deactivate(context);
   ctx = null;
   storage = null;
 }
 @Override
 public void activate(ComponentContext context) {
   super.activate(context);
   this.ctx = context.getRuntimeContext();
   storage = new FileSystemStorage();
 }
Beispiel #6
0
 @Override
 public void deactivate(ComponentContext context) {
   super.deactivate(context);
   bundle = null;
 }
Beispiel #7
0
 @Override
 public void activate(ComponentContext context) {
   super.activate(context);
   bundle = context.getRuntimeContext().getBundle();
 }