Petals-BC-SQL 1.1.1

compared with
Key
This line was removed.
This word was removed. This word was added.
This line was added.

Changes (16)

View Page History

MEP supported : InOut
When the {{select}} operation is set on the incoming exchange, the component performs the SQL SELECT instruction(s) statement(s) defined in the {{sql}} element of the IN message. tThe OUT message returned contains the SQL Result Set.
{info}If you want to get meta-data (name of a column, type of a column, index of a row) in the response, you must activate the meta-data feature. This feature can be set at the Service definition, in the SU, or at runtime, by setting a property 'metadata' to {{true}} in the IN message.
{info}

MEP supported : InOnly
When the {{Iinsert}} operation is set on the incoming exchange, the component performs the SQL INSERT instruction(s) statement(s) defined in the {{sql}} element of the IN message.
Example of a IN message :
{code:xml}

MEP supported : InOnly
When the {{delete}} operation is set on the incoming exchange, the component performs the SQL DELETE instruction(s) statement(s) defined in the {{sql}} element of the IN message.
Example of a IN message :
{code:xml}

MEP supported : InOnly
When the {{delete}} operation is set on the incoming exchange, the component performs the SQL UPDATE instruction(s) statement(s) defined in the {{sql}} element of the IN message.
Example of a IN message :
{code:xml}
{code}

h3. {{InsertWithResponse}} Operation

MEP supported : InOut
When the {{insertWithResponse}} operation is set on the incoming exchange, the component performs the SQL INSERT statement(s) defined in the {{sql}} element of the IN message.
The OUT message returned contains the number of row that has been inserted by the statement(s).
Example of a IN message :
{code:xml}
<sql xmlns="http://petals.ow2.org/components/sql/version-1">insert into user values('toto','toto')</sql>
{code}
Example of a OUT message returning the number of inserted row :
{code:xml}
<updated xmlns="http://petals.ow2.org/components/sql/version-1">1</updated>
{code}


h3. {{DeleteWithResponse}} Operation

MEP supported : InOut
When the {{deleteWithResponse}} operation is set on the incoming exchange, the component performs the SQL DELETE statement(s) defined in the {{sql}} element of the IN message.
The OUT message returned contains the number of row that has been deleted by the statement(s).
Example of a IN message :
{code:xml}
<sql xmlns="http://petals.ow2.org/components/sql/version-1">delete from user where name!='test'</sql>
{code}
Example of a OUT message returning the number of deleted row :
{code:xml}
<updated xmlns="http://petals.ow2.org/components/sql/version-1">3</updated>
{code}


h3. {{UpdateWithResponse}} Operation

MEP supported : InOut
When the {{updateWithResponse}} operation is set on the incoming exchange, the component performs the SQL UPDATE statement(s) defined in the {{sql}} element of the IN message.
The OUT message returned contains the number of row that has been updated by the statement(s).
Example of a IN message :
{code:xml}
<sql xmlns="http://petals.ow2.org/components/sql/version-1">update user set firstname='toto3' where name='toto2'</sql>
{code}
Example of a OUT message returning the number of updated row :
{code:xml}
<updated xmlns="http://petals.ow2.org/components/sql/version-1">1</updated>
{code}

h2. Configuration

{center}{*}Configuration {center}*Configuration of a Service Unit to provide a service (JBI)*{center}

{table-plus}



|| Parameter || Description || Default || Required ||
| provides | Describe the JBI service that will be exposed into the JBI bus. Interface (QName), Service (QName) and Endpoint (String) attributes are required. | {center}\-{center} | {center}Yes{center} |



{petalslink}{include:0 CDK SU Provide Configuration}{petalslink}
\\




h3. Service Unit descriptor





h3. Service Unit content




h1. Component Configuration
{note}Caution: the component requires at least a JDBC Shared Library. Please install first a valid Shared Library containing your database JDBC driver. Then you can configure your component by using PEtALS maven plugin with the goal jbi:configure or the PEtALS Ant task petals-configure-component.{note}



The following attributes can be set during the installation phase to configure the component, using the params element of the jbi-install-component ANT task:

{table-plus}

{table-plus}






|| {color:#333333}Parameter{color} || {color:#333333}Description{color} || {color:#333333}Default{color} || {color:#333333}Required{color} || {color:#333333}Required{color} ||
| acceptor-pool-size | The size of the thread pool used to accept Message Exchanges from the NMR. Once a message is accepted, its processing is delegated to the processor pool thread. | 3 | Yes | Runtime |

{table-plus}

{table-plus}
{petalslink}{include:0 CDK Component Configuration Table}{petalslink}