Results 1 to 5 of 5

Thread: performance too slow

  1. #1

    Default 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. #2
    Join Date
    Aug 2004
    Posts
    1,107

    Default

    I don't see a target defined on the TransactionProxyFactoryBean.
    Thomas Risberg
    SpringSource by Pivotal
    http://www.springsource.org

  3. #3

    Default

    <!-- 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>

  4. #4
    Join Date
    Aug 2004
    Location
    Vrhnika, Slovenia
    Posts
    133

    Default

    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.

  5. #5
    Join Date
    Aug 2004
    Location
    San Mateo, CA
    Posts
    1,265

    Default

    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.
    Rod Johnson - GM, SpringSource Division, VMware
    http://www.springsource.com
    Spring From the Source

Similar Threads

  1. runtime performance
    By dabret in forum Data
    Replies: 3
    Last Post: Sep 18th, 2005, 08:43 AM
  2. JDBCTemplate Performance issue
    By tanmay in forum Data
    Replies: 1
    Last Post: Jun 22nd, 2005, 07:41 AM
  3. CGLIB Factory performance
    By tysonnorris in forum AOP
    Replies: 4
    Last Post: Mar 6th, 2005, 03:28 PM
  4. Replies: 0
    Last Post: Dec 30th, 2004, 09:23 AM
  5. Http-invoker performance?
    By jacekk in forum Remoting
    Replies: 8
    Last Post: Dec 11th, 2004, 06:47 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •