Hi,
1) Used to get the Context if the client is in the same VM as the server
2) Used to get the Context if the client is remote form the server
3) Like you said, deprecated!
Gene Chuang
Teach the world... Join Kiko!
<http://www.kiko.com/profile/join.jsp?refcode=TAF-gchuang>
-----Original Message-----
From: A mailing list for Enterprise JavaBeans development
[mailto:[EMAIL PROTECTED]]On Behalf Of Rhodes, Phillip C.
Sent: Wednesday, September 06, 2000 5:59 AM
To: [EMAIL PROTECTED]
Subject: So many means to get Context?
I am confused as to why I would choose a way to get an initial context.
Anyone know of a document that explains why we would choose one way vs.
another?
Thanks, and sorry if this is a stupid question!
For example,
1)
InitialContext context = new InitialContext();
Object obj = context.lookup("java:comp/env/ejb/Category");
CategoryHome ch = (CategoryHome)PortableRemoteObject.narrow(obj,
CategoryHome.class);
2)
final Properties properties = new Properties();
properties.setProperty(Context.INITIAL_CONTEXT_FACTORY,
"allaire.ejipt.ContextFactory");
...//set rest of props
Context initCtx = new InitialContext(properties);
3) Deprecated!
Context initCtx = new InitialContext(properties);
Context initCtx = new InitialContext(ctx.getEnvironment());
home = (shopping.CategoryHome) initCtx.lookup("shopping.CategoryHome");
Phillip Rhodes
[EMAIL PROTECTED]
Alcoa eCommerce
https://www.ALCOADIRECT.COM
826B Two Allegheny Center Pittsburgh, PA 15212
(412) 553-4900 (phone) (412) 553-2484 (fax)
===========================================================================
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".