I'm testing this under GlassFish v2.1 having 3 domains: 1 for opensso, 1 for SP1, 1 for SP2.
Sign-on works fine only with SP1, but when I try to do it with SP2 I run into a 500 Error Code.
I debugged, and found out that SAML2Managers getAllHostedEntities method only returns SP1 in a list.
And when I try to access the metadata of SP2 it returns SP1's metadata.