admin@glassfish.java.net

Re: question on message-security-config

From: Ron Monzillo <Ronald.Monzillo_at_Sun.COM>
Date: Thu, 18 Sep 2008 13:51:46 -0400

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
>
>
>
>
>
>