Most of the EJB servers offer you a connection pooling mechanism. This mechanism
basically
works like this:
* You request a database connection from the datasource
* The container looks in its pool if there is a DB Connection available. If not, it
creates one
* The container wraps this DB connection with a "proprietary" DB connection. All
the calls
are delegated to the actual DB connection, except some (close() returns the
connection
to the pool instead of closing it, setAutoCommit() is a no-op, ...)
* The container returns you this "proprietary" DB connection.
You should thus print the class name of the DBConnection (getClass().getName()), and
look in
your EJB Server documentation to see if this class gives you the ability to access the
underlying DB connection, which should be the real Oracle connection.
JB.
KrishnaKumar Santhanam wrote:
> java.lang.ClassCastException
>
> I get the above error in the following code. (RUNTIME ERROR).
>
> Type casting to OracleConnection is what is suggested in Oracle JDBC
> reference manual.
>
> Any idea. Please!
>
> -Krishna
> <deleted>
--
Jean-Baptiste Nizet
[EMAIL PROTECTED]
R&D Engineer, S1 Belgium
Kleine Kloosterstraat, 23
B-1932 Sint-Stevens Woluwe
+32 2 200 45 42
===========================================================================
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".