Hi,
In deployment descriptor you can define the initial values through the
environment entries. Your can then get these values by looking up in the
JNDi name space as you look up the datasource, remote variables etc.The
examples tries to find some initial value for the the balance amount defined
in the descriptor.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Warm Regards
Ashwani Kalra
Sr. Member Dev. Staff
Aithent Technologies(P) Ltd.
Email : [EMAIL PROTECTED]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-----Original Message-----
From: A mailing list for Enterprise JavaBeans development
[mailto:[EMAIL PROTECTED]]On Behalf Of G. Srinivasa Murthy
Sent: Monday, August 14, 2000 8:42 PM
To: [EMAIL PROTECTED]
Subject: Weblogic Example
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".
===========================================================================
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".