Guys,

In weblogic 5.1 Example of statefulsession under
/weblogic/examples/ejb/basic/statefulsession we have an example of
tradebean. I have a doubt in that.

in tradebean.java, I dont understand the use of the following lines. I
thought only the client bean or reentrant bean or the call back bean would
need to look up for the JNDI, but the tradebean.java seem to be doing the
following. I dont understand what is this purpose of it. Could someone
kindly help me and explain the purpose of the following lines in
tradebean.java

  public void ejbCreate() throws CreateException {
    log("ejbCreate called");
    try {
      InitialContext ic = new InitialContext();
      environment = (Context) ic.lookup("java:comp/env");
    } catch (NamingException ne) {
      throw new CreateException("Could not look up context");
    }
    this.tradingBalance = 0.0;
  }

what is he actually trying to look up here in java:comp/env. I dont find it
anywhere else too? This is a very silly and premature question, I understand
that , But once again i am a newbie to EJB. Kindly help me out. Thnx in
advance.

Srinivas.

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