9 Replies Latest reply on Jun 14, 2010 10:04 PM by rebody

    JBPM-2694 and JBPM-2798

    rebody

      Hi guys,

       

      Martin has provide two patch for jta and id gernator.

       

      https://jira.jboss.org/browse/JBPM-2694 could auto lookup JTATransaction configuration from hibernate configuration for weblogic environment.

       

      https://jira.jboss.org/browse/JBPM-2798 could fix the id generator issue on Oracle and DB2 environment.

       

      And Ronald has already test them and said both of them were all right.

       

      Should we commit both of those patches?  BTW: I have neither weblogic or db2 environments, so I cannot test them.

       

      Any ideas?

        • 1. Re: JBPM-2694 and JBPM-2798
          swiderski.maciej

          JBPM-2694, I am not sure that reading such information from hibernate configuration file is right way to go. I would suggest to extend the transaction binding, something like that:

           

          <transaction-context>
              <transaction user-transaction="" transaction-manager=""/>
              <hibernate-session />
            </transaction-context>
          

           

          So this would be more convenient in my opinion, not too much work to do and some of Martin's code could be reused as well.

           

          JBPM-2798, I was reading it and I am not so sure where is the problem - is it constraint violation on dbid_ or id_ column?! I would more likely say it is id_ column and your fix (appending dbid to the execution id - it is mapped to id_ column) perhaps solves the issue.

           

          What do you think?

          • 2. Re: JBPM-2694 and JBPM-2798
            rebody

            Hi Maciej,

             

            Actually, before I saw the Martin's patch, I have just create a patch just as same as you mentioned,  But I am worried if people have to configure JTA twice, both in hibernate.cfg.xml and jbpm.cfg.xml,  they could make mistake.  So I think Martin's patch may be better.

             

            About JBPM-2798, I am really not sure if this is caused by the compositeIds(),  so I think we could deplay this issue  and wait for somebody to clarify it.

            • 3. Re: JBPM-2694 and JBPM-2798
              swiderski.maciej

              HuiSheng Xu wrote:

               

              Actually, before I saw the Martin's patch, I have just create a patch just as same as you mentioned,  But I am worried if people have to configure JTA twice, both in hibernate.cfg.xml and jbpm.cfg.xml,  they could make mistake.  So I think Martin's patch may be better.

              Yes, that is a potential risk but in fact you are configuring two different components (hibernate and jbpm) I would say that having that configuration in jbpm.cfg.xml makes it not so tightly connected to hibernate and can be better in long term.

               

               

              HuiSheng Xu wrote:

               

              About JBPM-2798, I am really not sure if this is caused by the compositeIds(),  so I think we could deplay this issue  and wait for somebody to clarify it.

              Fine with that. Would be good if some one could give a try with latest trunk version if that is still an issue.

              • 4. Re: JBPM-2694 and JBPM-2798
                rebody

                Hi Maciej,

                 

                I think I could provide an addition attribute like 'autodetect', if someone want to JtaTransaction auto detect related configuration from hibernate configuration, he could set true.  Otherwise he could set user-transaction and transaction-manager directly

                • 5. Re: JBPM-2694 and JBPM-2798
                  swiderski.maciej

                  No, we should not introduce yet another attribute there. If you think that getting such info from hibernate is good idea then make it default but if attributes (user-transaction and transaction-manager) are given then use those.

                  My main argument for having only attributes of the configuration was to keep it on binding time. Perhaps you could modify the patch to read hibernate settings on binding time as well. I think that would be more consistent and easy to trace.

                  • 6. Re: JBPM-2694 and JBPM-2798
                    rebody

                    Hi Maciej,

                     

                    I like your suggestion.  And I will make a patch later.  Thank you very much.

                    • 7. Re: JBPM-2694 and JBPM-2798
                      rebody

                      Hi Maciej,

                       

                      I attached a new patch, and allow user set property or auto detect these properties from hibernate configuration.

                       

                      https://jira.jboss.org/browse/JBPM-2694

                      JBPM-2694-2010-05-30.patch
                      • 8. Re: JBPM-2694 and JBPM-2798
                        swiderski.maciej

                        Hi HuiSheng,

                         

                        great job, this is what I was talking about. Solution and implementation is perfect in my opinion.

                         

                        If no one has any objections I would suggest to have it incorporated with 4.4 release.

                        Cheers,

                        Maciej

                        • 9. Re: JBPM-2694 and JBPM-2798
                          rebody

                          Done, checked in r6413.