Wouldn't you get a ClassNotFound exception when trying to run under
JBOSS using the weblogic.jdbc.common.OracleClob in your code? I think
you need to use introspection.
-AP_
Chester Chen wrote:
Thanks for all the replies. I guess there is no Metadata to work with.
the instanceof operator works for me.
Thanks
Chester
-----Original Message-----
From: Siarhei Adzinets [mailto:[EMAIL PROTECTED]
Sent: Tuesday, April 06, 2004 11:45 PM
To: [EMAIL PROTECTED]
Subject: Re: How to find out the type of application Server at Runtime
Hi, Chester,
I suggest you using instanceof operator.
Something like this:
Clob clob = rs.getClob(1);
if(clob instanceof oracle.sql.CLOB)
outStream = ((oracle.sql.CLOB)clob).getCharacterOutputStream();
else
outStream =
((weblogic.jdbc.common.OracleClob)clob).getCharacterOutputStream();
Best regards,
Siarhei Adzinets
----- Original Message -----
From: "Chester Chen" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, April 06, 2004 10:37 PM
Subject: How to find out the type of application Server at Runtime
Hi,
Is there a way to find out the type of application server
for example: Weblogic, JBOSS or Web Server, at runtime from code ?
Some sort of Application Server Metadata will help.
I am adding LOB support for Application Server. As the
weblogic needs special JDBC Oralce extension for Oralce
Thin driver (for
retrieving LOB) , I need
to cast the proper class at run time for different
application Servers.
Any suggestions ?
Also, an related question: Does JBOSS or WebSphere need
JDBC extensions
for Oracle Thin Driver ?
Some example or some pointers are appreciated
Thanks
Chester
==============================================================
=============
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".
==============================================================
=============
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".
===========================================================================
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".
--
-AP_
http://www.myprofiles.com/member/profile/apara_personal
http://www.myprofiles.com/member/profile/apara_business
===========================================================================
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".