Difference between revisions of "J2ee-jca-call"

From GreenVulcano Wiki
Jump to: navigation, search
 
(11 intermediate revisions by 2 users not shown)
Line 5: Line 5:
 
=={{VULCON}} / {{GVCONSOLE}} Configuration==
 
=={{VULCON}} / {{GVCONSOLE}} Configuration==
  
There are no limitations on the structure of records that the JCA adapter can use. The body of GVBuffer must contain an XML structure that describes the JCA record, and in response the output record is converted in the same XML format.
+
There are no limitations on the structure of records that the JCA adapter can use. The body of [[GVBuffer]] must contain an XML structure that describes the JCA record, and in response the output record is converted in the same XML format.
  
The ''j2ee-jca-call'' Element is used by [[Channel]] and [[routed-call]].
+
The [[j2ee-jca-call]] Element is used by [[Channel]] and [[routed-call]].
  
 
Its attributes are:  
 
Its attributes are:  
 +
{|class="gvtable"
 +
! Attribute !! Type !! Description
 +
|-
 +
| type || fixed || This attribute must assume the value '''call'''.
 +
|-
 +
| class || fixed || This attribute must assume the value '''it.greenvulcano.gvesb.virtual.j2ee.JCACallOperation'''.
 +
|-
 +
| name || required || Operation name. Used in the 'Flow' section to associate workflow nodes to VCL operations.
 +
|-
 +
| jndi-name-eis || required || JNDI name under which the resource adapter is installed. Is the JNDI name of connection factory.
 +
|-
 +
| exec-type || required || Invocation description:
 +
* exec_in_out: {{GVESB}} uses the Interaction.execute() with the input and output records. If the method returns false, {{GVESB}} throws an exception.
 +
* out_exec_in: {{GVESB}} uses the method Interaction.execute() with the only input record, receiving the output record as a result of invocation.
 +
* exec_in: {{GVESB}} uses the method Interaction.execute() with the only input record, without expecting results. {{GVESB}} returns the input record. <br/> Refer to the documentation of particular JCA adapter to see which are the accepted methods.
 +
|-
 +
| output-name || optional || If you specify ''exec_in_out'' to attribute ''exec-type'', you must specify the name of the output record. <br/> Refer to the documentation of particular JCA adapter to see which is the name to be used.
 +
|-
 +
| output-type || optional || If you specify 'exec_in_out' to attribute 'exec-type', specify the type of output record.<br/> Refer to the documentation of particular JCA adapter to see what kind of records is returned by invoked function. <br/> The attribute's admitted values are:
 +
* mapped
 +
* indexed
 +
|-
 +
| byteArray-handling || optional || Defines how to deal with returns of type byte[].
 +
* base64: The byte arrays are encoded in base64 strings.
 +
* string: The byte arrays are interpreted as strings. In the case of string you can define the encoding to be used with the attribute ''byteArray-encoding''.<br/> If you do not specify the encoding will be used the platform default.
 +
* xml: The byte arrays are interpreted as serialized XML.
 +
|-
 +
| byteArray-encoding || optional || Defines the encoding to be used in case byteArray-handling is set to 'string'.
 +
|-
 +
| namespace-prefix || optional || The XML used to describe JCA records provides a particular namespace (<nowiki>http://www.eaisoftware.it/jca/xml</nowiki>). The default prefix used for namespace is ''jca''. <br/> Warning: Changing this value will force a change of xpath used in sub-elements [[#xml-data|xml-data]] and [[#param-gvdata|param-gvdata]].
 +
|}
  
* ''type'': call.
+
[[j2ee-jca-call]] has the following sub-elements:
* ''class'': it.greenvulcano.gvesb.virtual.j2ee.JCACallOperation.
 
* ''name'': Operation name. Used in the 'Flow' section to associate workflow nodes to VCL operations.
 
* ''jndi-name-eis'': JNDI name under which the resource adapter is installed. Is the JNDI name of connection factory.
 
* ''exec-type'': Invocation description:
 
** exec_in_out: {{GVESB}} uses the Interaction.execute() with the input and output records. If the method returns false, {{GVESB}} throws an exception.
 
** out_exec_in: {{GVESB}} uses the method Interaction.execute() with the only input record, receiving the output record as a result of invocation.
 
** exec_in: {{GVESB}} uses the method Interaction.execute() with the only input record, without expecting results. {{GVESB}} returns the input record. <br/> Refer to the documentation of particular JCA adapter to see which are the accepted methods.
 
* ''output-name'': If you specify ''exec_in_out'' to attribute ''exec-type'', you must specify the name of the output record. <br/> Refer to the documentation of particular JCA adapter to see which is the name to be used.
 
* ''output-type'': If you specify 'exec_in_out' to attribute 'exec-type', specify the type of output record.<br/> Refer to the documentation of particular JCA adapter to see what kind of records is returned by invoked function. <br/> The attribute's admitted values are:
 
** mapped
 
** indexed
 
* ''byteArray-handling'': Defines how to deal with returns of type byte[].
 
** base64: The byte arrays are encoded in base64 strings.
 
** string: The byte arrays are interpreted as strings. In the case of string you can define the encoding to be used with the attribute ''byteArray-encoding''.<br/> If you do not specify the encoding will be used the platform default.
 
** xml: The byte arrays are interpreted as serialized XML.
 
* ''byteArray-encoding'': Defines the encoding to be used in case byteArray-handling is set to 'string'.
 
* ''namespace-prefix'': The XML used to describe JCA records provides a particular namespace ([http://www.eaisoftware.it/jca/xml http://www.eaisoftware.it/jca/xml]). The default prefix used for namespace is ''jca''. <br/> Warning: Changing this value will force a change of xpath
 
used in sub-elements ''xml-data'' and ''param-gvdata''.
 
  
''j2ee-jca-call'' has the following subelements:
+
* [[Description]]
 
+
* [[JNDIHelper]]
* Description,
+
* [[J2ee-jca-call#jca-interaction-spec|jca-interaction-spec]]
* [[JNDIHelper]],
+
* [[J2ee-jca-call#jca-connection-spec|jca-connection-spec]]
* jca-interaction-spec (see bellow),
+
* [[#xml-data|xml-data]]
* [[jca-connection-spec]],
+
* [[#param-gvbuffer|param-gvbuffer]]
* [[xml-data]],
 
* [[param-gvbuffer]],
 
 
* [[ServiceAlias]]
 
* [[ServiceAlias]]
  
 
+
===jca-interaction-spec===
==jca-interaction-spec==
 
 
 
  
 
The element ''jca-interaction-spec'' is used only by ''j2ee-jca-call'' and specifies the properties for the object ''javax.resource.cci.InteractionSpec''.
 
The element ''jca-interaction-spec'' is used only by ''j2ee-jca-call'' and specifies the properties for the object ''javax.resource.cci.InteractionSpec''.
Line 50: Line 59:
 
Refer to the documentation of particular JCA adapter for a list of properties supported by InteractionSpec.
 
Refer to the documentation of particular JCA adapter for a list of properties supported by InteractionSpec.
 
It has the attributes:
 
It has the attributes:
 +
{|class="gvtable"
 +
! Attribute !! Type !! Description
 +
|-
 +
| class || required || Class that implements InteractionSpec. Consult the documentation of particular JCA adapter for the value of this parameter.
 +
|-
 +
| function-name || optional || Many EIS provides different functions. This property allows you to specify the function to invoke. <br/> JCA specifications require implementation of this standard property only if applicable to the particular EIS. Refer to the documentation of the particular EIS for a list of available functions.
 +
|-
 +
| interaction-verb || optional || The functions exposed by an EIS can be invoked in a standard way:
 +
* SYNC_SEND_RECEIVE: Send data to the EIS, with synchronous waiting for a reply.
 +
* SYNC_SEND: Send data to the EIS, without reply.
 +
* SYNC_RECEIVE: Request of data to the EIS. <br/> JCA specifications require implementation of this standard property only if applicable to the particular EIS. <br/> Refer to the documentation of the particular EIS to check the verb for the various supported functions.
 +
|-
 +
| execution-timeout || optional || Timeout in milliseconds for a given interaction. Not all EIS support this parameter. JCA specifications require implementation of this standard property only if applicable to the particular EIS.
 +
|}
 +
 +
It has the following sub-elements:
 +
* [[Description]]
 +
* [[#spec-constructor|spec-constructor]]
 +
* [[#spec-property|spec-property]]
 +
 +
===jca-connection-spec===
 +
 +
The element ''jca-connection-spec'' is used to specify the properties for the object javax.resource.cci.ConnectionSpec.
 +
 +
The ConnectionSpec object must be a JavaBeans and its properties are used to provide initial parameters to JCA connector
 +
in order to establish a connection with the EIS. Refer to the documentation of particular JCA adapter for a list of properties supported by ConnectionSpec.
 +
 +
The ''jca-connection-spec'' Element is used only by [[j2ee-jca-call]].
 +
 +
It has the following attributes:
 +
{|class="gvtable"
 +
! Attribute !! Type !! Description
 +
|-
 +
| class'' || required || Class that implements the ConnectionSpec. Consult the documentation of particular JCA adapter for the value of this parameter.
 +
|}
 +
 +
and accepts the sub-elements:
 +
* [[Description]]
 +
* [[#spec-constructor|spec-constructor]]
 +
* [[#spec-property|spec-property]]
 +
 +
===spec-constructor===
 +
 +
''spec-constructor'' allows you to build InteractionSpec or ConnectionSpec objects using constructors with a list of parameters.
 +
 +
This element identifies constructors that accept only simple types as parameters.
 +
 +
Refer to the documentation of the particular EIS to see which objects constructors are supported.
 +
 +
The ''spec-constructor'' element is used by '''jca-connection-spec''' and '''jca-interaction-spec'''.
 +
 +
It has the sub-elements
 +
 +
* [[Description]]
 +
* [[#parameter|parameter]]
 +
 +
====parameter====
 +
 +
The parameter Element specify a constructor parameter. It is used only by '''spec-constructor'''.
 +
 +
Its attributes are:
 +
 +
* ''type'': Parameter type. Only supports simple types. The attribute's admitted values are:
 +
** byte
 +
** boolean
 +
** char
 +
** double
 +
** float
 +
** int
 +
** long
 +
** short
 +
** String
 +
* ''value'': Parameter value. The attribute's admitted values are:
 +
** true
 +
** false
 +
 +
===spec-property===
 +
 +
Property used to initialize the connection spec to connect the JCA adapter.
 +
 +
The properties to be specified depend on the particular resource adapter. Refer to the documentation of the resource adapter.
 +
 +
The '''spec-property''' Element is used by '''jca-connection-spec''', '''jca-interaction-spec'''.
 +
 +
Its attributes are:
 +
 +
* ''name'': Property name.
 +
* ''value'': Property value.
 +
 +
===xml-data===
 +
 +
According to the JCA specification, the Record may contain only simple data types or other records.
 +
However, it is frequently that some return strings contain XML data.
 +
 +
This element allows you to specify the xpath for string data to be transformed into XML.
 +
 +
The xml-data Element is used only by [[j2ee-jca-call]] and has the sub-elements:
 +
 +
* [[Description]]
 +
* [[#string-to-xml|string-to-xml]]
 +
 +
====string-to-xml====
 +
 +
This element specifies that a particular string returned by EIS must be interpreted as XML.
 +
 +
The string-to-xml Element is used only by [[#xml-data|xml-data]].
 +
 +
The following table shows its attributes:
 +
 +
{|class="gvtable"
 +
! Attribute !! Type !! Description
 +
|-
 +
| xpath || required || XPath to identify the data to be interpreted as XML.
 +
|}
 +
 +
===param-gvbuffer===
 +
 +
This feature allows you to set some fields GVBuffer output with the output values of the EIS.
 +
Can only be used if the output of the EIS is in XML format.
 +
 +
The param-gvbuffer Element is used only by '''j2ee-jca-call'''.
 +
 +
It has the attribute:
 +
{|class="gvtable"
 +
! Attribute !! Type !! Description
 +
|-
 +
| xpath-retCode || optional || Specifies an XPath expression to be applied to EIS output XML to select the return code setted in the output GVBuffer.
 +
|}
 +
 +
and the sub-elements:
 +
* [[Description]]
 +
* [[#property|property]]
  
* ''class'': Class that implements the InteractionSpec. Consult the documentation of particular JCA adapter for the value of this parameter.
+
====property====
* ''function-name'': Many EIS provides different functions. This property allows you to specify the function to invoke. <br/> JCA specifications require implementation of this standard property only if applicable to the particular EIS. Refer to the documentation of the particular EIS for a list of available functions.
 
* ''interaction-verb'': The functions exposed by an EIS can be invoked in a standard way:
 
** SYNC_SEND_RECEIVE: Send data to the EIS, with synchronous waiting for a reply.
 
** SYNC_SEND: Send data to the EIS, without reply.
 
** SYNC_RECEIVE: Request of data to the EIS. <br/> JCA specifications require implementation of this standard property only if applicable to the particular EIS. <br/> Refer to the documentation of the particular EIS to check the verb for the various supported functions.
 
* ''execution-timeout'': Timeout in milliseconds for a given interaction. Not all EIS support this parameter. JCA specifications require implementation of this standard property only if applicable to the particular EIS.
 
  
It has the following subelements:
+
Specifies an XPath expression to be applied to EIS output XML to select the value of a propery to set in the output GVBuffer.
  
* Description,
+
Its attributes are:
* [[spec-constructor]],
+
{|class="gvtable"
* [[spec-property]]
+
! Attribute !! Type !! Description
 +
|-
 +
| name || required || Name of property to set on output GVBuffer.
 +
|-
 +
| xpath || required || Specifies an XPath expression to be applied to EIS output XML to select the value of a property to set in the output
 +
|-
 +
| default || optional || Specifies a default value to use in case the XPath does not select any value. <br/> If not specified, if the XPath does not identify any value, the field will not be set.
 +
|}

Latest revision as of 08:45, 10 April 2012

Description

This feature allows you to define an invocation to a JCA adapter that exposes the CCI interface.

VulCon / GV Console Configuration

There are no limitations on the structure of records that the JCA adapter can use. The body of GVBuffer must contain an XML structure that describes the JCA record, and in response the output record is converted in the same XML format.

The j2ee-jca-call Element is used by Channel and routed-call.

Its attributes are:

Attribute Type Description
type fixed This attribute must assume the value call.
class fixed This attribute must assume the value it.greenvulcano.gvesb.virtual.j2ee.JCACallOperation.
name required Operation name. Used in the 'Flow' section to associate workflow nodes to VCL operations.
jndi-name-eis required JNDI name under which the resource adapter is installed. Is the JNDI name of connection factory.
exec-type required Invocation description:
  • exec_in_out: GreenVulcano® ESB uses the Interaction.execute() with the input and output records. If the method returns false, GreenVulcano® ESB throws an exception.
  • out_exec_in: GreenVulcano® ESB uses the method Interaction.execute() with the only input record, receiving the output record as a result of invocation.
  • exec_in: GreenVulcano® ESB uses the method Interaction.execute() with the only input record, without expecting results. GreenVulcano® ESB returns the input record.
    Refer to the documentation of particular JCA adapter to see which are the accepted methods.
output-name optional If you specify exec_in_out to attribute exec-type, you must specify the name of the output record.
Refer to the documentation of particular JCA adapter to see which is the name to be used.
output-type optional If you specify 'exec_in_out' to attribute 'exec-type', specify the type of output record.
Refer to the documentation of particular JCA adapter to see what kind of records is returned by invoked function.
The attribute's admitted values are:
  • mapped
  • indexed
byteArray-handling optional Defines how to deal with returns of type byte[].
  • base64: The byte arrays are encoded in base64 strings.
  • string: The byte arrays are interpreted as strings. In the case of string you can define the encoding to be used with the attribute byteArray-encoding.
    If you do not specify the encoding will be used the platform default.
  • xml: The byte arrays are interpreted as serialized XML.
byteArray-encoding optional Defines the encoding to be used in case byteArray-handling is set to 'string'.
namespace-prefix optional The XML used to describe JCA records provides a particular namespace (http://www.eaisoftware.it/jca/xml). The default prefix used for namespace is jca.
Warning: Changing this value will force a change of xpath used in sub-elements xml-data and param-gvdata.

j2ee-jca-call has the following sub-elements:

jca-interaction-spec

The element jca-interaction-spec is used only by j2ee-jca-call and specifies the properties for the object javax.resource.cci.InteractionSpec. The InteractionSpec object must be a JavaBeans and its properties are used to provide the necessary parameters for JCA connector to complete the interaction with the EIS.

Refer to the documentation of particular JCA adapter for a list of properties supported by InteractionSpec. It has the attributes:

Attribute Type Description
class required Class that implements InteractionSpec. Consult the documentation of particular JCA adapter for the value of this parameter.
function-name optional Many EIS provides different functions. This property allows you to specify the function to invoke.
JCA specifications require implementation of this standard property only if applicable to the particular EIS. Refer to the documentation of the particular EIS for a list of available functions.
interaction-verb optional The functions exposed by an EIS can be invoked in a standard way:
  • SYNC_SEND_RECEIVE: Send data to the EIS, with synchronous waiting for a reply.
  • SYNC_SEND: Send data to the EIS, without reply.
  • SYNC_RECEIVE: Request of data to the EIS.
    JCA specifications require implementation of this standard property only if applicable to the particular EIS.
    Refer to the documentation of the particular EIS to check the verb for the various supported functions.
execution-timeout optional Timeout in milliseconds for a given interaction. Not all EIS support this parameter. JCA specifications require implementation of this standard property only if applicable to the particular EIS.

It has the following sub-elements:

jca-connection-spec

The element jca-connection-spec is used to specify the properties for the object javax.resource.cci.ConnectionSpec.

The ConnectionSpec object must be a JavaBeans and its properties are used to provide initial parameters to JCA connector in order to establish a connection with the EIS. Refer to the documentation of particular JCA adapter for a list of properties supported by ConnectionSpec.

The jca-connection-spec Element is used only by j2ee-jca-call.

It has the following attributes:

Attribute Type Description
class required Class that implements the ConnectionSpec. Consult the documentation of particular JCA adapter for the value of this parameter.

and accepts the sub-elements:

spec-constructor

spec-constructor allows you to build InteractionSpec or ConnectionSpec objects using constructors with a list of parameters.

This element identifies constructors that accept only simple types as parameters.

Refer to the documentation of the particular EIS to see which objects constructors are supported.

The spec-constructor element is used by jca-connection-spec and jca-interaction-spec.

It has the sub-elements

parameter

The parameter Element specify a constructor parameter. It is used only by spec-constructor.

Its attributes are:

  • type: Parameter type. Only supports simple types. The attribute's admitted values are:
    • byte
    • boolean
    • char
    • double
    • float
    • int
    • long
    • short
    • String
  • value: Parameter value. The attribute's admitted values are:
    • true
    • false

spec-property

Property used to initialize the connection spec to connect the JCA adapter.

The properties to be specified depend on the particular resource adapter. Refer to the documentation of the resource adapter.

The spec-property Element is used by jca-connection-spec, jca-interaction-spec.

Its attributes are:

  • name: Property name.
  • value: Property value.

xml-data

According to the JCA specification, the Record may contain only simple data types or other records. However, it is frequently that some return strings contain XML data.

This element allows you to specify the xpath for string data to be transformed into XML.

The xml-data Element is used only by j2ee-jca-call and has the sub-elements:

string-to-xml

This element specifies that a particular string returned by EIS must be interpreted as XML.

The string-to-xml Element is used only by xml-data.

The following table shows its attributes:

Attribute Type Description
xpath required XPath to identify the data to be interpreted as XML.

param-gvbuffer

This feature allows you to set some fields GVBuffer output with the output values of the EIS. Can only be used if the output of the EIS is in XML format.

The param-gvbuffer Element is used only by j2ee-jca-call.

It has the attribute:

Attribute Type Description
xpath-retCode optional Specifies an XPath expression to be applied to EIS output XML to select the return code setted in the output GVBuffer.

and the sub-elements:

property

Specifies an XPath expression to be applied to EIS output XML to select the value of a propery to set in the output GVBuffer.

Its attributes are:

Attribute Type Description
name required Name of property to set on output GVBuffer.
xpath required Specifies an XPath expression to be applied to EIS output XML to select the value of a property to set in the output
default optional Specifies a default value to use in case the XPath does not select any value.
If not specified, if the XPath does not identify any value, the field will not be set.