cancel
Showing results for 
Search instead for 
Did you mean: 

Oracle Blob - Issues migration Websphere/JBoss spring application to SAP.

Former Member
0 Kudos

I am trying to migrate a Websphere/JBoss spring application to SAP. The data base that I use is Oracle and one of the table has a BLOB field. In Websphere and JBoss while creating the sessionFactory bean in spring application context, I could specify which Native JDBC exctractor class to use. Both JBoss and Websphere had a NativeJdbcExtractor defined in spring framework. The SAP server does not. I have attached examples of sessionFactory definition that we are using. I could not find a NativeJDBCExctractor class for SAP WAS. I thought I could write a custom class. But did not know what is the sql wrapper classes that I should be using from SAP WAS. Please let me know.

This is for JBoss

<bean id="sessionFactory"

class="org.springframework.orm.hibernate3.LocalSessionFactoryBean">

<description>Hibernate session factory</description>

<property name="configLocation" value="/hibernate.cfg.xml"/>

<property name="hibernateProperties" value="classpath:hibernate.properties"/>

<property name="dataSource" ref="fleetcycleDataSource"/>

<property name="jtaTransactionManager" ref="transactionManagerJBossJTA"/>

<b> <property name="lobHandler">

<bean class="org.springframework.jdbc.support.lob.OracleLobHandler">

<property name="nativeJdbcExtractor">

<bean class="org.springframework.jdbc.support.nativejdbc.JBossNativeJdbcExtractor"/>

</property>

</bean>

</property></b>

</bean>

This is for websphere

<bean id="sessionFactory"

class="org.springframework.orm.hibernate3.LocalSessionFactoryBean">

<description>Hibernate session factory</description>

<property name="configLocation" value="/hibernate.cfg.xml"/>

<property name="hibernateProperties" value="classpath:hibernate.properties"/>

<property name="dataSource" ref="fleetcycleDataSource"/>

<property name="jtaTransactionManager" ref="enhancedTransactionManagerWAS"/>

<b> <property name="lobHandler">

<bean class="org.springframework.jdbc.support.lob.OracleLobHandler" lazy-init="true">

<property name="nativeJdbcExtractor">

<bean class="org.springframework.jdbc.support.nativejdbc.WebSphereNativeJdbcExtractor"/>

</property>

</bean>

</property></b>

</bean>

Message was edited by:

Viji Vidyadharan

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hello Viji Vidyadharan,

http://forum.springframework.org/showthread.php?t=38053 didn't help either, eh?

Let me answer your question.

I assume you want to use the spring framework on the WAS, too, i.e. you want to use Hibernate for the persistency layer. You do not intend to use OpenSQL, SAP's database abstraction layer for database independence, i.e. you configure your datasource to be "vendor SQL". See http://help.sap.com/saphelp_nw2004s/helpdata/en/57/1177611c11cd418564cdbc1488ce33/frameset.htm for more on Open SQL).

There is no NativeJDBCExtractor class and writing a custom class will not help either.

With SAP Web AS, you cannot get access to the underlying vender connection, etc. The objects returned are wrapped. This is due to the JDBC pooling that requires to have means to control the connection/statement etc. behaviour.

Ok, you could think of bypassing somehow. But I can tell you it will fail for the classloading architecture will prevent that.

You can have vendor specific sql queries which will be passed to the vendor's driver unmanipulated, but the objects returned are javax.sql.*.

Hope this answers your question.

Best,

Markus

Answers (1)

Answers (1)

Former Member
0 Kudos

Your suggestion was very helpful. I forgot to award you points for it. Thanks a lot.

Former Member
0 Kudos

Hello Viji Vidyadharan,

that's very kind.

Thank you!

Best,

Markus