admin@glassfish.java.net

question on message-security-config

From: Lloyd Chambers <Lloyd.Chambers_at_Sun.COM>
Date: Thu, 18 Sep 2008 10:17:20 -0700

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.

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.

..............................................
Lloyd Chambers
lloyd.chambers_at_sun.com
GlassFish team, LSARC member