Hi all

The ejb-jar.dtd specifies that <env-entry-value> is optional :-

     <!ELEMENT env-entry (description?, env-entry-name, env-entry-type,
     env-entry-value?)>

However Weblogic server is not allowing me to ignore the env-entry-value. I get
the following error :-

     ERROR: Error from ejbc: A value was not set for this EnvironmentEntry
     ERROR: ejbc found errors

Now, whose bug is this? EJB spec or Weblogic?

Actually, I was working on env part in connection with my previous post, "Two
Questions". I was wondering why EJB spec did not allow one or more entries for
values (<env-entry-value>+), so that my ejb-jar.xml will look like this :-

     <env-entry>
       <env-entry-name>listOfNames</env-entry-name>
       <env-entry-type>java.lang.String</env-entry-type>

       <env-entry-value>Me</env-entry-value>
       <env-entry-value>You</env-entry-value>
       <env-entry-value>He</env-entry-value>
       <env-entry-value>She</env-entry-value>
       <env-entry-value>They</env-entry-value>
     </env-entry>

I could have written code like this :-

     Context ctx = new InitialContext();
     NamingEnumeration e = ctx.listBindings("java:comp/env/listOfNames");
     while (e.hasMore()) {
       Binding b = (Binding) e.next();
       String value = (String) b.getObject();
       System.out.println("value = " + value);
     }

Hmm! All in air.

Thanks.
--
shiv
[EMAIL PROTECTED]



__________________________________________________
Do You Yahoo!?
Talk to your friends online with Yahoo! Messenger.
http://im.yahoo.com

===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff EJB-INTEREST".  For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".

Reply via email to