Ok.

As described shortly in my last email concerning this matter I had a
configuraiton
where the Class could not be found neither via the lookup or by comparing
isAssignable - even
though it was a Class with the same name.

The problem was that it was loaded by another classloader (this can happen
when lurking around
with J2EE and servlet containers) and then the query would never get any
results and return null!

Maybe we could add a check before the result is returned wether it is null
or not - and then throw
an IllegalStateException or similar - warning that something truly bizar is
happening ?

/max

----- Original Message -----
From: "Gavin King" <[EMAIL PROTECTED]>
To: "Max Rydahl Andersen" <[EMAIL PROTECTED]>;
<[EMAIL PROTECTED]>
Sent: Tuesday, October 29, 2002 6:22 PM
Subject: Re: [Hibernate] Why this line...


> This is part of a preprocessing phase where we scan the query for Java
> classes that *aren't* mapped in the mapping document and turn the single
> query into n queries against the n implementors of that interface. So that
> method says: if the passed token is the class name of an unmapped class,
> return the names of all the implementors of that class. Otherwise return
> null, and ignore the token.
>
>
> ----- Original Message -----
> From: "Max Rydahl Andersen" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Tuesday, October 29, 2002 3:16 AM
> Subject: [Hibernate] Why this line...
>
>
> > In SessionFactoryImpl I found this code:
> >
> > public String[] getImplementors(Class clazz) {
> >
> > if ( classPersisters.containsKey(clazz) ) return null;
> >
> > ...
> >
> > ..
> >
> > }
> >
> >
> >
> > Why should getImplementors return null if clazz is inside the
> > classPersisters ?
> >
> >
> >
> > /max
> >
> >
> >
> >
> > -------------------------------------------------------
> > This sf.net email is sponsored by:ThinkGeek
> > Welcome to geek heaven.
> > http://thinkgeek.com/sf
> > _______________________________________________
> > hibernate-devel mailing list
> > [EMAIL PROTECTED]
> > https://lists.sourceforge.net/lists/listinfo/hibernate-devel
>
>
>
> -------------------------------------------------------
> This sf.net email is sponsored by:ThinkGeek
> Welcome to geek heaven.
> http://thinkgeek.com/sf
> _______________________________________________
> hibernate-devel mailing list
> [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/hibernate-devel
>



-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
hibernate-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/hibernate-devel

Reply via email to