Ron,
There is no DTD in V3. But if there were, no change would be required.
I am just going to add key=true to the serverbean @Attribute annotation.
@Attribute(required = true,key=true)
public String getAuthLayer();
Lloyd
On Sep 18, 2008, at 10:51 AM, Ron Monzillo wrote:
> Lloyd Chambers wrote:
>> I was running some (new) AMX unit tests and came across a problem.
>> There can be more than one message-security-config in a security-
>> service. The V2 DTD has this:
>> <!ELEMENT security-service
>> (auth-realm+, jacc-provider+, audit-module*, message-security-
>> config*,
>> property*)>
>> <!ATTLIST message-security-config
>> auth-layer %message-layer; #REQUIRED
>> default-provider CDATA #IMPLIED
>> default-client-provider CDATA #IMPLIED>
>> But the
>> com.sun.enterprise.config.serverbeans.MessageSecurityConfig has no
>> name or key value; thre is no @Attribute which uniquely identifies
>> it. This is a problem, since there can be more than one of them.
> the layer attribute must be unique among all configs. at most one m-
> s-c can have a given layer value.
>
>> I see two options:
>> (1) Make it a 'Named':
>> public interface MessageSecurityConfig extends ConfigBeanProxy,
>> Named, Injectable {...}
>> 2. Make AuthLayer be its key value (I presume there can be only
>> one MessageSecurityConfig with a given AuthLayer):
>> @Attribute(required = true,key=true) <== key=true
>> public String getAuthLayer();
>> Any advice is appreciated. For now I'm choosing #2.
>
> yes that makes sense.
> Is it correct that no change will be required to the dtd?
>
> Ron
>> ..............................................
>> Lloyd Chambers
>> lloyd.chambers_at_sun.com
>> GlassFish team, LSARC member
>