Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: EJB Environment Properties

Re: EJB Environment Properties

From: Gary Fowler <grfowler_at_mmm.com>
Date: Mon, 28 Feb 2000 11:02:42 -0700
Message-ID: <38BAB842.7FE1F9A3@mmm.com>


Well, I found the answer to my question. The session context contains these Environment Properties. You get the session context as follows:

public class myEJBean implements SessionBean {

    private SessionContext ctx;

    public void setSessionContext(SessionContext ctx)     {

        this.ctx = ctx;
    }

    .
    .
    .

When you need to get the value of an Environment Property you do the following:
        .
        .
        .
        Properties props = ctx.getEnvironment();
        String aString = props.get("someKey");
        .
        .
        .

where "someKey" is the name of the Environment Property that you want.

Gary Fowler wrote:

> I am using Oracle 8i, and I want to be able to set some properties at
> deployment time. It appears that you can do this in the EJB deployment
> descriptor, but I have not found a way to access them from my session
> bean. I tried to access them via the System.getProperty(String) method,
> but with no success. How can I get to these properties, or is there a
> better approach?
>
> Thanks,
> Gary Fowler
> 3M Health Information Systems
> grfowler_at_mmm.com
Received on Mon Feb 28 2000 - 12:02:42 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US