tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sternbergh, Cornell" <>
Subject InitialContextFactory
Date Thu, 12 Aug 2004 15:01:25 GMT
Short version:
What's the initial context factory for Tomcat (for use in accessing DB2
via db2cli for Windows via ODBC/JDBC)?

Long version:

I'm trying to evaluate Eclipse as an IDE for maintaining a Java project
(applications/servlets/jsps), originally written using VAJ for use on
Websphere.  I've gotten Tomcat 4.1 running on my machine, I've the
sysdeo plugin for Eclipse, which seems to be a bridge to Tomcat, so one
can deal with it in Eclipse.

I deployed a previously existing war, via Tomcat manager, into

Now, I can get to my first .JSP successfully :-), but...
It's a form whose contents are then checked against a database (JDBC to
ODBC to db2cli for Windows to Mainframe DB2).

In our project.props file, we set JNDI.InitialContextFactory to: (for testing in VAJ's WTE)
and (for production) on

The project's framework reads the .props file and sets various things,
I've included a code snippet below.

Right now, I'm trying to find/figure out what to use for an initial
context factory, that's not an IBM class.  When I continue and try the
form, with the IBM class,
javax.naming.spi.NamingManager.getInitialContext throws a
ClassNotFoundException on the IBM class (cause it's not there) 

So... the two application servers from IBM have different initial
context factories, I'm assuming that Tomcat also has an initial context
factory.  What is it?

Or... Maybe I need something completely different ;-)

Anyway, here's the code snippet showing the use of the

  try {
    Hashtable initContextProps = new Hashtable();
g) configService.getPropert("JNDI.InitialContextFactory"));
    javax.naming.InitialContext context = new

    DataSource ds =

  if (dbConn!=null) dbConn.setAutoCommit(false);


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message