In the cases where it is omitted altogether, that is because the EJB 1.1 spec says
that, when running in an EJB container, an EJB must be able to get the InitialContext
using the paramaterless constructor. In this case, the EJB server framework will
already have set the necessary system properties for you.
regards,
David.
On Wed, 4 Apr 2001, Ted Neward wrote:
> This is really a JNDI question. JNDI relies on several different ways to
> identify the "Initial Context", all of which boil down to the same thing:
> JNDI expects the class name of the "Initial Context" to be the value to a
> property (whose value is equal to the String constant
> Context.INITIAL_CONTEXT_FACTORY). This property can be specified in one of
> several ways:
> 1) On the command-line, using "-D",
> 2) In a Hashtable containing name-value pairs, passed into the
> InitialContext object, or
> 3) Directly setting the property in the System properties
> (System.getProperties.set(...); ).
>
> > -----Original Message-----
> > From: A mailing list for Enterprise JavaBeans development
> > [mailto:[EMAIL PROTECTED]]On Behalf Of ZHU Jia
> > Sent: Monday, April 02, 2001 12:03 AM
> > To: [EMAIL PROTECTED]
> > Subject: [EJB-INT] Different syntax of locating EJB Home Interface?
> >
> >
> > Hi,
> >
> > I just wondered why in the books/docs there are different ways of
> > locating the
> > EJB Home Interface. Some times they create a Property/Hashtable (any
> > difference?), using some quite funny looking values like
> > "Context.INITIAL_CONTEXT_FACTORY", sometimes just using
> > System.properties, and
> > sometimes even omit it at all.
> > What really is the difference? Since none of the books I've
> > really bothers to
> > explain why they chose a certain approach, I'm a bit confused here:-(
> > Many thanks for any hints!
> >
> > regard
> > ZHU Jia
David Bullock
LISAsoft Project Lead
Sun Certified Programmer for the Java 2 Platform
email: [EMAIL PROTECTED]
mobile: +61 4 0290 1228
"The key ingredients of success are a crystal-clear goal,
a realistic attack plan to achieve that goal,
and consistent, daily action to reach that goal."
Steve Maguire, "Debugging the Development Process".
LISAsoft
http://www.lisasoft.com/
Adelaide Sydney
-------------------- ------------------------
38 Greenhill Rd Level 3, 228 Pitt Street
Wayville S.A. 5034 Sydney NSW 2000
Australia Australia
PH +61 8 8272 1555 PH +61 2 9283 0877
FAX +61 8 8271 1199 FAX +61 2 9283 0866
-------------------- ------------------------
===========================================================================
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".