[jira] Created: (OFBIZ-333) ServiceMultiEventHandler to support configurable global transaction

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
20 messages Options
Reply | Threaded
Open this post in threaded view
|

[jira] Created: (OFBIZ-333) ServiceMultiEventHandler to support configurable global transaction

Nicolas Malin (Jira)
ServiceMultiEventHandler to support configurable global transaction
-------------------------------------------------------------------

                 Key: OFBIZ-333
                 URL: http://issues.apache.org/jira/browse/OFBIZ-333
             Project: OFBiz (The Open for Business Project)
          Issue Type: Improvement
          Components: framework
            Reporter: Si Chen


This is a continuation of OFBIZ-201: the ServiceMultiEventHandler will be enhanced to support configurable global transaction.  This will be done by adding a "global-transaction" attribute to the event tag:

        <event type="service-multi" path="" invoke="quickScheduleShipmentRouteSegment"/>

for global-transaction="true|false" which defaults to true.  If global-transaction="false" then there will be no TransactionUtil.begin(..) and commit(..) around the services calls.  Instead, each service will be called with its own transaction, and whatever messages it returns will be added to a List of messages to be sent back to the request.

--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

       
Reply | Threaded
Open this post in threaded view
|

[jira] Updated: (OFBIZ-333) ServiceMultiEventHandler to support configurable global transaction

Nicolas Malin (Jira)
     [ http://issues.apache.org/jira/browse/OFBIZ-333?page=all ]

Si Chen updated OFBIZ-333:
--------------------------

    Attachment: ofbiz133-1.patch

Please take a look at this patch and let me know if there are any issues with it.



> ServiceMultiEventHandler to support configurable global transaction
> -------------------------------------------------------------------
>
>                 Key: OFBIZ-333
>                 URL: http://issues.apache.org/jira/browse/OFBIZ-333
>             Project: OFBiz (The Open for Business Project)
>          Issue Type: Improvement
>          Components: framework
>            Reporter: Si Chen
>         Attachments: ofbiz133-1.patch
>
>
> This is a continuation of OFBIZ-201: the ServiceMultiEventHandler will be enhanced to support configurable global transaction.  This will be done by adding a "global-transaction" attribute to the event tag:
>         <event type="service-multi" path="" invoke="quickScheduleShipmentRouteSegment"/>
> for global-transaction="true|false" which defaults to true.  If global-transaction="false" then there will be no TransactionUtil.begin(..) and commit(..) around the services calls.  Instead, each service will be called with its own transaction, and whatever messages it returns will be added to a List of messages to be sent back to the request.

--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

       
Reply | Threaded
Open this post in threaded view
|

[jira] Commented: (OFBIZ-333) ServiceMultiEventHandler to support configurable global transaction

Nicolas Malin (Jira)
In reply to this post by Nicolas Malin (Jira)
    [ http://issues.apache.org/jira/browse/OFBIZ-333?page=comments#action_12438656 ]
           
David E. Jones commented on OFBIZ-333:
--------------------------------------

This is an important issue, but I'm not sure if it justifies a change to the EventHandler interface... I'm also thinking that because the rest of the transaction related settings are on the service definition it would be nice if this went there as well.

> ServiceMultiEventHandler to support configurable global transaction
> -------------------------------------------------------------------
>
>                 Key: OFBIZ-333
>                 URL: http://issues.apache.org/jira/browse/OFBIZ-333
>             Project: OFBiz (The Open for Business Project)
>          Issue Type: Improvement
>          Components: framework
>            Reporter: Si Chen
>         Attachments: ofbiz133-1.patch
>
>
> This is a continuation of OFBIZ-201: the ServiceMultiEventHandler will be enhanced to support configurable global transaction.  This will be done by adding a "global-transaction" attribute to the event tag:
>         <event type="service-multi" path="" invoke="quickScheduleShipmentRouteSegment"/>
> for global-transaction="true|false" which defaults to true.  If global-transaction="false" then there will be no TransactionUtil.begin(..) and commit(..) around the services calls.  Instead, each service will be called with its own transaction, and whatever messages it returns will be added to a List of messages to be sent back to the request.

--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

       
Reply | Threaded
Open this post in threaded view
|

[jira] Commented: (OFBIZ-333) ServiceMultiEventHandler to support configurable global transaction

Nicolas Malin (Jira)
In reply to this post by Nicolas Malin (Jira)
    [ http://issues.apache.org/jira/browse/OFBIZ-333?page=comments#action_12438755 ]
           
Si Chen commented on OFBIZ-333:
-------------------------------

David,

Our problem was that there was no other easy way to pass a controller tag attribute to the ServiceMultiEventHandler.  Can you suggest a better way to do it?  We can definitely change it--but just can't figure out how right now.

I guess one other way is to configure that in the form.  Do you think that's better?

Also, what do you mean by "because the rest of the transaction related settings are on the service definition it would be nice if this went there as well"?  That we should move the use-global-transaction to the services xml?  I don't think that would work because this is a setting on whether to wrap multiple calls to a service in a request in a big transaction or not.  It actually is request-map dependent and is not a function of the service itself.

> ServiceMultiEventHandler to support configurable global transaction
> -------------------------------------------------------------------
>
>                 Key: OFBIZ-333
>                 URL: http://issues.apache.org/jira/browse/OFBIZ-333
>             Project: OFBiz (The Open for Business Project)
>          Issue Type: Improvement
>          Components: framework
>            Reporter: Si Chen
>         Attachments: ofbiz133-1.patch
>
>
> This is a continuation of OFBIZ-201: the ServiceMultiEventHandler will be enhanced to support configurable global transaction.  This will be done by adding a "global-transaction" attribute to the event tag:
>         <event type="service-multi" path="" invoke="quickScheduleShipmentRouteSegment"/>
> for global-transaction="true|false" which defaults to true.  If global-transaction="false" then there will be no TransactionUtil.begin(..) and commit(..) around the services calls.  Instead, each service will be called with its own transaction, and whatever messages it returns will be added to a List of messages to be sent back to the request.

--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

       
Reply | Threaded
Open this post in threaded view
|

[jira] Commented: (OFBIZ-333) ServiceMultiEventHandler to support configurable global transaction

Nicolas Malin (Jira)
In reply to this post by Nicolas Malin (Jira)
    [ http://issues.apache.org/jira/browse/OFBIZ-333?page=comments#action_12440352 ]
           
Jacopo Cappellato commented on OFBIZ-333:
-----------------------------------------

What should we do with this issue?
I'd really like to see this problem resolved in a way or the other.


> ServiceMultiEventHandler to support configurable global transaction
> -------------------------------------------------------------------
>
>                 Key: OFBIZ-333
>                 URL: http://issues.apache.org/jira/browse/OFBIZ-333
>             Project: OFBiz (The Open for Business Project)
>          Issue Type: Improvement
>          Components: framework
>            Reporter: Si Chen
>         Attachments: ofbiz133-1.patch
>
>
> This is a continuation of OFBIZ-201: the ServiceMultiEventHandler will be enhanced to support configurable global transaction.  This will be done by adding a "global-transaction" attribute to the event tag:
>         <event type="service-multi" path="" invoke="quickScheduleShipmentRouteSegment"/>
> for global-transaction="true|false" which defaults to true.  If global-transaction="false" then there will be no TransactionUtil.begin(..) and commit(..) around the services calls.  Instead, each service will be called with its own transaction, and whatever messages it returns will be added to a List of messages to be sent back to the request.

--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

       
Reply | Threaded
Open this post in threaded view
|

[jira] Updated: (OFBIZ-333) ServiceMultiEventHandler to support configurable global transaction

Nicolas Malin (Jira)
In reply to this post by Nicolas Malin (Jira)
     [ http://issues.apache.org/jira/browse/OFBIZ-333?page=all ]

Si Chen updated OFBIZ-333:
--------------------------

    Attachment: ofbiz-333.2.patch

Ok, how about this then?  

> ServiceMultiEventHandler to support configurable global transaction
> -------------------------------------------------------------------
>
>                 Key: OFBIZ-333
>                 URL: http://issues.apache.org/jira/browse/OFBIZ-333
>             Project: OFBiz (The Open for Business Project)
>          Issue Type: Improvement
>          Components: framework
>            Reporter: Si Chen
>         Attachments: ofbiz-333.2.patch, ofbiz133-1.patch
>
>
> This is a continuation of OFBIZ-201: the ServiceMultiEventHandler will be enhanced to support configurable global transaction.  This will be done by adding a "global-transaction" attribute to the event tag:
>         <event type="service-multi" path="" invoke="quickScheduleShipmentRouteSegment"/>
> for global-transaction="true|false" which defaults to true.  If global-transaction="false" then there will be no TransactionUtil.begin(..) and commit(..) around the services calls.  Instead, each service will be called with its own transaction, and whatever messages it returns will be added to a List of messages to be sent back to the request.

--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

       
Reply | Threaded
Open this post in threaded view
|

[jira] Commented: (OFBIZ-333) ServiceMultiEventHandler to support configurable global transaction

Nicolas Malin (Jira)
In reply to this post by Nicolas Malin (Jira)
    [ http://issues.apache.org/jira/browse/OFBIZ-333?page=comments#action_12442759 ]
           
Si Chen commented on OFBIZ-333:
-------------------------------

Hey guys -

Any problems with the new version?

> ServiceMultiEventHandler to support configurable global transaction
> -------------------------------------------------------------------
>
>                 Key: OFBIZ-333
>                 URL: http://issues.apache.org/jira/browse/OFBIZ-333
>             Project: OFBiz (The Open for Business Project)
>          Issue Type: Improvement
>          Components: framework
>            Reporter: Si Chen
>         Attachments: ofbiz-333.2.patch, ofbiz133-1.patch
>
>
> This is a continuation of OFBIZ-201: the ServiceMultiEventHandler will be enhanced to support configurable global transaction.  This will be done by adding a "global-transaction" attribute to the event tag:
>         <event type="service-multi" path="" invoke="quickScheduleShipmentRouteSegment"/>
> for global-transaction="true|false" which defaults to true.  If global-transaction="false" then there will be no TransactionUtil.begin(..) and commit(..) around the services calls.  Instead, each service will be called with its own transaction, and whatever messages it returns will be added to a List of messages to be sent back to the request.

--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

       
Reply | Threaded
Open this post in threaded view
|

[jira] Commented: (OFBIZ-333) ServiceMultiEventHandler to support configurable global transaction

Nicolas Malin (Jira)
In reply to this post by Nicolas Malin (Jira)
    [ http://issues.apache.org/jira/browse/OFBIZ-333?page=comments#action_12443087 ]
           
David E. Jones commented on OFBIZ-333:
--------------------------------------

This new patch is better in that it avoids changing that interface.

I'd still like to opinions from other people about where to put the attribute though. To me it makes more sense to put it with the other transaction attributes in the service definition. Heck, if we put it there it might even be useful for other things like other places where a service might be called multiple times...

> ServiceMultiEventHandler to support configurable global transaction
> -------------------------------------------------------------------
>
>                 Key: OFBIZ-333
>                 URL: http://issues.apache.org/jira/browse/OFBIZ-333
>             Project: OFBiz (The Open for Business Project)
>          Issue Type: Improvement
>          Components: framework
>            Reporter: Si Chen
>         Attachments: ofbiz-333.2.patch, ofbiz133-1.patch
>
>
> This is a continuation of OFBIZ-201: the ServiceMultiEventHandler will be enhanced to support configurable global transaction.  This will be done by adding a "global-transaction" attribute to the event tag:
>         <event type="service-multi" path="" invoke="quickScheduleShipmentRouteSegment"/>
> for global-transaction="true|false" which defaults to true.  If global-transaction="false" then there will be no TransactionUtil.begin(..) and commit(..) around the services calls.  Instead, each service will be called with its own transaction, and whatever messages it returns will be added to a List of messages to be sent back to the request.

--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

       
Reply | Threaded
Open this post in threaded view
|

[jira] Commented: (OFBIZ-333) ServiceMultiEventHandler to support configurable global transaction

Nicolas Malin (Jira)
In reply to this post by Nicolas Malin (Jira)
    [ http://issues.apache.org/jira/browse/OFBIZ-333?page=comments#action_12443105 ]
           
Si Chen commented on OFBIZ-333:
-------------------------------

David,

Thanks for looking at it.

The reason I thought it made sense in the controller is that the service-multi-event is a controller thing, and also because the same service could be called in different places in the controller, but sometimes with just a row-level transaction and sometimes with a global-transaction on top.

> ServiceMultiEventHandler to support configurable global transaction
> -------------------------------------------------------------------
>
>                 Key: OFBIZ-333
>                 URL: http://issues.apache.org/jira/browse/OFBIZ-333
>             Project: OFBiz (The Open for Business Project)
>          Issue Type: Improvement
>          Components: framework
>            Reporter: Si Chen
>         Attachments: ofbiz-333.2.patch, ofbiz133-1.patch
>
>
> This is a continuation of OFBIZ-201: the ServiceMultiEventHandler will be enhanced to support configurable global transaction.  This will be done by adding a "global-transaction" attribute to the event tag:
>         <event type="service-multi" path="" invoke="quickScheduleShipmentRouteSegment"/>
> for global-transaction="true|false" which defaults to true.  If global-transaction="false" then there will be no TransactionUtil.begin(..) and commit(..) around the services calls.  Instead, each service will be called with its own transaction, and whatever messages it returns will be added to a List of messages to be sent back to the request.

--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

       
Reply | Threaded
Open this post in threaded view
|

[jira] Commented: (OFBIZ-333) ServiceMultiEventHandler to support configurable global transaction

Nicolas Malin (Jira)
In reply to this post by Nicolas Malin (Jira)
    [ http://issues.apache.org/jira/browse/OFBIZ-333?page=comments#action_12446323 ]
           
Si Chen commented on OFBIZ-333:
-------------------------------

Hmm...just you and me on this one, it seems.  Well, are you ok enough with it to put it in?

> ServiceMultiEventHandler to support configurable global transaction
> -------------------------------------------------------------------
>
>                 Key: OFBIZ-333
>                 URL: http://issues.apache.org/jira/browse/OFBIZ-333
>             Project: OFBiz (The Open for Business Project)
>          Issue Type: Improvement
>          Components: framework
>            Reporter: Si Chen
>         Attachments: ofbiz-333.2.patch, ofbiz133-1.patch
>
>
> This is a continuation of OFBIZ-201: the ServiceMultiEventHandler will be enhanced to support configurable global transaction.  This will be done by adding a "global-transaction" attribute to the event tag:
>         <event type="service-multi" path="" invoke="quickScheduleShipmentRouteSegment"/>
> for global-transaction="true|false" which defaults to true.  If global-transaction="false" then there will be no TransactionUtil.begin(..) and commit(..) around the services calls.  Instead, each service will be called with its own transaction, and whatever messages it returns will be added to a List of messages to be sent back to the request.

--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

       
Reply | Threaded
Open this post in threaded view
|

Need Feedback on Design Issue (was: Re: [jira] Commented: (OFBIZ-333) ServiceMultiEventHandler to support configurable global transaction)

David E Jones-2

We need some feedback on a design issue.

The question is where to put the configuration option for specifying  
whether or not to wrap the multiple service calls from the service-
multi event handler in a single transaction.

Where would people prefer to configure this option? The two main  
places are probably either the event element in the controller.xml  
file where the service-multi even handler is specified, or on the  
service element in the service definition XML file where the other  
transaction related attributes are defined.

Please express your opinion on this! We'd like to make a decision and  
get this in soon.

-David


On Nov 1, 2006, at 10:56 AM, Si Chen (JIRA) wrote:

>     [ http://issues.apache.org/jira/browse/OFBIZ-333?
> page=comments#action_12446323 ]
>
> Si Chen commented on OFBIZ-333:
> -------------------------------
>
> Hmm...just you and me on this one, it seems.  Well, are you ok  
> enough with it to put it in?
>
>> ServiceMultiEventHandler to support configurable global transaction
>> -------------------------------------------------------------------
>>
>>                 Key: OFBIZ-333
>>                 URL: http://issues.apache.org/jira/browse/OFBIZ-333
>>             Project: OFBiz (The Open for Business Project)
>>          Issue Type: Improvement
>>          Components: framework
>>            Reporter: Si Chen
>>         Attachments: ofbiz-333.2.patch, ofbiz133-1.patch
>>
>>
>> This is a continuation of OFBIZ-201: the ServiceMultiEventHandler  
>> will be enhanced to support configurable global transaction.  This  
>> will be done by adding a "global-transaction" attribute to the  
>> event tag:
>>         <event type="service-multi" path=""  
>> invoke="quickScheduleShipmentRouteSegment"/>
>> for global-transaction="true|false" which defaults to true.  If  
>> global-transaction="false" then there will be no  
>> TransactionUtil.begin(..) and commit(..) around the services  
>> calls.  Instead, each service will be called with its own  
>> transaction, and whatever messages it returns will be added to a  
>> List of messages to be sent back to the request.
>
> --
> This message is automatically generated by JIRA.
> -
> If you think it was sent incorrectly contact one of the  
> administrators: http://issues.apache.org/jira/secure/ 
> Administrators.jspa
> -
> For more information on JIRA, see: http://www.atlassian.com/ 
> software/jira
>
>

Reply | Threaded
Open this post in threaded view
|

Re: Need Feedback on Design Issue (was: Re: [jira] Commented: (OFBIZ-333) ServiceMultiEventHandler to support configurable global transaction)

cjhowe
I would prefer in the controller.xml as a subelement
(as opposed to attribute) to the <event> tag as
additional config parameters may be beneficial in the
future.

Putting it at the service definition would limit it's
flexibility.

--- David E Jones <[hidden email]>
wrote:

>
> We need some feedback on a design issue.
>
> The question is where to put the configuration
> option for specifying  
> whether or not to wrap the multiple service calls
> from the service-
> multi event handler in a single transaction.
>
> Where would people prefer to configure this option?
> The two main  
> places are probably either the event element in the
> controller.xml  
> file where the service-multi even handler is
> specified, or on the  
> service element in the service definition XML file
> where the other  
> transaction related attributes are defined.
>
> Please express your opinion on this! We'd like to
> make a decision and  
> get this in soon.
>
> -David
>
>
> On Nov 1, 2006, at 10:56 AM, Si Chen (JIRA) wrote:
>
> >     [
> http://issues.apache.org/jira/browse/OFBIZ-333?
> > page=comments#action_12446323 ]
> >
> > Si Chen commented on OFBIZ-333:
> > -------------------------------
> >
> > Hmm...just you and me on this one, it seems.
> Well, are you ok  
> > enough with it to put it in?
> >
> >> ServiceMultiEventHandler to support configurable
> global transaction
> >>
>
-------------------------------------------------------------------

> >>
> >>                 Key: OFBIZ-333
> >>                 URL:
> http://issues.apache.org/jira/browse/OFBIZ-333
> >>             Project: OFBiz (The Open for Business
> Project)
> >>          Issue Type: Improvement
> >>          Components: framework
> >>            Reporter: Si Chen
> >>         Attachments: ofbiz-333.2.patch,
> ofbiz133-1.patch
> >>
> >>
> >> This is a continuation of OFBIZ-201: the
> ServiceMultiEventHandler  
> >> will be enhanced to support configurable global
> transaction.  This  
> >> will be done by adding a "global-transaction"
> attribute to the  
> >> event tag:
> >>         <event type="service-multi" path=""  
> >> invoke="quickScheduleShipmentRouteSegment"/>
> >> for global-transaction="true|false" which
> defaults to true.  If  
> >> global-transaction="false" then there will be no
>
> >> TransactionUtil.begin(..) and commit(..) around
> the services  
> >> calls.  Instead, each service will be called with
> its own  
> >> transaction, and whatever messages it returns
> will be added to a  
> >> List of messages to be sent back to the request.
> >
> > --
> > This message is automatically generated by JIRA.
> > -
> > If you think it was sent incorrectly contact one
> of the  
> > administrators:
> http://issues.apache.org/jira/secure/ 
> > Administrators.jspa
> > -
> > For more information on JIRA, see:
> http://www.atlassian.com/ 
> > software/jira
> >
> >
>
>

Reply | Threaded
Open this post in threaded view
|

Re: Need Feedback on Design Issue (was: Re: [jira] Commented: (OFBIZ-333) ServiceMultiEventHandler to support configurable global transaction)

David E Jones-2

On Nov 1, 2006, at 12:06 PM, Chris Howe wrote:

> I would prefer in the controller.xml as a subelement
> (as opposed to attribute) to the <event> tag as
> additional config parameters may be beneficial in the
> future.

That is what attributes are good for... subelements involve more  
overhead in the schema, eventual XML file, and the processing code.

What would the benefit of a subelement be?

-David


> Putting it at the service definition would limit it's
> flexibility.
>
> --- David E Jones <[hidden email]>
> wrote:
>
>>
>> We need some feedback on a design issue.
>>
>> The question is where to put the configuration
>> option for specifying
>> whether or not to wrap the multiple service calls
>> from the service-
>> multi event handler in a single transaction.
>>
>> Where would people prefer to configure this option?
>> The two main
>> places are probably either the event element in the
>> controller.xml
>> file where the service-multi even handler is
>> specified, or on the
>> service element in the service definition XML file
>> where the other
>> transaction related attributes are defined.
>>
>> Please express your opinion on this! We'd like to
>> make a decision and
>> get this in soon.
>>
>> -David
>>
>>
>> On Nov 1, 2006, at 10:56 AM, Si Chen (JIRA) wrote:
>>
>>>     [
>> http://issues.apache.org/jira/browse/OFBIZ-333?
>>> page=comments#action_12446323 ]
>>>
>>> Si Chen commented on OFBIZ-333:
>>> -------------------------------
>>>
>>> Hmm...just you and me on this one, it seems.
>> Well, are you ok
>>> enough with it to put it in?
>>>
>>>> ServiceMultiEventHandler to support configurable
>> global transaction
>>>>
>>
> -------------------------------------------------------------------
>>>>
>>>>                 Key: OFBIZ-333
>>>>                 URL:
>> http://issues.apache.org/jira/browse/OFBIZ-333
>>>>             Project: OFBiz (The Open for Business
>> Project)
>>>>          Issue Type: Improvement
>>>>          Components: framework
>>>>            Reporter: Si Chen
>>>>         Attachments: ofbiz-333.2.patch,
>> ofbiz133-1.patch
>>>>
>>>>
>>>> This is a continuation of OFBIZ-201: the
>> ServiceMultiEventHandler
>>>> will be enhanced to support configurable global
>> transaction.  This
>>>> will be done by adding a "global-transaction"
>> attribute to the
>>>> event tag:
>>>>         <event type="service-multi" path=""
>>>> invoke="quickScheduleShipmentRouteSegment"/>
>>>> for global-transaction="true|false" which
>> defaults to true.  If
>>>> global-transaction="false" then there will be no
>>
>>>> TransactionUtil.begin(..) and commit(..) around
>> the services
>>>> calls.  Instead, each service will be called with
>> its own
>>>> transaction, and whatever messages it returns
>> will be added to a
>>>> List of messages to be sent back to the request.
>>>
>>> --
>>> This message is automatically generated by JIRA.
>>> -
>>> If you think it was sent incorrectly contact one
>> of the
>>> administrators:
>> http://issues.apache.org/jira/secure/
>>> Administrators.jspa
>>> -
>>> For more information on JIRA, see:
>> http://www.atlassian.com/
>>> software/jira
>>>
>>>
>>
>>
>

Reply | Threaded
Open this post in threaded view
|

Re: Need Feedback on Design Issue (was: Re: [jira] Commented: (OFBIZ-333) ServiceMultiEventHandler to support configurable global transaction)

cjhowe
There is no hard and fast rule about which to use.  
However, I see the primary benefit of a subelement as
being learning curve.  As needs arise to expand the
event definition further utilizing a subelement for
this will make the definition less ambiguous what each
attribute is referring to.

The form widget is an example of this with its 40+
attributes. Dropping the style related attributes into
a sub element would reduce the learning curve as
someone trying to learn a simple form definition can
ignore the nuances of styling it until they need to
tackle those nuances.  The same principle applies with
the even definition.

Either way, placing the config options in the
controller is much more flexible than placing in the
service definition.

--- David E Jones <[hidden email]>
wrote:

>
> On Nov 1, 2006, at 12:06 PM, Chris Howe wrote:
>
> > I would prefer in the controller.xml as a
> subelement
> > (as opposed to attribute) to the <event> tag as
> > additional config parameters may be beneficial in
> the
> > future.
>
> That is what attributes are good for... subelements
> involve more  
> overhead in the schema, eventual XML file, and the
> processing code.
>
> What would the benefit of a subelement be?
>
> -David
>
>
> > Putting it at the service definition would limit
> it's
> > flexibility.
> >
> > --- David E Jones <[hidden email]>
> > wrote:
> >
> >>
> >> We need some feedback on a design issue.
> >>
> >> The question is where to put the configuration
> >> option for specifying
> >> whether or not to wrap the multiple service calls
> >> from the service-
> >> multi event handler in a single transaction.
> >>
> >> Where would people prefer to configure this
> option?
> >> The two main
> >> places are probably either the event element in
> the
> >> controller.xml
> >> file where the service-multi even handler is
> >> specified, or on the
> >> service element in the service definition XML
> file
> >> where the other
> >> transaction related attributes are defined.
> >>
> >> Please express your opinion on this! We'd like to
> >> make a decision and
> >> get this in soon.
> >>
> >> -David
> >>
> >>
> >> On Nov 1, 2006, at 10:56 AM, Si Chen (JIRA)
> wrote:
> >>
> >>>     [
> >> http://issues.apache.org/jira/browse/OFBIZ-333?
> >>> page=comments#action_12446323 ]
> >>>
> >>> Si Chen commented on OFBIZ-333:
> >>> -------------------------------
> >>>
> >>> Hmm...just you and me on this one, it seems.
> >> Well, are you ok
> >>> enough with it to put it in?
> >>>
> >>>> ServiceMultiEventHandler to support
> configurable
> >> global transaction
> >>>>
> >>
> >
>
-------------------------------------------------------------------

> >>>>
> >>>>                 Key: OFBIZ-333
> >>>>                 URL:
> >> http://issues.apache.org/jira/browse/OFBIZ-333
> >>>>             Project: OFBiz (The Open for
> Business
> >> Project)
> >>>>          Issue Type: Improvement
> >>>>          Components: framework
> >>>>            Reporter: Si Chen
> >>>>         Attachments: ofbiz-333.2.patch,
> >> ofbiz133-1.patch
> >>>>
> >>>>
> >>>> This is a continuation of OFBIZ-201: the
> >> ServiceMultiEventHandler
> >>>> will be enhanced to support configurable global
> >> transaction.  This
> >>>> will be done by adding a "global-transaction"
> >> attribute to the
> >>>> event tag:
> >>>>         <event type="service-multi" path=""
> >>>> invoke="quickScheduleShipmentRouteSegment"/>
> >>>> for global-transaction="true|false" which
> >> defaults to true.  If
> >>>> global-transaction="false" then there will be
> no
> >>
> >>>> TransactionUtil.begin(..) and commit(..) around
> >> the services
> >>>> calls.  Instead, each service will be called
> with
> >> its own
> >>>> transaction, and whatever messages it returns
> >> will be added to a
> >>>> List of messages to be sent back to the
> request.
> >>>
> >>> --
> >>> This message is automatically generated by JIRA.
> >>> -
> >>> If you think it was sent incorrectly contact one
> >> of the
> >>> administrators:
> >> http://issues.apache.org/jira/secure/
> >>> Administrators.jspa
> >>> -
> >>> For more information on JIRA, see:
> >> http://www.atlassian.com/
> >>> software/jira
> >>>
> >>>
> >>
> >>
> >
>
>

Reply | Threaded
Open this post in threaded view
|

Re: Need Feedback on Design Issue

Jacopo Cappellato
In reply to this post by David E Jones-2
Adding it to the controller would be enough for now.
For the future we could maybe consider to wrap the service in a new
service definition of type "service-multi" and add the transaction
properties there.

Jacopo


David E Jones wrote:

>
> We need some feedback on a design issue.
>
> The question is where to put the configuration option for specifying
> whether or not to wrap the multiple service calls from the service-multi
> event handler in a single transaction.
>
> Where would people prefer to configure this option? The two main places
> are probably either the event element in the controller.xml file where
> the service-multi even handler is specified, or on the service element
> in the service definition XML file where the other transaction related
> attributes are defined.
>
> Please express your opinion on this! We'd like to make a decision and
> get this in soon.
>
> -David
>
>
> On Nov 1, 2006, at 10:56 AM, Si Chen (JIRA) wrote:
>
>>     [
>> http://issues.apache.org/jira/browse/OFBIZ-333?page=comments#action_12446323 
>> ]
>>
>> Si Chen commented on OFBIZ-333:
>> -------------------------------
>>
>> Hmm...just you and me on this one, it seems.  Well, are you ok enough
>> with it to put it in?
>>
>>> ServiceMultiEventHandler to support configurable global transaction
>>> -------------------------------------------------------------------
>>>
>>>                 Key: OFBIZ-333
>>>                 URL: http://issues.apache.org/jira/browse/OFBIZ-333
>>>             Project: OFBiz (The Open for Business Project)
>>>          Issue Type: Improvement
>>>          Components: framework
>>>            Reporter: Si Chen
>>>         Attachments: ofbiz-333.2.patch, ofbiz133-1.patch
>>>
>>>
>>> This is a continuation of OFBIZ-201: the ServiceMultiEventHandler
>>> will be enhanced to support configurable global transaction.  This
>>> will be done by adding a "global-transaction" attribute to the event
>>> tag:
>>>         <event type="service-multi" path=""
>>> invoke="quickScheduleShipmentRouteSegment"/>
>>> for global-transaction="true|false" which defaults to true.  If
>>> global-transaction="false" then there will be no
>>> TransactionUtil.begin(..) and commit(..) around the services calls.  
>>> Instead, each service will be called with its own transaction, and
>>> whatever messages it returns will be added to a List of messages to
>>> be sent back to the request.
>>
>> --This message is automatically generated by JIRA.
>> -
>> If you think it was sent incorrectly contact one of the
>> administrators: http://issues.apache.org/jira/secure/Administrators.jspa
>> -
>> For more information on JIRA, see: http://www.atlassian.com/software/jira
>>
>>

Reply | Threaded
Open this post in threaded view
|

Re: Need Feedback on Design Issue

Jacques Le Roux
Administrator
Yes at root (controller ) seems easier for a beginning.
Service definition of type "service-multi" seems a good idea to me.

Jacques

> Adding it to the controller would be enough for now.
> For the future we could maybe consider to wrap the service in a new
> service definition of type "service-multi" and add the transaction
> properties there.
>
> Jacopo
>
>
> David E Jones wrote:
> >
> > We need some feedback on a design issue.
> >
> > The question is where to put the configuration option for specifying
> > whether or not to wrap the multiple service calls from the service-multi
> > event handler in a single transaction.
> >
> > Where would people prefer to configure this option? The two main places
> > are probably either the event element in the controller.xml file where
> > the service-multi even handler is specified, or on the service element
> > in the service definition XML file where the other transaction related
> > attributes are defined.
> >
> > Please express your opinion on this! We'd like to make a decision and
> > get this in soon.
> >
> > -David
> >
> >
> > On Nov 1, 2006, at 10:56 AM, Si Chen (JIRA) wrote:
> >
> >>     [
> >> http://issues.apache.org/jira/browse/OFBIZ-333?page=comments#action_12446323 
> >> ]
> >>
> >> Si Chen commented on OFBIZ-333:
> >> -------------------------------
> >>
> >> Hmm...just you and me on this one, it seems.  Well, are you ok enough
> >> with it to put it in?
> >>
> >>> ServiceMultiEventHandler to support configurable global transaction
> >>> -------------------------------------------------------------------
> >>>
> >>>                 Key: OFBIZ-333
> >>>                 URL: http://issues.apache.org/jira/browse/OFBIZ-333
> >>>             Project: OFBiz (The Open for Business Project)
> >>>          Issue Type: Improvement
> >>>          Components: framework
> >>>            Reporter: Si Chen
> >>>         Attachments: ofbiz-333.2.patch, ofbiz133-1.patch
> >>>
> >>>
> >>> This is a continuation of OFBIZ-201: the ServiceMultiEventHandler
> >>> will be enhanced to support configurable global transaction.  This
> >>> will be done by adding a "global-transaction" attribute to the event
> >>> tag:
> >>>         <event type="service-multi" path=""
> >>> invoke="quickScheduleShipmentRouteSegment"/>
> >>> for global-transaction="true|false" which defaults to true.  If
> >>> global-transaction="false" then there will be no
> >>> TransactionUtil.begin(..) and commit(..) around the services calls.  
> >>> Instead, each service will be called with its own transaction, and
> >>> whatever messages it returns will be added to a List of messages to
> >>> be sent back to the request.
> >>
> >> --This message is automatically generated by JIRA.
> >> -
> >> If you think it was sent incorrectly contact one of the
> >> administrators: http://issues.apache.org/jira/secure/Administrators.jspa
> >> -
> >> For more information on JIRA, see: http://www.atlassian.com/software/jira
> >>
> >>
Reply | Threaded
Open this post in threaded view
|

[jira] Commented: (OFBIZ-333) ServiceMultiEventHandler to support configurable global transaction

Nicolas Malin (Jira)
In reply to this post by Nicolas Malin (Jira)
    [ http://issues.apache.org/jira/browse/OFBIZ-333?page=comments#action_12446451 ]
           
David E. Jones commented on OFBIZ-333:
--------------------------------------

Si: based on feedback on the list it sounds like people like the idea of putting it in the controller.xml file, so I'd say go for it.

> ServiceMultiEventHandler to support configurable global transaction
> -------------------------------------------------------------------
>
>                 Key: OFBIZ-333
>                 URL: http://issues.apache.org/jira/browse/OFBIZ-333
>             Project: OFBiz (The Open for Business Project)
>          Issue Type: Improvement
>          Components: framework
>            Reporter: Si Chen
>         Attachments: ofbiz-333.2.patch, ofbiz133-1.patch
>
>
> This is a continuation of OFBIZ-201: the ServiceMultiEventHandler will be enhanced to support configurable global transaction.  This will be done by adding a "global-transaction" attribute to the event tag:
>         <event type="service-multi" path="" invoke="quickScheduleShipmentRouteSegment"/>
> for global-transaction="true|false" which defaults to true.  If global-transaction="false" then there will be no TransactionUtil.begin(..) and commit(..) around the services calls.  Instead, each service will be called with its own transaction, and whatever messages it returns will be added to a List of messages to be sent back to the request.

--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

       
Reply | Threaded
Open this post in threaded view
|

[jira] Assigned: (OFBIZ-333) ServiceMultiEventHandler to support configurable global transaction

Nicolas Malin (Jira)
In reply to this post by Nicolas Malin (Jira)
     [ http://issues.apache.org/jira/browse/OFBIZ-333?page=all ]

Si Chen reassigned OFBIZ-333:
-----------------------------

    Assignee: Si Chen

> ServiceMultiEventHandler to support configurable global transaction
> -------------------------------------------------------------------
>
>                 Key: OFBIZ-333
>                 URL: http://issues.apache.org/jira/browse/OFBIZ-333
>             Project: OFBiz (The Open for Business Project)
>          Issue Type: Improvement
>          Components: framework
>            Reporter: Si Chen
>         Assigned To: Si Chen
>         Attachments: ofbiz-333.2.patch
>
>
> This is a continuation of OFBIZ-201: the ServiceMultiEventHandler will be enhanced to support configurable global transaction.  This will be done by adding a "global-transaction" attribute to the event tag:
>         <event type="service-multi" path="" invoke="quickScheduleShipmentRouteSegment"/>
> for global-transaction="true|false" which defaults to true.  If global-transaction="false" then there will be no TransactionUtil.begin(..) and commit(..) around the services calls.  Instead, each service will be called with its own transaction, and whatever messages it returns will be added to a List of messages to be sent back to the request.

--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

       
Reply | Threaded
Open this post in threaded view
|

[jira] Updated: (OFBIZ-333) ServiceMultiEventHandler to support configurable global transaction

Nicolas Malin (Jira)
In reply to this post by Nicolas Malin (Jira)
     [ http://issues.apache.org/jira/browse/OFBIZ-333?page=all ]

Si Chen updated OFBIZ-333:
--------------------------

    Attachment:     (was: ofbiz133-1.patch)

> ServiceMultiEventHandler to support configurable global transaction
> -------------------------------------------------------------------
>
>                 Key: OFBIZ-333
>                 URL: http://issues.apache.org/jira/browse/OFBIZ-333
>             Project: OFBiz (The Open for Business Project)
>          Issue Type: Improvement
>          Components: framework
>            Reporter: Si Chen
>         Assigned To: Si Chen
>         Attachments: ofbiz-333.2.patch
>
>
> This is a continuation of OFBIZ-201: the ServiceMultiEventHandler will be enhanced to support configurable global transaction.  This will be done by adding a "global-transaction" attribute to the event tag:
>         <event type="service-multi" path="" invoke="quickScheduleShipmentRouteSegment"/>
> for global-transaction="true|false" which defaults to true.  If global-transaction="false" then there will be no TransactionUtil.begin(..) and commit(..) around the services calls.  Instead, each service will be called with its own transaction, and whatever messages it returns will be added to a List of messages to be sent back to the request.

--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

       
Reply | Threaded
Open this post in threaded view
|

[jira] Closed: (OFBIZ-333) ServiceMultiEventHandler to support configurable global transaction

Nicolas Malin (Jira)
In reply to this post by Nicolas Malin (Jira)
     [ http://issues.apache.org/jira/browse/OFBIZ-333?page=all ]

Si Chen closed OFBIZ-333.
-------------------------

    Resolution: Fixed

> ServiceMultiEventHandler to support configurable global transaction
> -------------------------------------------------------------------
>
>                 Key: OFBIZ-333
>                 URL: http://issues.apache.org/jira/browse/OFBIZ-333
>             Project: OFBiz (The Open for Business Project)
>          Issue Type: Improvement
>          Components: framework
>            Reporter: Si Chen
>         Assigned To: Si Chen
>         Attachments: ofbiz-333.2.patch
>
>
> This is a continuation of OFBIZ-201: the ServiceMultiEventHandler will be enhanced to support configurable global transaction.  This will be done by adding a "global-transaction" attribute to the event tag:
>         <event type="service-multi" path="" invoke="quickScheduleShipmentRouteSegment"/>
> for global-transaction="true|false" which defaults to true.  If global-transaction="false" then there will be no TransactionUtil.begin(..) and commit(..) around the services calls.  Instead, each service will be called with its own transaction, and whatever messages it returns will be added to a List of messages to be sent back to the request.

--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira