コード例 #1
0
  @Override
  protected void destroyMembers(@Nonnull MVCGroup group, boolean fireDestructionEvents) {
    super.destroyMembers(group, fireDestructionEvents);

    try {
      FactoryBuilderSupport builder = (FactoryBuilderSupport) group.getMember(BUILDER);
      if (builder != null) {
        builder.dispose();
        builder.getVariables().clear();
      }
    } catch (Exception e) {
      // TODO find out why this call breaks applet mode on shutdown
      LOG.error(
          "Application encountered an error while destroying group '" + group.getMvcId() + "'",
          sanitize(e));
    }
  }
コード例 #2
0
 @Override
 @SuppressWarnings("ConstantConditions")
 protected void adjustMvcArguments(@Nonnull MVCGroup group, @Nonnull Map<String, Object> args) {
   super.adjustMvcArguments(group, args);
   FactoryBuilderSupport builder = (FactoryBuilderSupport) group.getMember(BUILDER);
   args.put(BUILDER, builder);
   for (Map.Entry<String, Object> variable : args.entrySet()) {
     builder.setVariable(variable.getKey(), variable.getValue());
   }
 }