Hi Manish,
Here is a code fragment which explains different ways to get the
environment variables in EJB1.1.
// Obtain the enterprise bean's environment naming context.
Context ic = new InitialContext();
Context env = (Context)ic.lookup("java:comp/env");
// Obtain the maximum number of tax exemptions
// configured by the Deployer.
Integer max = (Integer)env.lookup("maxExemptions");
// Obtain the minimum number of tax exemptions
// configured by the Deployer.
Integer min = (Integer)env.lookup("minExemptions");
// Get some more environment entries. These environment
// entries are stored in subcontexts.
String val1 = (String)myEnv.lookup("foo/name1");
Boolean val2 = (Boolean)myEnv.lookup("foo/bar/name2");
// The enterprise bean can also lookup using full pathnames.
Integer val3 = (Integer)ic.lookup("java:comp/env/name3");
Integer val4 = (Integer)ic.lookup("java:comp/env/foo/name4");
Regards,
Rakesh
> ----------
> From: Manish Bijay Kumar[SMTP:[EMAIL PROTECTED]]
> Reply To: A mailing list for Enterprise JavaBeans development
> Sent: Wednesday, August 02, 2000 11:39 AM
> To: [EMAIL PROTECTED]
> Subject: sessioncontext.getEnvironment() is deprecated.
>
> Hi all,
> The method sessionContext.getEnvironment() is deprecated. Please tell me
> the
> latest method to get the properties file.
>
> Thanks in advance,
> Manish
>
> ==========================================================================
> =
> 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".