cancel
Showing results for 
Search instead for 
Did you mean: 

What is mean by Persistence in JDBC?

Former Member
0 Kudos

Hi All,

What is ment by Persistence, and what is the difference between LOCAL and DATABASE, in receiver JDBC communication channel.

Thanks & Regards

Venkat Anil

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

Hi,

The portability, which Open SQL/JDBC provides across different databases, imposes certain requirements for the transactional behavior of the database connections. Therefore, when working with Open SQL you must consider the specifics, which distinguish Open SQL/JDBC resources from pure JDBC resources

When working with the persistence layer, you may use two type of transactions:

JTA transactions u2013 defined by the Java Transaction API (JTA) specification, which is part of the J2EE standard. These are distributed transactions, managed by a transaction manager, which is external to the data store. JTA transactions are either container-driven, or component-driven. To demarcate a component-driven JTA transaction, you must use the javax.transaction.UserTransaction interface.

Local transactions u2013 these are transactions, which work with a single resource manager that manages their execution. You can demarcate a local transaction using the appropriate API for the datastore you work with.

and also refer this link

https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/387daf90-0201-0010-bb98-cb1a5545...

Regards,

Surya

Former Member
0 Kudos

local :

As in the other adapters, Exactly Once messages are handled by default using status information in the J2EE server. All adapter error statuses and program terminations initialized externally are also handled in this mode.

However, this does not include external program terminations during a database commit. In this case, the status of message processing is unclear since it can only be changed once the database commit has been completed.

However, this kind of situation is identified when the application is started and editing of the message terminated during processing can be controlled using Conflict Resolution.

This specification is only effective for handling errors that occur when a message is being processed for a second time after initial processing remained in the unclear status described above.

Conflict Resolution

· Error

If an error occurs when processing again, this is reported to the caller system when Error is selected.

· Redo

However, if the error occurs because the message was saved in the database when it was first processed and it is still located there, processing can be completed for the sender system using the value Redo (note that the database interface normally triggers the error duplicate insert if at least one of the table fields was defined as a primary key). Otherwise the sender system will continue to send the message and the error will continue to occur.

database:

Nevertheless, there is still a gap in Exactly Once processing: if there is no primary key field in the database table or if the data is already being processed by another application and it is then deleted, when the first attempt at message processing is interrupted by an irregular termination of the J2EE server immediately after the database commit, a message can be duplicated.

This problem can only be solved if message processing and status information management take place in the same database so that the processing steps have the same commit cycle.

In the database where the write-to tables are located you must create an additional table with two columns for this purpose. To define the table, specify the following:

· Database Table Name

Specify the name of the table.

· Key Column Name

Enter the key in this table column.

· Value Column Name

Enter the key value in this table column

check the below link :

http://help.sap.com/erp2005_ehp_03/helpdata/EN/22/b4d13b633f7748b4d34f3191529946/frameset.htm

Former Member
0 Kudos