On 05/03/2011 11:18 PM, "이희승 (Trustin Lee)" wrote: > By default, we could use the class loader that the current Unmarshaller > uses, and let user choose a class loader for a certain get() call. > > So, we need to deal with the two issues here: > > 1) Make sure that user can configure the default class loader in runtime > and calling get() (and consequently related unmarshaller) will use the > default class loader: > > cache.setDefaultClassLoader(UserClass.class.getClassLoader()) > > 2) Provide an additional API that allows a user to specify a class > loader for the current transaction or context: > > cache.get(K key, Class<V> clazz) // +1 to Pete's suggestion
Agreed on all parts. If the default CL isn't set then TCCL is probably a reasonable default. But the user should be allowed to set the default class loader for resolution. To be fair though I don't know whether that makes sense at a cache level, but from a marshalling and modularity perspective this makes a lot of sense. -- - DML _______________________________________________ infinispan-dev mailing list infinispan-dev@lists.jboss.org https://lists.jboss.org/mailman/listinfo/infinispan-dev