Announcement Announcement Module
Collapse
No announcement yet.
performance too slow Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • performance too slow

    we are using Spring+Hibernate+Oracle to develop our application and performance seems to slow down a whole lot.
    we use JBoss as our application server.
    we havent implemented any second level cache.
    we observed that the hibernate data doesnt get flushed with each transaction. we saw 54MB of data on our server and goes up to 200MB once the user logs in.
    we use HibernateTransactionManager for transactions.

    <!-- Transaction manager for a single Hibernate SessionFactory (alternative to JTA) -->
    <!-- Hibernate Transaction Manager -->
    <bean id="myTransactionManager" class="org.springframework.orm.hibernate.Hibernate TransactionManager">
    <property name="sessionFactory">
    <ref local="mySessionFactory"/>
    </property>
    <!--<property name="entityInterceptor">
    <ref local="lobCleanUpInterceptor"/>
    </property>-->
    </bean>

    <!-- Transaction Proxy Template -->
    <bean id="txProxyTemplate" lazy-init="true"
    class="org.springframework.transaction.interceptor .TransactionProxyFactoryBean">
    <property name="transactionManager">
    <ref local="myTransactionManager"/>
    </property>
    <property name="transactionAttributes">
    <props>
    <prop key="*">PROPAGATION_REQUIRED</prop>
    </props>
    </property>
    </bean>

    Any help as to how to tune to improve the performance is appreciated.

    Thanks

  • #2
    I don't see a target defined on the TransactionProxyFactoryBean.

    Comment


    • #3
      <!-- Defects Entry service -->
      <bean id="myDefectsService" parent="txProxyTemplate" >
      <property name="target">
      <bean class="com.xxx.service.DefectsEntryServiceImpl"></bean>
      </property>
      <property name="transactionAttributes">
      <props>
      <prop key="add*">PROPAGATION_REQUIRED,-Exception</prop>
      <prop key="flag*">PROPAGATION_REQUIRED,-Exception</prop>
      <prop key="remove*">PROPAGATION_REQUIRED,-Exception</prop>
      <prop key="*">PROPAGATION_REQUIRED,-Exception</prop>
      </props>
      </property>
      </bean>

      Comment


      • #4
        Use lazy loading as much as possible. Second level cache is useful for some "imutable" objects. Dont bloat your http session more than neccesary.

        If that doesnt help, try this next approach: http://dev2dev.bea.com/pub/a/2005/04...prise_aop.html

        -- Atlassian profiling library.

        Comment


        • #5
          You might want to check how many objects you have in the Hibernate session. You can do this with a custom HibernateInterceptor. It may well be that you're getting a very large number of objects in the session, which will cause Hibernate to spend a lot of time dirty checking on flush--which it will need to do before querying.

          Comment

          Working...
          X