synchronoss / cpo-api

Class Persistence Object (CPO) Application Programming Interface (API).
GNU Lesser General Public License v2.1
3 stars 3 forks source link

checking for container wrapped connections #4

Closed sshrav closed 3 years ago

sshrav commented 10 years ago

refactored TransformBase to BaseTransform

berryware commented 10 years ago

should it be BaseTransform or JDBCBaseTransform

berryware commented 10 years ago

JdbcCpoTransform has two transformOut calls. public interface JdbcCpoTransform<D, J> extends CpoTransform<D, J> { public D transformOut(JdbcPreparedStatementFactory jpsf, J attributeObject) throws CpoException; public D transformOut(JdbcCallableStatementFactory jpsf, J attributeObject) throws CpoException; }

There needs to be another handleConnection call for JdbcCallableStatement

berryware commented 10 years ago

we should probably call the method unwrapConnection, since that is what we are doing

mbellomo commented 10 years ago

Agree with Dave on both counts: -name this thing BaseJDBCTransform -rename the method as he suggested

Still not sure I like this approach though...seems dirty.

mbellomo commented 10 years ago

Does the JBoss WrappedConnection implement the Wrapper interface? I thought the reason we had to have our own check was because it did not.

sshrav commented 10 years ago

I believe so.. The unwrap call internally invokes the getUnderlyingConnection method and returns us the connection.

FYI- http://grepcode.com/file/repository.jboss.org/nexus/content/repositories/releases/org.jboss.ironjacamar/ironjacamar-jdbc/1.0.7.Final/org/jboss/jca/adapters/jdbc/WrappedConnection.java

The unwrap method is an inherited method which calls the overridden getWrappedObject() method. The getWrappedObject() method in turn calls the getUnderlyingConnection() and returns the underlying connection;

mbellomo commented 10 years ago

If that's the case, then I'm much happier w/ this code change as it's generic.

@berryware - thoughts? If you agree this is good, I'll accept the pull and merge it in.

berryware commented 3 years ago

Closing as the Blob transform for oracle is no longer needed. Please let me know if you feel otherwise.