non-JNDI EntityBean Oracle solution?
Hi -
I was wondering about an alternate way to
connect to Oracle from an entity bean...
In the J2EE examples for entity beans, the
context is queried to find the datasource
and then the datasource is queried to get
a connection.
To replace CLOUDSCAPE with ORACLE in the
reference implementation, I was thinking,
why not change the makeConnection() call,
in order/OrderBean.java from:
InitialContext ic = new InitialContext();
DataSource ds = (DataSource)ic.lookup("java:comp/env/jdbc/Oracle");
m_conn = ds.getConnection();
to:
try {
Class.forName("oracle.jdbc.driver.OracleDriver");
m_conn = DriverManager.getConnection("jdbc:oracle:thin:...", "scott", "tiger");
} catch (Exception e) { }
What are the implications of connecting
directly to Oracle and not using JNDI?

