Hi Kylie
In our company we use Oracle 9i in all the WEB apps running out of intranet. Mysql is used only by developers for quick tests.
I did not mean anything bad about DB2 database but for a student like me exercise does not help once I came back to work if I can't get it to run here at work. (I have only 3 weeeks of experience in WEBSphere,
Tomcat /jboss experience only by doing toy projects in the college). I have oracle 9i installed and mysql installed and want to get library project up on my machine for a week, still could not get it to work. I just showed my frustration, but nothing to do with DB2 .. I apologize if I hurt anyone withn my frustration.
Instructions in the lab exercises in WF311 is in DB2. To change the librarySETUP and libraryJava projects to run on Oracle or mysql , in the latter part of the lab instructions Authors of the SETUP project say that I can just change the databaseInformation.properties files with URL, Driver , username and password to selected any database and it should work.
They did not talk about how I will change the DB2...JNDI package(I know JNDI is used to create datasources and connections. ) and import COM.ibm.db2.jdbc.DB2DataSource package in CreateDatasource.java.
Also I don't know in oracle/mysql equivalent to following
initialContextFactory=COM.ibm.db2.jndi.DB2InitialContextFactory
--bottom line is the way they have coded the Librarysetup and libraryjava project in WF311 cannot run on Oracle /mysql just changing databaseInformation.properties file only.
I asked the Instructor he was not sure either how to make it to work on oracle/mysql.
Can you please tell me what is the Oracle and /or MySQL equivalent for below DB2 variables given below.
Can you tell me what should be the equivalent values if I were to use MySQL and Oracle (thin driver) respectively ?
----------------------
Here's the other
java code I need to modify with correct oracle and mysql values..
(For Eg: I need to know the oracle equivalent of "COM.ibm.db2.jndi.DB2InitialContextFactory", "COM.ibm.db2.jdbc.app.DB2Driver" )
This is a part of properties file.
url=jdbc
b2:library
driver=COM.ibm.db2.jdbc.app.DB2Driver
initialContextFactory=COM.ibm.db2.jndi.DB2InitialContextFactory
lookupName=jdbc/library
Here's a code snippet from WF311 WEBSphere class at IBM.
public class DatabaseManagement {
// resource bundle keys
private static final String USERID = "userid";
private static final String PASSWORD = "password";
private static final String DRIVER = "driver";
private static final String URL = "url";
private static final String FACTORY = "initialContextFactory";
private static final String LOOKUP = "lookupName";
private static final String DATABASE = "database";
// default values to use if no properties bundle is found
private static String userid = "USERID";
private static String password = "PASSWORD";
private static String driver = "COM.ibm.db2.jdbc.app.DB2Driver";
private static String url = "jdbc
b2:library";
private static String initialContextFactory = "COM.ibm.db2.jndi.DB2InitialContextFactory";
private static String lookupName = "jdbc/library";
private static String database = "library";
private static final String file = "databaseInformation.properties";
private static PropertyResourceBundle properties;
--------------------
ublic class DatastoreFactory {
// resource bundle keys
private static final String TYPE = "type";
private static final String TYPE_EJB = "ejb";
private static final String TYPE_POOL = "pool";
private static final String TYPE_JDBC = "jdbc";
private static final String USERID = "userid";
private static final String PASSWORD = "password";
private static final String DRIVER = "driver";
private static final String URL = "url";
private static final String FACTORY = "initialContextFactory";
private static final String LOOKUPURL = "lookupURL";
private static final String LOOKUP = "lookupName";
// default values to use if no properties bundle is found
private static String type = "jdbc";
private static String userid = "USERID";
private static String password = "PASSWORD";
private static String driver = "COM.ibm.db2.jdbc.app.DB2Driver";
private static String url = "jdbc
b2:library";
private static String contextFactory = "COM.ibm.db2.jndi.DB2InitialContextFactory";
private static String lookupURL="iiop:///";
private static String lookupName = "jdbc/library";
private static final String file = "databaseInformation.properties";
private static PropertyResourceBundle properties;
private static PatronDatastore patronDatastore;
private static ItemDatastore itemDatastore;
private static CopyDatastore copyDatastore;
Thanks
Mei