Hi,

I tried this with WebLogic today, and I was able to get the enumeration as I
expected. Is this a known bug in JRun 3.0?

Dave Halbakken

-----Original Message-----
From: Dave Halbakken [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, October 17, 2000 1:14 PM
To: JRun-Talk
Subject: Getting an enumeration of EJB environment properties?


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.

------------------------------------------------------------------------------
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