0 Replies Latest reply on Sep 6, 2001 1:09 PM by Lars Olsson

    Another lookup() problem....

    Lars Olsson Newbie

      In a (message driven) bean I am trying to lookup a
      Class-valued environment value:

      <env-entry>
       <description>Hmmmmm</description>
       <env-entry-name>T</env-entry-name>
       <env-entry-type>java.lang.Class</env-entry-type>
       <env-entry-value>java.lang.Integer</env-entry-value>
      </env-entry>
      


      In my bean I do:

       Object x = ctx.lookup("java:comp/env/T");
       System.err.println(x.getClass().getName());
      


      When I run this the output is:

      java.lang.String

      This is not what I had expected.

      Should I be able to lookup Classes from the
      environment like this?

      I am using JBoss 2.4.0 on Red Hat Linux 6.2.

      Lars