WrappedCallableStatement does not allow access to the underlying CallableStatement object. You would need to get the underlying Oracle connection from the WrappedConnection object - there is a recent post on getting the Oracle specific connection. You would then use this OracleConnection object to create your OracleCallableStatement. There may be transactional ramifications from doing this. YMMV. Use with care.
Thanks. That did the trick.
Where can I find a discussion regarding the WrappedConnection and the transactional ramifications of using the underlying connection?
I bought the jBoss 3.2.1 book but could not find it there.
There is no specific discussion on the use of the underlying connection. The wrapped connection is used since EJBs, particularly entity beans work with datasource connections and are themselves transactional.
Say for example you have an EJB call another EJB and both work with writing datasource data. The actions they perform are designed intentionally to be atomic - if either one fails, nothing is committed. If a bean method fails in this EJB transactional chain, the datasource transactions spread throughout that chain are rolled back. The wrapped connection and the wrapped statements, et al perform underlying work to ensure the atomicity.
By using the underlying connection directly, you bypass these controls.
We implemented this same solution when upgrading from Jboss 2.4 to 3.1 - but have been worried about the use of the underlying connection.
Is there a recommend way to call getCursor without using the underlying connection in jboss 3?