Abe White wrote:
>
>> In the case above, another webapp has loaded the forums module,
>> causing this
>> webapp to look for the mappings in that module even though they aren't
>> available.
>>
>> I had difficulty trying to figure out how to restrict which
>> subclasses are
>> 'seen'. Ideally I think it'd be done in the
>> MetaDataRepository#register()
>> method, but no metadata seems to be available at this time.
>
> I see. Here's a proposal: in the MetaDataRepository's implementation
> of the RegisterClassListener interface, the repository only registers
> the given class if either the user has not specified a persistent
> types list (which we allow and in which case we attempt to lazily
> discover persistent types), or if the class name appears in the
> list. That way if you follow JPA guidelines and specify your
> persistent class list properly, subclasses left off the list won't
> even get registered with the metadata repository.
>
That sounds about right. I tried something similar using
MetaDataFactory.getPersistentTypeNames(), but this method requires a
classloader to be passed to it. Using the thread's classloader didn't seem
right (and didn't work anyway). Is there another way to find this list?
Thanks,
Roger
--
View this message in context:
http://www.nabble.com/Shared-classloader-and-subclasses-tf3431312.html#a9604668
Sent from the open-jpa-dev mailing list archive at Nabble.com.