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.

maintaining state after completeWork()

9 posts in General Discussion (old) Last posting was on 2000-02-16 14:56:39.0Z
Develop Informatica Posted on 2000-02-14 17:11:00.0Z
Newsgroups: sybase.public.easerver
From: "Develop Informatica" <suporte@develop.com.br>
Subject: maintaining state after completeWork()
Date: Mon, 14 Feb 2000 14:11:00 -0300
Lines: 22
X-Newsreader: Microsoft Outlook Express 4.72.3110.5
X-MimeOLE: Produced By Microsoft MimeOLE V4.72.3110.3
NNTP-Posting-Host: 200.248.92.2
Message-ID: <347_0yYuP4wd$GA.96@forums.sybase.com>
Path: forums-1-dub!forums-1-dub!forums-master.sybase.com!forums.sybase.com
Xref: forums-1-dub sybase.public.easerver:28743
Article PK: 160862

Hi,

I have a Java component (A) that does an insert and calls another component
(B). Comp A "support transaction" and does not have "automatic
demarcation/deactivation" checked. Comp B "support transaction" and has
"automatic demarcation/deactivation" checked.

If I'm not wrong, after calling completeWork() in Comp A deactivate it, and
any subsequent method invocation in comp A from the client will bring likely
another instance of comp A.

I would like to, after calling completeWork(), keep the instance bound to
the client that just have commited the transaction, and thus continue
working.

Any help ?

TIA
Diego.


Evan Ireland Posted on 2000-02-14 22:27:22.0Z
Newsgroups: sybase.public.easerver
Date: Tue, 15 Feb 2000 11:27:22 +1300
From: Evan Ireland <eireland@sybase.com>
Organization: Sybase, Inc.
X-Mailer: Mozilla 4.7 [en] (WinNT; U)
X-Accept-Language: en
MIME-Version: 1.0
To: Develop Informatica <suporte@develop.com.br>
Subject: Re: maintaining state after completeWork()
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Lines: 36
NNTP-Posting-Host: 130.214.8.31
Message-ID: <347_38A8814A.90BB0A3C@sybase.com>
References: <347_0yYuP4wd$GA.96@forums.sybase.com>
Path: forums-1-dub!forums-1-dub!forums-master.sybase.com!forums.sybase.com
Xref: forums-1-dub sybase.public.easerver:28707
Article PK: 160830


Develop Informatica wrote:
>
> Hi,
>
> I have a Java component (A) that does an insert and calls another component
> (B). Comp A "support transaction" and does not have "automatic
> demarcation/deactivation" checked. Comp B "support transaction" and has
> "automatic demarcation/deactivation" checked.
>
> If I'm not wrong, after calling completeWork() in Comp A deactivate it, and
> any subsequent method invocation in comp A from the client will bring likely
> another instance of comp A.
>
> I would like to, after calling completeWork(), keep the instance bound to
> the client that just have commited the transaction, and thus continue
> working.
>
> Any help ?

Jaguar 3.5 offers two options:

(1) Using the Bind Object option on Instances tab page.

(2) Using an EJB stateful session bean or its CORBA equivalent (set the
com.sybase.jaguar.component.control property to
"CtsComponents::ObjectControl").

I suggest that you look at using EJB stateful session beans with Jaguar 3.5,
since that is the least proprietary option, and if a standard option delivers
the required behaviour, it makes sense to go for it.
________________________________________________________________________________

Evan Ireland Sybase EA Server Engineering eireland@sybase.com
Wellington - New Zealand +64 4 934-5856


Develop Informatica Posted on 2000-02-16 14:56:39.0Z
Newsgroups: sybase.public.easerver
From: "Develop Informatica" <suporte@develop.com.br>
Subject: Re: maintaining state after completeWork()
Date: Wed, 16 Feb 2000 11:56:39 -0300
Lines: 49
X-Newsreader: Microsoft Outlook Express 4.72.3110.5
X-MimeOLE: Produced By Microsoft MimeOLE V4.72.3110.3
NNTP-Posting-Host: 200.248.92.2
Message-ID: <347_nf6c8UIe$GA.324@forums.sybase.com>
References: <347_0yYuP4wd$GA.96@forums.sybase.com> <347_38A8814A.90BB0A3C@sybase.com>
Path: forums-1-dub!forums-1-dub!forums-master.sybase.com!forums.sybase.com
Xref: forums-1-dub sybase.public.easerver:28580
Article PK: 160721

Thanks for all support, guys. I have to make it in 3.0.1, as we are into
production and there's no more time to evaluate an upgrade.

Diego.

Evan Ireland wrote in message <38A8814A.90BB0A3C@sybase.com>...
>Develop Informatica wrote:
>>
>> Hi,
>>
>> I have a Java component (A) that does an insert and calls another
component
>> (B). Comp A "support transaction" and does not have "automatic
>> demarcation/deactivation" checked. Comp B "support transaction" and has
>> "automatic demarcation/deactivation" checked.
>>
>> If I'm not wrong, after calling completeWork() in Comp A deactivate it,
and
>> any subsequent method invocation in comp A from the client will bring
likely
>> another instance of comp A.
>>
>> I would like to, after calling completeWork(), keep the instance bound to
>> the client that just have commited the transaction, and thus continue
>> working.
>>
>> Any help ?
>
>Jaguar 3.5 offers two options:
>
>(1) Using the Bind Object option on Instances tab page.
>
>(2) Using an EJB stateful session bean or its CORBA equivalent (set the
> com.sybase.jaguar.component.control property to
> "CtsComponents::ObjectControl").
>
>I suggest that you look at using EJB stateful session beans with Jaguar
3.5,
>since that is the least proprietary option, and if a standard option
delivers
>the required behaviour, it makes sense to go for it.
>___________________________________________________________________________
_____
>
>Evan Ireland Sybase EA Server Engineering
eireland@sybase.com
> Wellington - New Zealand +64 4

934-5856


Mark Maslow Posted on 2000-02-14 17:44:15.0Z
Newsgroups: sybase.public.easerver
From: "Mark Maslow" <mark.maslow@sierraclub.org>
Subject: Re: maintaining state after completeWork()
Date: Mon, 14 Feb 2000 09:44:15 -0800
Lines: 34
Organization: Sierra Club
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 5.00.2314.1300
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2314.1300
NNTP-Posting-Host: machine001.sierraclub.org 207.90.163.1
Message-ID: <347_HzP1hPxd$GA.327@forums.sybase.com>
References: <347_0yYuP4wd$GA.96@forums.sybase.com>
Path: forums-1-dub!forums-1-dub!forums-master.sybase.com!forums.sybase.com
Xref: forums-1-dub sybase.public.easerver:28740
Article PK: 160859

If you want to keep a stateful component instance that remains bound to the
client, you will need to delegate any database updates to other components.

Mark Maslow

Develop Informatica <suporte@develop.com.br> wrote in message
news:0yYuP4wd$GA.96@forums.sybase.com...
> Hi,
>
> I have a Java component (A) that does an insert and calls another
component
> (B). Comp A "support transaction" and does not have "automatic
> demarcation/deactivation" checked. Comp B "support transaction" and has
> "automatic demarcation/deactivation" checked.
>
> If I'm not wrong, after calling completeWork() in Comp A deactivate it,
and
> any subsequent method invocation in comp A from the client will bring
likely
> another instance of comp A.
>
> I would like to, after calling completeWork(), keep the instance bound to
> the client that just have commited the transaction, and thus continue
> working.
>
> Any help ?
>
> TIA
> Diego.
>
>
>


Dave Wolf [Sybase] Posted on 2000-02-14 23:56:31.0Z
Newsgroups: sybase.public.easerver
From: "Dave Wolf [Sybase]" <dwolf@sybase.com>
Subject: Re: maintaining state after completeWork()
Date: Mon, 14 Feb 2000 18:56:31 -0500
Lines: 55
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 5.00.2314.1300
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2314.1300
NNTP-Posting-Host: 158.159.8.63
Message-ID: <347_qSxHce0d$GA.324@forums.sybase.com>
References: <347_0yYuP4wd$GA.96@forums.sybase.com> <347_HzP1hPxd$GA.327@forums.sybase.com>
Path: forums-1-dub!forums-1-dub!forums-master.sybase.com!forums.sybase.com
Xref: forums-1-dub sybase.public.easerver:28689
Article PK: 160816

You should also consider using EAS 3.5. You have two options

1) EJB Stateful SessionBeans allow you to have the container commit a Tx
while keeping the state. There is a difference though where the Tx survives
only one method call, so you again need to either use client demarcated Tx
or to do as Mark said and put an adapter in front of it

2) We have an option now BindObject which will keep the object coupled to a
client after a method effects the Tx. This also allows multiple threads on
the client to share a single instance.

Dave Wolf
Internet Applications Division

Mark Maslow <mark.maslow@sierraclub.org> wrote in message
news:HzP1hPxd$GA.327@forums.sybase.com...
> If you want to keep a stateful component instance that remains bound to
the
> client, you will need to delegate any database updates to other
components.
>
> Mark Maslow
>
> Develop Informatica <suporte@develop.com.br> wrote in message
> news:0yYuP4wd$GA.96@forums.sybase.com...
> > Hi,
> >
> > I have a Java component (A) that does an insert and calls another
> component
> > (B). Comp A "support transaction" and does not have "automatic
> > demarcation/deactivation" checked. Comp B "support transaction" and has
> > "automatic demarcation/deactivation" checked.
> >
> > If I'm not wrong, after calling completeWork() in Comp A deactivate it,
> and
> > any subsequent method invocation in comp A from the client will bring
> likely
> > another instance of comp A.
> >
> > I would like to, after calling completeWork(), keep the instance bound
to
> > the client that just have commited the transaction, and thus continue
> > working.
> >
> > Any help ?
> >
> > TIA
> > Diego.
> >
> >
> >
>
>


Develop Informatica Posted on 2000-02-14 18:04:02.0Z
Newsgroups: sybase.public.easerver
From: "Develop Informatica" <suporte@develop.com.br>
Subject: Re: maintaining state after completeWork()
Date: Mon, 14 Feb 2000 15:04:02 -0300
Lines: 50
X-Newsreader: Microsoft Outlook Express 4.72.3110.5
X-MimeOLE: Produced By Microsoft MimeOLE V4.72.3110.3
NNTP-Posting-Host: 200.248.92.2
Message-ID: <347_4Ihw3Vxd$GA.332@forums.sybase.com>
References: <347_0yYuP4wd$GA.96@forums.sybase.com> <347_HzP1hPxd$GA.327@forums.sybase.com>
Path: forums-1-dub!forums-1-dub!forums-master.sybase.com!forums.sybase.com
Xref: forums-1-dub sybase.public.easerver:28739
Article PK: 160857

But, in this case, when will commit be issued in the database ? All
delegated components call continueWork(), and are waiting for the root
component call completeWork(). When root calls it, it is deactivated.

I need this behavior in order to, after commiting in the database, make some
instance variables available to the client, like the primary key generated
by the insert.

Do you have any other approach ?

Diego.

Mark Maslow wrote in message ...
>If you want to keep a stateful component instance that remains bound to the
>client, you will need to delegate any database updates to other components.
>
>Mark Maslow
>
>Develop Informatica <suporte@develop.com.br> wrote in message
>news:0yYuP4wd$GA.96@forums.sybase.com...
>> Hi,
>>
>> I have a Java component (A) that does an insert and calls another
>component
>> (B). Comp A "support transaction" and does not have "automatic
>> demarcation/deactivation" checked. Comp B "support transaction" and has
>> "automatic demarcation/deactivation" checked.
>>
>> If I'm not wrong, after calling completeWork() in Comp A deactivate it,
>and
>> any subsequent method invocation in comp A from the client will bring
>likely
>> another instance of comp A.
>>
>> I would like to, after calling completeWork(), keep the instance bound to
>> the client that just have commited the transaction, and thus continue
>> working.
>>
>> Any help ?
>>
>> TIA
>> Diego.
>>
>>
>>
>
>


Mark Maslow Posted on 2000-02-14 18:12:40.0Z
Newsgroups: sybase.public.easerver
From: "Mark Maslow" <mark.maslow@sierraclub.org>
Subject: Re: maintaining state after completeWork()
Date: Mon, 14 Feb 2000 10:12:40 -0800
Lines: 66
Organization: Sierra Club
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 5.00.2314.1300
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2314.1300
NNTP-Posting-Host: machine001.sierraclub.org 207.90.163.1
Message-ID: <347_LkD$afxd$GA.149@forums.sybase.com>
References: <347_0yYuP4wd$GA.96@forums.sybase.com> <347_HzP1hPxd$GA.327@forums.sybase.com> <347_4Ihw3Vxd$GA.332@forums.sybase.com>
Path: forums-1-dub!forums-1-dub!forums-master.sybase.com!forums.sybase.com
Xref: forums-1-dub sybase.public.easerver:28736
Article PK: 154710

Why can't you have stateful component X call component A? Component A calls
any number of components, issues a completeWork() and finanally returns any
information that may be needed later, such as primary keys generated by
inserts, to component X. Then the client can access the information stored
in instance variables of component X at any time.

Mark Maslow

Develop Informatica <suporte@develop.com.br> wrote in message
news:4Ihw3Vxd$GA.332@forums.sybase.com...
> But, in this case, when will commit be issued in the database ? All
> delegated components call continueWork(), and are waiting for the root
> component call completeWork(). When root calls it, it is deactivated.
>
> I need this behavior in order to, after commiting in the database, make
some
> instance variables available to the client, like the primary key generated
> by the insert.
>
> Do you have any other approach ?
>
> Diego.
>
>
> Mark Maslow wrote in message ...
> >If you want to keep a stateful component instance that remains bound to
the
> >client, you will need to delegate any database updates to other
components.
> >
> >Mark Maslow
> >
> >Develop Informatica <suporte@develop.com.br> wrote in message
> >news:0yYuP4wd$GA.96@forums.sybase.com...
> >> Hi,
> >>
> >> I have a Java component (A) that does an insert and calls another
> >component
> >> (B). Comp A "support transaction" and does not have "automatic
> >> demarcation/deactivation" checked. Comp B "support transaction" and has
> >> "automatic demarcation/deactivation" checked.
> >>
> >> If I'm not wrong, after calling completeWork() in Comp A deactivate it,
> >and
> >> any subsequent method invocation in comp A from the client will bring
> >likely
> >> another instance of comp A.
> >>
> >> I would like to, after calling completeWork(), keep the instance bound
to
> >> the client that just have commited the transaction, and thus continue
> >> working.
> >>
> >> Any help ?
> >>
> >> TIA
> >> Diego.
> >>
> >>
> >>
> >
> >
>
>


Develop Informatica Posted on 2000-02-14 19:29:56.0Z
Newsgroups: sybase.public.easerver
From: "Develop Informatica" <suporte@develop.com.br>
Subject: Re: maintaining state after completeWork()
Date: Mon, 14 Feb 2000 16:29:56 -0300
Lines: 82
X-Newsreader: Microsoft Outlook Express 4.72.3110.5
X-MimeOLE: Produced By Microsoft MimeOLE V4.72.3110.3
NNTP-Posting-Host: 200.248.92.2
Message-ID: <347_gWQ20Fyd$GA.184@forums.sybase.com>
References: <347_0yYuP4wd$GA.96@forums.sybase.com> <347_HzP1hPxd$GA.327@forums.sybase.com> <347_4Ihw3Vxd$GA.332@forums.sybase.com> <347_LkD$afxd$GA.149@forums.sybase.com>
Path: forums-1-dub!forums-1-dub!forums-master.sybase.com!forums.sybase.com
Xref: forums-1-dub sybase.public.easerver:28731
Article PK: 160853

Do you mean component X does not manage the business logic of the
transaction ? Component X never call completeWork() ? I hadn't thought this
way, is just creating another level of object abstraction, like a master
object. I will try something in this direction.

Thank you very much, Mark.

Diego.

Mark Maslow wrote in message ...
>Why can't you have stateful component X call component A? Component A
calls
>any number of components, issues a completeWork() and finanally returns any
>information that may be needed later, such as primary keys generated by
>inserts, to component X. Then the client can access the information stored
>in instance variables of component X at any time.
>
>Mark Maslow
>
>Develop Informatica <suporte@develop.com.br> wrote in message
>news:4Ihw3Vxd$GA.332@forums.sybase.com...
>> But, in this case, when will commit be issued in the database ? All
>> delegated components call continueWork(), and are waiting for the root
>> component call completeWork(). When root calls it, it is deactivated.
>>
>> I need this behavior in order to, after commiting in the database, make
>some
>> instance variables available to the client, like the primary key
generated
>> by the insert.
>>
>> Do you have any other approach ?
>>
>> Diego.
>>
>>
>> Mark Maslow wrote in message ...
>> >If you want to keep a stateful component instance that remains bound to
>the
>> >client, you will need to delegate any database updates to other
>components.
>> >
>> >Mark Maslow
>> >
>> >Develop Informatica <suporte@develop.com.br> wrote in message
>> >news:0yYuP4wd$GA.96@forums.sybase.com...
>> >> Hi,
>> >>
>> >> I have a Java component (A) that does an insert and calls another
>> >component
>> >> (B). Comp A "support transaction" and does not have "automatic
>> >> demarcation/deactivation" checked. Comp B "support transaction" and
has
>> >> "automatic demarcation/deactivation" checked.
>> >>
>> >> If I'm not wrong, after calling completeWork() in Comp A deactivate
it,
>> >and
>> >> any subsequent method invocation in comp A from the client will bring
>> >likely
>> >> another instance of comp A.
>> >>
>> >> I would like to, after calling completeWork(), keep the instance bound
>to
>> >> the client that just have commited the transaction, and thus continue
>> >> working.
>> >>
>> >> Any help ?
>> >>
>> >> TIA
>> >> Diego.
>> >>
>> >>
>> >>
>> >
>> >
>>
>>
>
>


Mark Maslow Posted on 2000-02-14 19:50:09.0Z
Newsgroups: sybase.public.easerver
From: "Mark Maslow" <mark.maslow@sierraclub.org>
Subject: Re: maintaining state after completeWork()
Date: Mon, 14 Feb 2000 11:50:09 -0800
Lines: 100
Organization: Sierra Club
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 5.00.2314.1300
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2314.1300
NNTP-Posting-Host: machine001.sierraclub.org 207.90.163.1
Message-ID: <347_mcn07Vyd$GA.324@forums.sybase.com>
References: <347_0yYuP4wd$GA.96@forums.sybase.com> <347_HzP1hPxd$GA.327@forums.sybase.com> <347_4Ihw3Vxd$GA.332@forums.sybase.com> <347_LkD$afxd$GA.149@forums.sybase.com> <347_gWQ20Fyd$GA.184@forums.sybase.com>
Path: forums-1-dub!forums-1-dub!forums-master.sybase.com!forums.sybase.com
Xref: forums-1-dub sybase.public.easerver:28725
Article PK: 154708

Exactly right. You should, of course, call setComplete() at some point on
component X - and/or make sure there is a timeout value set. Otherwise,
component X will become "orphaned" after the client goes away, and never
deactivate.

Mark Maslow

Develop Informatica <suporte@develop.com.br> wrote in message
news:gWQ20Fyd$GA.184@forums.sybase.com...
> Do you mean component X does not manage the business logic of the
> transaction ? Component X never call completeWork() ? I hadn't thought
this
> way, is just creating another level of object abstraction, like a master
> object. I will try something in this direction.
>
> Thank you very much, Mark.
>
> Diego.
>
> Mark Maslow wrote in message ...
> >Why can't you have stateful component X call component A? Component A
> calls
> >any number of components, issues a completeWork() and finanally returns
any
> >information that may be needed later, such as primary keys generated by
> >inserts, to component X. Then the client can access the information
stored
> >in instance variables of component X at any time.
> >
> >Mark Maslow
> >
> >Develop Informatica <suporte@develop.com.br> wrote in message
> >news:4Ihw3Vxd$GA.332@forums.sybase.com...
> >> But, in this case, when will commit be issued in the database ? All
> >> delegated components call continueWork(), and are waiting for the root
> >> component call completeWork(). When root calls it, it is deactivated.
> >>
> >> I need this behavior in order to, after commiting in the database, make
> >some
> >> instance variables available to the client, like the primary key
> generated
> >> by the insert.
> >>
> >> Do you have any other approach ?
> >>
> >> Diego.
> >>
> >>
> >> Mark Maslow wrote in message ...
> >> >If you want to keep a stateful component instance that remains bound
to
> >the
> >> >client, you will need to delegate any database updates to other
> >components.
> >> >
> >> >Mark Maslow
> >> >
> >> >Develop Informatica <suporte@develop.com.br> wrote in message
> >> >news:0yYuP4wd$GA.96@forums.sybase.com...
> >> >> Hi,
> >> >>
> >> >> I have a Java component (A) that does an insert and calls another
> >> >component
> >> >> (B). Comp A "support transaction" and does not have "automatic
> >> >> demarcation/deactivation" checked. Comp B "support transaction" and
> has
> >> >> "automatic demarcation/deactivation" checked.
> >> >>
> >> >> If I'm not wrong, after calling completeWork() in Comp A deactivate
> it,
> >> >and
> >> >> any subsequent method invocation in comp A from the client will
bring
> >> >likely
> >> >> another instance of comp A.
> >> >>
> >> >> I would like to, after calling completeWork(), keep the instance
bound
> >to
> >> >> the client that just have commited the transaction, and thus
continue
> >> >> working.
> >> >>
> >> >> Any help ?
> >> >>
> >> >> TIA
> >> >> Diego.
> >> >>
> >> >>
> >> >>
> >> >
> >> >
> >>
> >>
> >
> >
>
>