예제 #1
0
 public V call() throws Exception {
   AppIdFactory.setCurrentFactory(new SimpleAppIdFactory(appId, module));
   try {
     final CapedwarfEnvironment previous = CapedwarfEnvironment.setThreadLocalInstance(env);
     try {
       return callable.call();
     } finally {
       CapedwarfEnvironment.setThreadLocalInstance(previous);
     }
   } finally {
     AppIdFactory.resetCurrentFactory();
   }
 }
예제 #2
0
 public WireWrapper(Callable<V> callable) {
   this.appId = AppIdFactory.getAppId();
   this.module = AppIdFactory.getModule();
   this.env = CapedwarfEnvironment.cloneThreadLocalInstance();
   this.callable = callable;
 }