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.

Transaction in appeon

5 posts in Appeon (partner product) Last posting was on 2008-08-25 06:57:15.0Z
Jose Cahisa Posted on 2008-08-11 14:15:14.0Z
From: Jose Cahisa <jcahisa@gmail.com>
User-Agent: Thunderbird 2.0.0.16 (Windows/20080708)
MIME-Version: 1.0
Newsgroups: sybase.public.appeon
Subject: Transaction in appeon
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: vip152.sybase.com
X-Original-NNTP-Posting-Host: vip152.sybase.com
Message-ID: <48a04972@forums-1-dub>
Date: 11 Aug 2008 07:15:14 -0700
X-Trace: forums-1-dub 1218464114 10.22.241.152 (11 Aug 2008 07:15:14 -0700)
X-Original-Trace: 11 Aug 2008 07:15:14 -0700, vip152.sybase.com
Lines: 18
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.appeon:2198
Article PK: 13326

Hi everybody,

I need to understand how Appeon deal with multiple SQL statements. The
situation is like this:

I have two statements, un UPDATE and a COMMIT, in a button for example.
The first statement (UPDATE) is sent to the applitation server and then
redirected to the database using a connection cache.
The second statement (COMMIT) is sent again, to the application server,
and then redirected to the database. My question is how can Appeon know
wich connection cache to use?

If the wrong connection is selected, a transaction will be left open
in the connection cache used by the first statement.

Thanks in advance.


steven.yang Posted on 2008-08-13 09:27:16.0Z
Sender: 7983.48a13ccc.1804289383@sybase.com
From: steven.yang
Newsgroups: sybase.public.appeon
Subject: Re: Transaction in appeon
X-Mailer: WebNews to Mail Gateway v1.1t
Message-ID: <48a2a8f4.4066.1681692777@sybase.com>
References: <48a04972@forums-1-dub>
NNTP-Posting-Host: 10.22.241.41
X-Original-NNTP-Posting-Host: 10.22.241.41
Date: 13 Aug 2008 02:27:16 -0700
X-Trace: forums-1-dub 1218619636 10.22.241.41 (13 Aug 2008 02:27:16 -0700)
X-Original-Trace: 13 Aug 2008 02:27:16 -0700, 10.22.241.41
Lines: 19
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.appeon:2201
Article PK: 21568

Hi Jose,
This process is implemented by following steps:
1. Configure the connection cache of the application server

2. Set up transaction object to connection cache mapping.
There are two ways for it, which are as follows:
a)Higher priority: Dynamic transaction objects to connection
cache mapping via Power Script.
b)Lower priority: Static transaction objects to connection
cache mapping in AEM. The mapping in PowerScript has
priority over the static mapping in AEM.

For detailed instructions, please refer to Appeon Help |
Appeon Server Configuration Guide for J2EE | Database
Connection Setup | Setting up transaction object to
connection cache mapping.

Regards,
Steven


Jose Cahisa Posted on 2008-08-13 13:05:30.0Z
From: Jose Cahisa <jcahisa@gmail.com>
User-Agent: Thunderbird 2.0.0.16 (Windows/20080708)
MIME-Version: 1.0
Newsgroups: sybase.public.appeon
Subject: Re: Transaction in appeon
References: <48a04972@forums-1-dub> <48a2a8f4.4066.1681692777@sybase.com>
In-Reply-To: <48a2a8f4.4066.1681692777@sybase.com>
Content-Type: text/plain; charset=windows-1252; format=flowed
Content-Transfer-Encoding: 8bit
NNTP-Posting-Host: vip152.sybase.com
X-Original-NNTP-Posting-Host: vip152.sybase.com
Message-ID: <48a2dc1a@forums-1-dub>
Date: 13 Aug 2008 06:05:30 -0700
X-Trace: forums-1-dub 1218632730 10.22.241.152 (13 Aug 2008 06:05:30 -0700)
X-Original-Trace: 13 Aug 2008 06:05:30 -0700, vip152.sybase.com
Lines: 47
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.appeon:2203
Article PK: 13329

Thanks Steven,

Our actual configuration includes multiples connection caches, and we
select them dinamically from our powerbuilder application using the
DBParm property of the SQLCA.
(SQLCA.DBParm=“CacheName=‘ASEConnectionCache1’”)

I understand that one connection cache is, in fact, a pool of physical
connections to the database. Therefore if the application is connected
to one connection cache, it doesn't mean that all the request of this
application will be redirected to the database through the same physical
connection to the database. For example, we have a situation where a
temporary table was created in a first step but when we try to use it,
it wasn't there. The server was selecting differents physical
connections for differents requests of the same application and the same
connection cache.

My question is related on how this situation is handled when we open a
transaction in a first step, then we make some database operations
(UPDATE, INSERT, DELETE) in a second step, and finally we close the
transaction in powerbuild using a COMMIT. We have a lot of our code in
embedded sentences like this, and I need to know if we must change them
for some other better way.

Thanks a lot!


steven.yang escribió:

> Hi Jose,
> This process is implemented by following steps:
> 1. Configure the connection cache of the application server
>
> 2. Set up transaction object to connection cache mapping.
> There are two ways for it, which are as follows:
> a)Higher priority: Dynamic transaction objects to connection
> cache mapping via Power Script.
> b)Lower priority: Static transaction objects to connection
> cache mapping in AEM. The mapping in PowerScript has
> priority over the static mapping in AEM.
>
> For detailed instructions, please refer to Appeon Help |
> Appeon Server Configuration Guide for J2EE | Database
> Connection Setup | Setting up transaction object to
> connection cache mapping.
>
> Regards,
> Steven


steven.yang Posted on 2008-08-22 07:26:06.0Z
Sender: 379b.48ab7045.1804289383@sybase.com
From: steven.yang
Newsgroups: sybase.public.appeon
Subject: Re: Transaction in appeon
X-Mailer: WebNews to Mail Gateway v1.1t
Message-ID: <48ae6a0e.233f.1681692777@sybase.com>
References: <48a2dc1a@forums-1-dub>
NNTP-Posting-Host: 10.22.241.41
X-Original-NNTP-Posting-Host: 10.22.241.41
Date: 22 Aug 2008 00:26:06 -0700
X-Trace: forums-1-dub 1219389966 10.22.241.41 (22 Aug 2008 00:26:06 -0700)
X-Original-Trace: 22 Aug 2008 00:26:06 -0700, 10.22.241.41
Lines: 37
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.appeon:2213
Article PK: 21574

Hi Jose,
Your understanding is correctly. Like you said "we have a
situation where a temporary table was created in a first
step but when we try to use it, it wasn't there. ". One
thing I want to clarify is the problem is not caused by
Appeon. Actually, the problem is caused by the difference
between the PowerBuilder application (client/server) and Web
application(browser/server).

In PowerBuilder, once the application connect to the
database, the database session will be created and valid
until the PB application disconnect from the database. As
for the temporary table, it is a session level conception,
which means the temporary table is valid starting from the
creation of the database session and end at disconnecting
form the database. However on the Web, applications use
connection cache to connect to the database, comparing to
the PB applications, the connection between the application
and the database is a short connection. So generally there
are several database sessions in one Web application

Gets down to your question, "when we open a transaction in a
first step, then we make some database operations (UPDATE,
INSERT, DELETE) in a second step, and finally we close the
transaction in powerbuild using a COMMIT. We have a lot of
our code in embedded sentences like this, and I need to know
if we must change them for some other better way.". So the
rule on the web is if you didn't use session-level objects
and functions, there is no need to change your code.
However, for example, if you have a temporary table in step
one, which is only valid in this session, you cannot reuse
the table in step 2. In this case, you can use database
stored procedures or database functions to work around this
issue.

Regards,
Steven


Jonathan Baker [Sybase] Posted on 2008-08-25 06:57:15.0Z
From: "Jonathan Baker [Sybase]" <lastnamefirstinitial@sybase.com>
User-Agent: Thunderbird 2.0.0.16 (Windows/20080708)
MIME-Version: 1.0
Newsgroups: sybase.public.appeon
Subject: Re: Transaction in appeon
References: <48a04972@forums-1-dub> <48a2a8f4.4066.1681692777@sybase.com> <48a2dc1a@forums-1-dub>
In-Reply-To: <48a2dc1a@forums-1-dub>
Content-Type: text/plain; charset=windows-1252; format=flowed
Content-Transfer-Encoding: 8bit
NNTP-Posting-Host: vip152.sybase.com
X-Original-NNTP-Posting-Host: vip152.sybase.com
Message-ID: <48b257cb@forums-1-dub>
Date: 24 Aug 2008 23:57:15 -0700
X-Trace: forums-1-dub 1219647435 10.22.241.152 (24 Aug 2008 23:57:15 -0700)
X-Original-Trace: 24 Aug 2008 23:57:15 -0700, vip152.sybase.com
Lines: 80
X-Authenticated-User: techsupp
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.appeon:2214
Article PK: 21577

Jose,

Your design may have worked in a client/server application design, but
there are potential problems that are now amplified by moving it to the web.

Consider your example. If you are holding open a transaction until the
user pushes a button in a client/server application, you are inviting
potential problems. If the user goes to a meeting for several hours,
the transaction will remain open until the user returns from the
meeting. This problem may occur only rarely, but it is possible and
should not be allowed.

The normal solution to this is to have the application wait and perform
no work on the Database until the entire transaction can be submitted as
a block. This promotes transactional integrity and removes any problems
with transaction blocking while waiting for a user action.

Now that you have moved to the web, you are discovering that having
long-running open transactions has new additional side effects. These
effects may appear to be a "problem" with the application server. In
fact, it is pointing to a flaw in the program design. Application
servers (all application servers) are designed to work with complete
transactions. Although EAServer does have some methods to keep a
transaction open over multiple calls, it is strongly discouraged in the
documentation and materials.



Jonathan

Jose Cahisa wrote:
> Thanks Steven,
>
> Our actual configuration includes multiples connection caches, and we
> select them dinamically from our powerbuilder application using the
> DBParm property of the SQLCA.
> (SQLCA.DBParm=“CacheName=‘ASEConnectionCache1’”)
>
> I understand that one connection cache is, in fact, a pool of physical
> connections to the database. Therefore if the application is connected
> to one connection cache, it doesn't mean that all the request of this
> application will be redirected to the database through the same physical
> connection to the database. For example, we have a situation where a
> temporary table was created in a first step but when we try to use it,
> it wasn't there. The server was selecting differents physical
> connections for differents requests of the same application and the same
> connection cache.
>
> My question is related on how this situation is handled when we open a
> transaction in a first step, then we make some database operations
> (UPDATE, INSERT, DELETE) in a second step, and finally we close the
> transaction in powerbuild using a COMMIT. We have a lot of our code in
> embedded sentences like this, and I need to know if we must change them
> for some other better way.
>
> Thanks a lot!
>
>
> steven.yang escribió:
>> Hi Jose,
>> This process is implemented by following steps:
>> 1. Configure the connection cache of the application server
>>
>> 2. Set up transaction object to connection cache mapping.
>> There are two ways for it, which are as follows:
>> a)Higher priority: Dynamic transaction objects to connection
>> cache mapping via Power Script.
>> b)Lower priority: Static transaction objects to connection
>> cache mapping in AEM. The mapping in PowerScript has
>> priority over the static mapping in AEM.
>>
>> For detailed instructions, please refer to Appeon Help |
>> Appeon Server Configuration Guide for J2EE | Database
>> Connection Setup | Setting up transaction object to
>> connection cache mapping.
>>
>> Regards,
>> Steven