Question: Why database adapter used in SOA Suite?.
Answer: Database adapter is one of the technology adapter, we use this adapter to interact with database.
Question: What all operations we can perform in database adapter ?.
Answer: We can perform following operations in database adapter.
1. Store Procedure or Function call.
2. CRUD operations
3. Poll new or updated records
4. Pure Sql
Question: Database adapter falls under Transactional or non-transactional adapters ?.
Answer: Database adapter is a transactional adapter.
Question: Difference between XA & Non-XA transaction ?
Non-XA (Local Transaction): It involves only one resource. When you use Non-XA transaction then you can’t involve multiple resources (different databases, Queues, application servers etc), you can rollback or commit transaction for only one resource. There is not transaction manager for this transaction as we are dealing with only one resource at a time.
XA (Global Transaction): It involves more than one resource (different databases, queues, application servers) all participate in one transaction. It uses two-phase commit to ensure that all resources either all commit or rollback any particular transaction. When you have scenario like you need to connect to two different databases, JMS Queue and application server, in this case you will use XA transaction that means all resource participate in one transaction only.
Question: What is logical delete ?.
Answer: When we poll for new or changed records using database adapter, we have multiple options after reading the data. Either we can delete the row from table (physical delete) which is not recommended or we can update the column in source table with new value (logical delete).
E.g. Source table has one column with the name flag, we read the data from source table when flag column has value “N” and after we read the data then we update the flag value to “Y”.
Question: What is Data Source?.
Answer: We specify database details to connect to database, if we hard code these details in code then we need to change code to reflect new details when we move to next environment so to solve this problem, data source concept came where we specify database details so that we need not to make changes in code. We just update the data source configuration in different environment.
When we use database adapter to connect to database, we need to specify outbound connection pool. That outbound connection pool further refer to data source.
Question: How we can limit the number of rows fetched using database adapter ?
Answer: We can limit the number of rows fetched using ” Database Rows per Transaction” property. For example, assume there are 10,000 rows at the start of a polling interval and this field is set to 100. In standalone mode, a cursor iteratively reads and processes 100 rows at a time until all 10,000 rows are processed, dividing the work into 10,000/100=100 sequential transactional units
Question: How we can limit the number of rows per XML message while sending the message from database adapter to consumer ?.
Answer: By using “Database Rows per XML Document” property.