-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: need help on blobstringtype
PostPosted: Mon Apr 16, 2012 2:57 am 
Newbie

Joined: Mon Apr 16, 2012 2:43 am
Posts: 1
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.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.