This content has been marked as final.
Show 3 replies
-
1. Re: Using CLOB in Serlvet
vickyk Mar 26, 2008 12:18 PM (in response to prasnnap)"PrasnnaP" wrote:
System.out.println("Connection class = " + con.getClass().getName());
// This returns "$Proxy55"
No this can not be true , I have tested it right now with oracle .
Can you try it again with simple jsp page and see if you still see the Proxy , it should be
WrappedConnection .
http://wiki.jboss.org/wiki/Wiki.jsp?page=SetUpAOracleDatasource
Check thisHow to retrieve the underlying Oracle connection object? Connection conn = myJBossDatasource.getConnection(); WrappedConnection wrappedConn = (WrappedConnection)conn; Connection underlyingConn = wrappedConn.getUnderlyingConnection(); OracleConnection oracleConn = (OracleConnection)underlyingConn;
-
2. Re: Using CLOB in Serlvet
prasnnap Mar 27, 2008 12:58 AM (in response to prasnnap)Hi Vickyk,
Thanks for the reply. Even we are not sure why we getting the Proxy connection object in servlet. When we tried the same approach (i,e using DataSource) in EJB we getting the UnderlyingConnection. Can you let us know what exactly you tried to setup the JSP using DataSource.
What we did:
1) Created Datasource in -ds.xml file
2) Used the defined Datasource in our Servlet
Thanks in advance
Pras P -
3. Re: Using CLOB in Serlvet
vickyk Mar 27, 2008 1:14 PM (in response to prasnnap)"PrasnnaP" wrote:
Can you let us know what exactly you tried to setup the JSP using DataSource.
I did not try any rocket science there , all I did was this :)<% InitialContext context = new InitialContext(); DataSource ds = (DataSource)context.lookup("OracleDS"); Connection con = ds.getConnection(); out.println("Connectio is "+con); %>
You need to isolate the problem yourself and get back to us with more concrete evidence ;)