Hi,

I've set some environment properties in my ejb-jar.xml. An example goes like
this:

      <env-entry>
        <env-entry-name>JMSTopicConnectionFactory</env-entry-name>
                <env-entry-type>java.lang.String</env-entry-type>
        <env-entry-value>TopicConnectionFactory</env-entry-value>
      </env-entry>

Now, in MyEjb.ejbCreate() method I lookup that same property like this:

        InitialContext anInitialContext = new InitialContext();
        String aName = (String)anInitialContext.lookup(
                "java:comp/env/JMSTopicConnectionFactory");
        int Breakpoint = 0; // aName is set to "TopicConnectionFactory" here

It works fine. But I am unable to get an enumeration of all the properties.
Here's the code I'm trying to use:

        NamingEnumeration it = anInitialContext.list("java:comp/env");
        while (it.hasMore())
        {
                NameClassPair aBinding = (NameClassPair)it.next();
                String aName = aBinding.getName();
                int Breakpoint2 = 0;
        }

The only names I get are subcontexts like "mail","url","jdbc","ejb",and
"jms". I figure that I should get all names bound to the "java:comp/env"
context. Why don't I?

Dave Halbakken

------------------------------------------------------------------------------
Archives: http://www.egroups.com/group/jrun-interest/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/jrun_talk
or send a message to [EMAIL PROTECTED] with 'unsubscribe' in the 
body.

Reply via email to