-->
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: @LazyCollection(LazyCollectionOption.EXTRA) - FlushMode
PostPosted: Fri Apr 11, 2008 5:49 am 
Newbie

Joined: Fri Apr 11, 2008 5:16 am
Posts: 1
Hi all

I'am currently using Core: 3.2.6.ga / EM: 3.3.2.GA

Can please someone double check my suspects that EntityManager does not respect FlushMode.MANUAL or any other FlushMode when collections are annotated with @LazyCollection(LazyCollectionOption.EXTRA).

I'm facing this problem with jboss seam on a Form with 8 SelectOneMenus (using entityConverter). When I save the Form, Update-Statements are produced in UPDATA-MODEL-PHASE and flushed to DB. When the cycle arrives to INVOKE-APPLICATION-PHASE everything is flushed.

My current workaround is to disable LazyCollectionOption.EXTRA, but to the price of a huge performance impact - LazyCollectionOption.EXTRA is really cool.

Does anyone know some better workaround?

P.s. you cannot reproduce this behavior without having multiple Entities or Collections involved because I think EntityManager needs a certain amount of dirty objects to flush.

Thank you for double checking or some better workaround.

Code:
13:28:15,274 INFO  [STDOUT] View :<not available> - Before Phase :RESTORE_VIEW 1 Time: 13:28:15.274
13:28:15,274 INFO  [STDOUT] View :/views/requesttool/request/edit.xhtml - After  Phase :RESTORE_VIEW 1 Time: 13:28:15.274
13:28:15,274 INFO  [STDOUT] View :/views/requesttool/request/edit.xhtml - Before Phase :APPLY_REQUEST_VALUES 2 Time: 13:28:15.274
13:28:15,321 INFO  [STDOUT] View :/views/requesttool/request/edit.xhtml - After  Phase :APPLY_REQUEST_VALUES 2 Time: 13:28:15.321
13:28:15,321 INFO  [STDOUT] View :/views/requesttool/request/edit.xhtml - Before Phase :PROCESS_VALIDATIONS 3 Time: 13:28:15.321
13:28:15,383 INFO  [STDOUT] View :/views/requesttool/request/edit.xhtml - After  Phase :PROCESS_VALIDATIONS 3 Time: 13:28:15.383
13:28:15,383 INFO  [STDOUT] View :/views/requesttool/request/edit.xhtml - Before Phase :UPDATE_MODEL_VALUES 4 Time: 13:28:15.383
13:28:15,383 INFO  [STDOUT] Hibernate:
    select
        1
    from
        REQ_Request
    where
        RequestType_Id =?
        and Id =?
13:28:15,383 INFO  [STDOUT] Hibernate:
    select
        1
    from
        REQ_Request
    where
        RequestType_Id =?
        and Id =?
13:28:15,399 INFO  [STDOUT] Hibernate:
    select
        1
    from
        REQ_Request
    where
        RequestType_Id =?
        and Id =?
13:28:15,399 INFO  [STDOUT] Hibernate:
    select
        1
    from
        REQ_Request
    where
        RequestSubjectArea_Id =?
        and Id =?
13:28:15,399 INFO  [STDOUT] Hibernate:
    select
        1
    from
        REQ_Request
    where
        RequestSubjectArea_Id =?
        and Id =?
13:28:15,399 INFO  [STDOUT] Hibernate:
    select
        1
    from
        REQ_Request
    where
        RequestSubjectArea_Id =?
        and Id =?
13:28:15,399 INFO  [STDOUT] Hibernate:
    select
        1
    from
        REQ_Request
    where
        RequestSubjectArea_Id =?
        and Id =?
13:28:15,399 INFO  [STDOUT] Hibernate:
    select
        1
    from
        REQ_Request
    where
        RequestPriority_Id =?
        and Id =?
13:28:15,399 INFO  [STDOUT] Hibernate:
    select
        1
    from
        REQ_Request
    where
        RequestPriority_Id =?
        and Id =?
13:28:15,399 INFO  [STDOUT] Hibernate:
    update
        REQ_Request
    set
        ShortDescription=?,
        AffectedModule=?,
        Restricted=?,
        ClosingDate=?,
        CallNo=?,
        CallNoDate=?,
        RequestNo=?,
        RequestNoDate=?,
        EmailDate=?,
        RequestType_Id=?,
        RequestPriority_Id=?,
        RequestSubjectArea_Id=?,
        DetectingUser_Id=?,
        RegisteringUser_Id=?,
        SystemProvider_Id=?,
        OpeningRelease_Id=?,
        RevisionRelease_Id=?,
        Version=?
    where
        Id=?
13:28:15,414 INFO  [STDOUT] Hibernate:
    select
        1
    from
        REQ_Request
    where
        RequestPriority_Id =?
        and Id =?
13:28:15,430 INFO  [STDOUT] View :/views/requesttool/request/edit.xhtml - After  Phase :UPDATE_MODEL_VALUES 4 Time: 13:28:15.430
13:28:15,430 INFO  [STDOUT] View :/views/requesttool/request/edit.xhtml - Before Phase :INVOKE_APPLICATION 5 Time: 13:28:15.430
13:28:15,445 INFO  [STDOUT] View :/views/requesttool/request/edit.xhtml - After  Phase :INVOKE_APPLICATION 5 Time: 13:28:15.445


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.