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".

Reply via email to