Hi all,
I need help on implementing the blobstringtype.Earlier it was with blob ,now i have been asked to change it to blobstring type.
My config
Code:
<bean id="nativeJdbcExtractor" class="org.springframework.jdbc.support.nativejdbc.C3P0NativeJdbcExtractor" />
<bean id="oracleLobHandler" class="org.springframework.jdbc.support.lob.OracleLobHandler" lazy-init="true">
<property name="nativeJdbcExtractor"> <ref local="nativeJdbcExtractor" />
</property>
</bean>
<bean id="objCreateReqServiceImpl" class="com.ge.comfin.fleet.maintenance.requisition.service.CreateRequisitionServiceImpl">
</bean>
<bean id="cdbSessionFactory"
class="org.springframework.orm.hibernate3.LocalSessionFactoryBean">
<property name="dataSource">
<ref bean="cdbDataSource"/>
</property>
<property name="hibernateProperties">
<ref bean="envHibernateProperties" />
</property>
<property name="lobHandler"> <ref bean="oracleLobHandler"/> </property>
<!-- OR mapping files. -->
<property name="mappingResources">
<ref bean="com.ge.comfin.fleet.maintenance.requisition.CdbHibernateMappings.HIBERNATE_MAPPINGS_CDB"/>
</property>
</bean>
<tx:annotation-driven transaction-manager="transactionManager"/>
<bean id="transactionManager" class="org.springframework.transaction.jta.WebLogicJtaTransactionManager">
<property name="transactionManagerName" value="javax.transaction.TransactionManager"/>
</bean>
<bean id="myDAO" class="org.springframework.transaction.interceptor.TransactionProxyFactoryBean">
<property name="transactionManager" ref="transactionManager"/>
<property name="target" ref="objCreateReqServiceImpl"/>
<property name="transactionAttributes">
<props>
<prop key="saveOrUpdateDownTimeToBlob">PROPAGATION_REQUIRED</prop>
<prop key="saveOrUpdateWADetailsToBlob">PROPAGATION_REQUIRED</prop>
<prop key="saveWAToBlob">PROPAGATION_REQUIRED</prop>
<prop key="setAuthAmtZero">PROPAGATION_REQUIRED</prop>
<prop key="updateLineItemStatus">PROPAGATION_REQUIRED</prop>
<prop key="saveWaCommentDialog">PROPAGATION_REQUIRED</prop>
<prop key="saveWAToOracleAnd3090">PROPAGATION_REQUIRED</prop>
</props>
</property>
</bean>
my pojo
Code:
public class WASessionData extends ModifiableObject implements Serializable {
...
private String sessionWA;
public String getSessionWA() {
return sessionWA;
}
public void setSessionWA(String sessionWA) {
this.sessionWA = sessionWA;
}
my hbm
Code:
<hibernate-mapping>
<class name="com.ge.comfin.fleet.maintenance.requisition.orm.object.WASessionData" table="WA_SESSION_DATA">
<property name="sessionWA" type="org.springframework.orm.hibernate3.support.BlobStringType">
<column name="SESSION_DATA" length="4000" precision="0" not-null="false"/>
</property>
and i have
Code:
@Transactional
public WA saveOrUpdateWADetailsToBlob(WA wa,WADetails waDetails, int tempIdForSubDetails, HashMap<Object, Object> additionalWAInformation,String userId, boolean isExternalUser, AssetDetails assetDetails, MaintenanceContract maintenanceContract) throws Exception,
ClassNotFoundException, SQLException {
for all the methods specified in config gile
and i am using hibernate version3.6.10.
Please let me know whether my config is right or not.
any help would be greatly appreciated.
thanks.