Sybase NNTP forums - End Of Life (EOL)

The NNTP forums from Sybase - forums.sybase.com - are now closed.

All new questions should be directed to the appropriate forum at the SAP Community Network (SCN).

Individual products have links to the respective forums on SCN, or you can go to SCN and search for your product in the search box (upper right corner) to find your specific developer center.

How complete transaction for six DataWindows

6 posts in General Discussion (old) Last posting was on 2000-03-09 17:51:10.0Z
Vladimir Uzlaner Posted on 2000-03-08 19:39:00.0Z
Newsgroups: sybase.public.easerver
From: "Vladimir Uzlaner" <vuzlaner@telsource.com>
Organization: 209.123.44.169
X-Newsreader: AspNNTP 1.41 (Advent 2000, Inc.)
Subject: How complete transaction for six DataWindows
Mime-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Date: Wed, 08 Mar 2000 14:39:00 -0500
Lines: 21
NNTP-Posting-Host: 207.156.232.4
Message-ID: <347_tmFB0XTi$GA.202@forums.sybase.com>
Path: forums-1-dub!forums-1-dub!forums-master.sybase.com!forums.sybase.com
Xref: forums-1-dub sybase.public.easerver:26870
Article PK: 154452

Hi, all

I have a serious question ( from my point of view maybe).

If user update six DataWindows on the Client Side, then click 'Save' button.
Now I want update these DataWindows in one Transaction.
For stateless components I can do it in one function call only, because after
every function invokation, a transactional component completes transaction and
loses its state.
But in this case I need to pass to this only function six blobs?! After that
inside of this function I consequently update all DataStores after SetChanges()
and Transaction complete.

Is this the only way to do it?

Thank you for your cooperation,
Vladimir Uzlaner
---== Posted via the PFCGuide Web Newsreader ==---
http://www.pfcguide.com/_newsgroups/group_list.asp


Vuzlaner Vladimir Posted on 2000-03-09 14:17:55.0Z
Newsgroups: sybase.public.easerver
From: "Vuzlaner Vladimir" <vuzlaner@telsource.com>
Organization: 209.123.44.169
X-Newsreader: AspNNTP 1.41 (Advent 2000, Inc.)
Subject: Re: How complete transaction for six DataWindows
Mime-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Date: Thu, 09 Mar 2000 09:17:55 -0500
Lines: 38
NNTP-Posting-Host: 207.156.232.4
Message-ID: <347_t3jADJdi$GA.202@forums.sybase.com>
References: <347_tmFB0XTi$GA.202@forums.sybase.com>
Path: forums-1-dub!forums-1-dub!forums-master.sybase.com!forums.sybase.com
Xref: forums-1-dub sybase.public.easerver:26806
Article PK: 157779

On Wed, 08 Mar 2000 14:39:00 -0500,
in powersoft.public.easerver

Vladimir Uzlaner <vuzlaner@telsource.com> wrote:
>Hi, all
>
>I have a serious question ( from my point of view maybe).
>
>If user update six DataWindows on the Client Side, then click 'Save' button.
>Now I want update these DataWindows in one Transaction.
>For stateless components I can do it in one function call only, because after
>every function invokation, a transactional component completes transaction and
>loses its state.
>But in this case I need to pass to this only function six blobs?! After that
>inside of this function I consequently update all DataStores after SetChanges()
>and Transaction complete.
>
>Is this the only way to do it?
>
>Thank you for your cooperation,
> Vladimir Uzlaner
>---== Posted via the PFCGuide Web Newsreader ==---
>http://www.pfcguide.com/_newsgroups/group_list.asp

Hi, there

Unfortunately, nobody replied on my question, so I will try to it by myself.

I think alternative way is use statefull components. Update all six DataWindows
consequently without committing. Then on the client side check if all functions
was run successfully, then call separate function where I will place COMMIT /
ROLLBACK statements. ( Component should be Transaction Not Supported)

Thank you,
Vladimir Uzlaner
---== Posted via the PFCGuide Web Newsreader ==---
http://www.pfcguide.com/_newsgroups/group_list.asp


Mark Lanz Posted on 2000-03-09 16:07:07.0Z
Newsgroups: sybase.public.easerver
From: "Mark Lanz" <mark.lanz@digifuse.nospam.com>
Subject: Re: How complete transaction for six DataWindows
Date: Thu, 9 Mar 2000 11:07:07 -0500
Lines: 71
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 5.00.2615.200
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2615.200
NNTP-Posting-Host: innovativeit.com 199.3.215.1
Message-ID: <347_Il$L2Iei$GA.74@forums.sybase.com>
References: <347_tmFB0XTi$GA.202@forums.sybase.com> <347_t3jADJdi$GA.202@forums.sybase.com>
Path: forums-1-dub!forums-1-dub!forums-master.sybase.com!forums.sybase.com
Xref: forums-1-dub sybase.public.easerver:26795
Article PK: 157769

Vladimir,
Your idea for a stateful component should work. Just make sure you use
SetComplete() or SetAbort() at the end. Do not use COMMIT or ROLLBACK. You
might as well make the component "Requires Transaction", although I am not
sure the setting makes a big difference in your case.

Make sure you always call the function at the end that calls the
SetComplete() or SetAbort(), otherwise the component will not be released
back to the instance pool.

I would also recommend that you are sure to group the component calls
together on the client side, so that you are bound to the component only
briefly. It will still be a stateful component, but you minimize the
scalability drawbacks by making the state very short. If this system needs
to scale to a large number of users, you will probably want to use a truly
stateless design, as Bill recommends.

HTH,
Mark Lanz
digital fusion, inc.

Vuzlaner Vladimir <vuzlaner@telsource.com> wrote in message
news:t3jADJdi$GA.202@forums.sybase.com...
> On Wed, 08 Mar 2000 14:39:00 -0500,
> in powersoft.public.easerver
> Vladimir Uzlaner <vuzlaner@telsource.com> wrote:
> >Hi, all
> >
> >I have a serious question ( from my point of view maybe).
> >
> >If user update six DataWindows on the Client Side, then click 'Save'
button.
> >Now I want update these DataWindows in one Transaction.
> >For stateless components I can do it in one function call only, because
after
> >every function invokation, a transactional component completes
transaction and
> >loses its state.
> >But in this case I need to pass to this only function six blobs?! After
that
> >inside of this function I consequently update all DataStores after
SetChanges()
> >and Transaction complete.
> >
> >Is this the only way to do it?
> >
> >Thank you for your cooperation,
> > Vladimir Uzlaner
> >---== Posted via the PFCGuide Web Newsreader ==---
> >http://www.pfcguide.com/_newsgroups/group_list.asp
>
> Hi, there
>
> Unfortunately, nobody replied on my question, so I will try to it by
myself.
>
> I think alternative way is use statefull components. Update all six
DataWindows
> consequently without committing. Then on the client side check if all
functions
> was run successfully, then call separate function where I will place
COMMIT /
> ROLLBACK statements. ( Component should be Transaction Not Supported)
>
> Thank you,
> Vladimir Uzlaner
> ---== Posted via the PFCGuide Web Newsreader ==---
> http://www.pfcguide.com/_newsgroups/group_list.asp


Vladimir Uzlaner Posted on 2000-03-09 17:51:10.0Z
Newsgroups: sybase.public.easerver
From: "Vladimir Uzlaner" <vuzlaner@telsource.com>
Organization: 209.123.44.169
X-Newsreader: AspNNTP 1.41 (Advent 2000, Inc.)
Subject: Re: How complete transaction for six DataWindows
Mime-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Date: Thu, 09 Mar 2000 12:51:10 -0500
Lines: 87
NNTP-Posting-Host: 207.156.232.4
Message-ID: <347_7KuuNAfi$GA.251@forums.sybase.com>
References: <347_tmFB0XTi$GA.202@forums.sybase.com> <347_t3jADJdi$GA.202@forums.sybase.com> <347_Il$L2Iei$GA.74@forums.sybase.com>
Path: forums-1-dub!forums-1-dub!forums-master.sybase.com!forums.sybase.com
Xref: forums-1-dub sybase.public.easerver:26776
Article PK: 157753

Thank you, Mark

I think here is something wrong.

By Mike Barlotta, "If component uses Jaguar transactions, it will lose its state
at the end of every transaction"( p.383) Even it is statefull component.
Mike advise for statefull components:

- auto demarcation/deactivation disabled
- transaction property: not supported
- UseConextObject = NO
- Use COMMIT / ROLLBACK

What I wanna do is use SetComplete() or ROLLBACK only once, when all
transactions are done successfully.

What you think about it?

Thank you,
Vladimir Uzlaner

On Thu, 9 Mar 2000 11:07:07 -0500,
in powersoft.public.easerver

Mark Lanz <mark.lanz@digifuse.nospam.com> wrote:
>Vladimir,
>Your idea for a stateful component should work. Just make sure you use
>SetComplete() or SetAbort() at the end. Do not use COMMIT or ROLLBACK. You
>might as well make the component "Requires Transaction", although I am not
>sure the setting makes a big difference in your case.
>
>Make sure you always call the function at the end that calls the
>SetComplete() or SetAbort(), otherwise the component will not be released
>back to the instance pool.
>
>I would also recommend that you are sure to group the component calls
>together on the client side, so that you are bound to the component only
>briefly. It will still be a stateful component, but you minimize the
>scalability drawbacks by making the state very short. If this system needs
>to scale to a large number of users, you will probably want to use a truly
>stateless design, as Bill recommends.
>
>HTH,
>Mark Lanz
>digital fusion, inc.
>
>
>Vuzlaner Vladimir <vuzlaner@telsource.com> wrote in message
>news:t3jADJdi$GA.202@forums.sybase.com...
>> On Wed, 08 Mar 2000 14:39:00 -0500,
>> in powersoft.public.easerver
>> Vladimir Uzlaner <vuzlaner@telsource.com> wrote:
>> >Hi, all
>> >
>> >I have a serious question ( from my point of view maybe).
>> >
>> >If user update six DataWindows on the Client Side, then click 'Save'
>button.
>> >Now I want update these DataWindows in one Transaction.
>> >For stateless components I can do it in one function call only, because
>after
>> >every function invokation, a transactional component completes
>transaction and
>> >loses its state.
>> >But in this case I need to pass to this only function six blobs?! After
>that
>> >inside of this function I consequently update all DataStores after
>SetChanges()
>> >and Transaction complete.
>> >
>> >Is this the only way to do it?
>> >
>> >Thank you for your cooperation,
>> > Vladimir Uzlaner
>> >---== Posted via the PFCGuide Web Newsreader ==---
>> >http://www.pfcguide.com/_newsgroups/group_list.asp
>>
>> Hi, there
>>
>> Unfortunately, nobody replied on my question, so I will try to it by
>myself.
>>
>> I think alternative way is use statefull components. Update all six
>DataWindows
>> consequently without committing. Then on the client side check if all
>functions
>> was run successfully, then call separate function where I will place
>COMMIT /
>> ROLLBACK statements. ( Component should be Transaction Not Supported)
>>
>> Thank you,
>> Vladimir Uzlaner
>> ---== Posted via the PFCGuide Web Newsreader ==---
>> http://www.pfcguide.com/_newsgroups/group_list.asp
>
>

---== Posted via the PFCGuide Web Newsreader ==---
http://www.pfcguide.com/_newsgroups/group_list.asp


Bill Burtnik Posted on 2000-03-09 15:55:38.0Z
Newsgroups: sybase.public.easerver
From: "Bill Burtnik" <bill.burtnik@cyrus-solutions.com>
Organization: 209.167.242.235
X-Newsreader: AspNNTP 1.41 (Advent 2000, Inc.)
Subject: Re: How complete transaction for six DataWindows
Mime-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Date: Thu, 09 Mar 2000 10:55:38 -0500
Lines: 64
NNTP-Posting-Host: 207.156.232.4
Message-ID: <347_Fri5p$di$GA.74@forums.sybase.com>
References: <347_tmFB0XTi$GA.202@forums.sybase.com> <347_t3jADJdi$GA.202@forums.sybase.com>
Path: forums-1-dub!forums-1-dub!forums-master.sybase.com!forums.sybase.com
Xref: forums-1-dub sybase.public.easerver:26798
Article PK: 157774

I believe the recommended way to update multiple datawindows is through a
coordinator server component. Each datawindow should have their own server
component that knows how to update itself. The client calls the coordinator
update
method who in turn calls each dw components' update. After each dw component
is updated, they inform the coordinator of the results. The coordinator commits
or rollbacks the transaction.

The coordinator transaction support should be Requires or requires
new transaction. Each individual component should be support or requires.

The client will have to cycle through all datawindows and call the coordinator
method, passing the contents as method arguments (likely an array of blobs) to
your Jaguar server.

Hope this helps.
On Thu, 09 Mar 2000 09:17:55 -0500,
in powersoft.public.easerver

Vuzlaner Vladimir <vuzlaner@telsource.com> wrote:
>On Wed, 08 Mar 2000 14:39:00 -0500,
> in powersoft.public.easerver
>Vladimir Uzlaner <vuzlaner@telsource.com> wrote:
>>Hi, all
>>
>>I have a serious question ( from my point of view maybe).
>>
>>If user update six DataWindows on the Client Side, then click 'Save' button.
>>Now I want update these DataWindows in one Transaction.
>>For stateless components I can do it in one function call only, because after
>>every function invokation, a transactional component completes transaction and
>>loses its state.
>>But in this case I need to pass to this only function six blobs?! After that
>>inside of this function I consequently update all DataStores after
SetChanges()
>>and Transaction complete.
>>
>>Is this the only way to do it?
>>
>>Thank you for your cooperation,
>> Vladimir Uzlaner
>>---== Posted via the PFCGuide Web Newsreader ==---
>>http://www.pfcguide.com/_newsgroups/group_list.asp
>
>Hi, there
>
>Unfortunately, nobody replied on my question, so I will try to it by myself.
>
>I think alternative way is use statefull components. Update all six DataWindows
>consequently without committing. Then on the client side check if all functions
>was run successfully, then call separate function where I will place COMMIT /
>ROLLBACK statements. ( Component should be Transaction Not Supported)
>
>Thank you,
> Vladimir Uzlaner
>---== Posted via the PFCGuide Web Newsreader ==---
>http://www.pfcguide.com/_newsgroups/group_list.asp

---== Posted via the PFCGuide Web Newsreader ==---
http://www.pfcguide.com/_newsgroups/group_list.asp


Vladimir Uzlaner Posted on 2000-03-09 17:40:11.0Z
Newsgroups: sybase.public.easerver
From: "Vladimir Uzlaner" <vuzlaner@telsource.com>
Organization: 209.123.44.169
X-Newsreader: AspNNTP 1.41 (Advent 2000, Inc.)
Subject: Re: How complete transaction for six DataWindows
Mime-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Date: Thu, 09 Mar 2000 12:40:11 -0500
Lines: 98
NNTP-Posting-Host: 207.156.232.4
Message-ID: <347_XK8yE6ei$GA.71@forums.sybase.com>
References: <347_tmFB0XTi$GA.202@forums.sybase.com> <347_t3jADJdi$GA.202@forums.sybase.com> <347_Fri5p$di$GA.74@forums.sybase.com>
Path: forums-1-dub!forums-1-dub!forums-master.sybase.com!forums.sybase.com
Xref: forums-1-dub sybase.public.easerver:26780
Article PK: 157757

Thank you, Bill

I also had the same idea. Create n_trans component with of_Update() function.
Client make call only to this function. What we have in this function:

- declare local variable of our 'DW component': n_bo_contract ln_bo_contract
- create instance inside of n_trans's thread:
ln_bo_contract = CREATE n_bo_contract
- call sequentially six functions for updating every DataWindow:
ln_bo_contract. of_Update_1( ..., ref blob_1)
...
ln_bo_contract. of_Update_1( ..., ref blob_6)
- Set Complete() / SetAbort().

But again in this situation I have to pass six blobs to n_trans.of_update()
function.

In our project we have arcitechture, when we have component per screen , not per
table( by the way what you think about it?). So I put the of_update() function
in this screen's component.

So in both our cases we have to pass six blobs in one function. Probably there
is nothing awful in that?

Thank you. If I didn't get exactly your idea, please,let me know.

Vladimir Uzlaner



On Thu, 09 Mar 2000 10:55:38 -0500,
in powersoft.public.easerver

Bill Burtnik <bill.burtnik@cyrus-solutions.com> wrote:
>I believe the recommended way to update multiple datawindows is through a
>coordinator server component. Each datawindow should have their own server
>component that knows how to update itself. The client calls the coordinator
>update
>method who in turn calls each dw components' update. After each dw component
>is updated, they inform the coordinator of the results. The coordinator
commits
>or rollbacks the transaction.
>
>The coordinator transaction support should be Requires or requires
>new transaction. Each individual component should be support or requires.
>
>The client will have to cycle through all datawindows and call the coordinator
>method, passing the contents as method arguments (likely an array of blobs) to
>your Jaguar server.
>
>Hope this helps.
>On Thu, 09 Mar 2000 09:17:55 -0500,
> in powersoft.public.easerver
>Vuzlaner Vladimir <vuzlaner@telsource.com> wrote:
>>On Wed, 08 Mar 2000 14:39:00 -0500,
>> in powersoft.public.easerver
>>Vladimir Uzlaner <vuzlaner@telsource.com> wrote:
>>>Hi, all
>>>
>>>I have a serious question ( from my point of view maybe).
>>>
>>>If user update six DataWindows on the Client Side, then click 'Save' button.
>>>Now I want update these DataWindows in one Transaction.
>>>For stateless components I can do it in one function call only, because after
>>>every function invokation, a transactional component completes transaction
and
>>>loses its state.
>>>But in this case I need to pass to this only function six blobs?! After that
>>>inside of this function I consequently update all DataStores after
>SetChanges()
>>>and Transaction complete.
>>>
>>>Is this the only way to do it?
>>>
>>>Thank you for your cooperation,
>>> Vladimir Uzlaner
>>>---== Posted via the PFCGuide Web Newsreader ==---
>>>http://www.pfcguide.com/_newsgroups/group_list.asp
>>
>>Hi, there
>>
>>Unfortunately, nobody replied on my question, so I will try to it by myself.
>>
>>I think alternative way is use statefull components. Update all six
DataWindows
>>consequently without committing. Then on the client side check if all
functions
>>was run successfully, then call separate function where I will place COMMIT /
>>ROLLBACK statements. ( Component should be Transaction Not Supported)
>>
>>Thank you,
>> Vladimir Uzlaner
>>---== Posted via the PFCGuide Web Newsreader ==---
>>http://www.pfcguide.com/_newsgroups/group_list.asp
>
>---== Posted via the PFCGuide Web Newsreader ==---
>http://www.pfcguide.com/_newsgroups/group_list.asp

---== Posted via the PFCGuide Web Newsreader ==---
http://www.pfcguide.com/_newsgroups/group_list.asp