Hi Nicolas,

You are right !!
I do this change at once.
Thank you very much for this relevant remark.

Kind regards.
H�l�ne.

Nicolas GANDRIAU wrote:
> 
> Hi,
> I have encountered a little problem with JONAS :
> My environement is the following :
>     JONAS 2.1.1
>     JDK 1.3
>     Windows 2000 workstation
> 
> I have an EJB, with an environment entrie of type boolean.
> In my DD, I set the value to "true", it gives the following in XML :
> 
> <env-entry>
>     <env-entry-name>securityswitch</env-entry-name>
>     <env-entry-type>java.lang.Boolean</env-entry-type>
>     <env-entry-value>true</env-entry-value>
> </env-entry>
> 
> But GENIC, refuses my value and states that :
> ERROR: true is not a valid value for env-entry securityswitch
> 
> So I checked the EJB 1_1 Specs  and in 14.2.1.2 Declaration of
> environment entries
> I can read :
> "
> If the Bean Provider provides a value for an environment entry using the
> env-entry-value element,
> the value can be changed later by the Application Assembler or Deployer.
> The value must be a
> string that is valid for the constructor of the specified type that
> takes a single String parameter.
> "
> I understand that any string which is accepted by the
> java.lang.Boolean.constructor(String) should be accepted,
> (I know, this constructor accepts any String and return false if it does
> not match private String.equalsIgnoreCase("true")); )
> 
> So I looked in Jonas code And I found :
> classe org.objectweb.jonas.deployment.api.EnvEntryDesc
> ligne 61 :
> if (t.equals(Boolean.class.getName())) {
>     type = Boolean.class;
>     if (v!=null){
>             if (v.equals("True"))
>                   value = Boolean.TRUE;
>            else if (v.equals("False"))
>                   value = Boolean.FALSE;
>            else
>                  throw new DeploymentDescException(v+" is not a valid
> value for env-entry "+name);
>     }
> ....
> And I checked and True is effectively accepted and does the job, but
> isn't it to restricitive?
> I think it would be great to have this change in the next version.
> 
> Hope it will help.
> 
> Nicolas GANDRIAU
> 
> ----
> This list is cross-posted to two mail lists.  To unsubscribe,
> follow the instructions below for the list you subscribed to.
> For objectweb.org: send email to [EMAIL PROTECTED] and
> include in the body of the message "unsubscribe ejb-container-group".
> For enhydra.org: send email to [EMAIL PROTECTED] and include
> in the body of the message "unsubscribe ejb-container-group".

-- 
-=- H�l�ne JOANIN -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  mailto:[EMAIL PROTECTED]   http://www.evidian.com
  Phone: 33.4.76.29.73.53            Fax: 33.4.76.29.76.00
  Download our EJB Server JOnAS at http://www.objectweb.org
----
This list is cross-posted to two mail lists.  To unsubscribe,
follow the instructions below for the list you subscribed to.
For objectweb.org: send email to [EMAIL PROTECTED] and
include in the body of the message "unsubscribe ejb-container-group".
For enhydra.org: send email to [EMAIL PROTECTED] and include
in the body of the message "unsubscribe ejb-container-group".

Reply via email to