uCosminexus Service Platform, Reception and Adapter Definition Guide

[Contents][Glossary][Index][Back][Next]

Appendix B.2 Definition files of the custom adapter development framework

This appendix describes the contents of the files defined when developing General custom adapters in the custom adapter development framework.

Organization of this subsection
(1) Custom adapter development framework action definition file
(2) Custom adapter property file
(3) HITACHI Application Integrated Property File for custom adapter
(4) Custom adapter definition file

(1) Custom adapter development framework action definition file

The custom adapter development framework action definition file is a properties file in XML format that can be read by the loadFromXML method of the java.util.Properties class. It must have the file name framework_properties.xml.

Function
The purpose of this file is to specify the class name (including the package name) of the protocol converter loaded by the custom adapter development framework. The class name of the protocol converter is specified in the entry tag whose key attribute is classname.

File location
When you create a JAR file of the protocol converter, this file is created in the root directory of the JAR file. For details on how to create a JAR file of the protocol converter, see 3.3.14(5) Creating a JAR file.

Notes
  • If the file does not exist or its file format cannot be read by the loadFromXML method of the java.util.Properties class, the General custom adapter cannot start.
  • Make sure that the same key attribute is not specified in more than one entry element.

Specification example
 
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE properties SYSTEM "http://java.sun.com/dtd/properties.dtd">
<properties>
<entry key="classname">protocolconverter.MyProtocolConverter</entry>
</properties>
 

(2) Custom adapter property file

The custom adapter property file is a properties file in XML format that can be read by the loadFromXML method of the java.util.Properties class. It must have the file name customadapter_properties.xml.

Function
This file sets the properties used by the protocol converter.
When the General custom adapter starts, the properties are read from the custom adapter development framework. The properties read in this process can be acquired as Property instances by the getProperty method from the adapter context.

File location
Register the file as a self-defined file in the General custom adapter when defining the General custom adapter. For details on how to define a General custom adapter, see 3.3.14 Defining custom adapters.

Notes
Even if the file exists, the General custom adapter cannot start if the file is in a format that cannot be read by the loadFromXML method of the java.util.Properties.

Specification example
 
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE properties SYSTEM "http://java.sun.com/dtd/properties.dtd">
<properties>
<entry key="init">1</entry>
<entry key="min">0</entry>
<entry key="max">10</entry>
</properties>
 

(3) HITACHI Application Integrated Property File for custom adapter

A HITACHI Application Integrated Property File for a custom adapter is a file in XML format. It is a variant of a HITACHI Application Integrated Property File, used in the following situations:

A HITACHI Application Integrated Property File for custom adapters must have the file name cscadapter_property.xml.

For details on HITACHI Application Integrated Property files, see the following sections:

Function
By using a HITACHI Application Integrated Property file, you can set the parameters of the General custom adapter according to its execution environment.

File location
Register the file as a self-defined file in the General custom adapter when defining the General custom adapter. For details on how to define a General custom adapter, see 3.3.14 Defining custom adapters.

File contents
The table below shows the template of the HITACHI Application Integrated Property File for custom adapters. You can modify or add items in the variable parts of this template.
You can also add and edit the following items as elements under <hitachi-application-all-property>/<ejb-jar>/<hitachi-session-bean-property>:
  • <ejb-ref> (defines reference information for an Enterprise Bean with a remote interface)
  • <ejb-local-ref> (sets EJB reference information)
  • <env-entry> (defines an environment entry)
  • <resource-ref> (defines a resource reference)
  • <resource-env-ref> (defines resource environment variables)
  • <linked-queue> (queue name)

    Table B-4 Template of HITACHI Application Integrated Property File for custom adapter

    Tag Description Changeable
    <?xml version="1.0" encoding="MS932"?>
    XML declaration Yes
    <!DOCTYPE hitachi-application-all-property 
    PUBLIC '-//Hitachi, Ltd.//DTD Application All Property 7.1//EN'
    'http://localhost/hitachi-application-all-property_7_1.dtd'>
    DOCTYPE declaration --
    <hitachi-application-all-property>
    Root tag --
      <hitachi-application-property>
    Opening tag for the definition of application-related information --
        <description></description>
    Description of the application Yes
        <icon>
    Opening tag for the definition of a J2EE application icon displayed in the Deploy tool --
          <small-icon></small-icon>
    File name of small icon (16 x 16) Yes
          <large-icon></large-icon>
    File name of large icon (32 x 32) Yes
        </icon>
    Closing tag for the definition of a J2EE application icon displayed in the Deploy tool --
        <lookup-name>CTMADP</lookup-name>
    Name used when looking up EJBs from the client Yes#1
        <security-prop>
    Opening tag for the definition of the Enterprise Bean security management method --
          <security-method>no_security_for_methods_without_roles
          </security-method>
    Security management method --
          <default-security-role></default-security-role>
    Default security role when map_methods_without_roles is specified in security-method --
        </security-prop>
    Closing tag for the definition of the Enterprise Bean security management method --
        <start-order>120</start-order>
    The order in which J2EE applications are started and stopped Auto#2
        <scheduling-unit>Application</scheduling-unit>
    Specifies the queue scheduling unit --
        <scheduling>
    Opening tag for the definition relating to CTM integration --
          <queue-name>CTMADP</queue-name>
    Name of the queue used for scheduling Yes#1
          <parallel-count>1</parallel-count>
    The number of threads prepared by CTM to invoke an application --
          <queue-length></queue-length>
    Length of the queue used for scheduling --
        </scheduling>
    Closing tag for the definition relating to CTM integration --
        <managed-by-ctm>false</managed-by-ctm>
    Specifies whether to perform CTM integration --
        <method-observation-recovery-mode>
        </method-observation-recovery-mode>
    Specifies the recovery mode of the J2EE application time monitoring functionality --
      </hitachi-application-property>
    Closing tag for the definition of application-related information --
      <ejb-jar>
    Opening tag for the definition of EJB-related information --
        <hitachi-ejb-jar-property>
    Opening tag for the definition of information relating to EJB-JAR attributes --
        <description xml:lang="en"></description>
    Description of EJB-JAR Yes
          <display-name xml:lang="en">CSCMsgServiceAdapter
          </display-name>
    Display name of EJB-JAR --
          <icon xml:lang="en">
    Opening tag for the definition of an EJB-JAR icon displayed in the GUI tool --
            <small-icon></small-icon>
    File name of small icon (16 x 16) Yes
            <large-icon></large-icon>
    File name of large icon (32 x 32) Yes
          </icon>
    Closing tag for the definition of an EJB-JAR icon displayed in the GUI tool --
          <ejb-client-jar></ejb-client-jar>
    Name of client JAR file --
        </hitachi-ejb-jar-property>
    Closing tag for the definition of information relating to EJB-JAR attributes --
        <hitachi-session-bean-property>
    Opening tag for the definition of Session Bean attributes --
          <description xml:lang="en"></description>
    Description of Session Bean Yes
          <display-name xml:lang="en">CSCMsgServiceAdapterEJB
          </display-name>
    Display name of Session Bean --
          <icon xml:lang="en">
    Opening tag for the definition of a Session Bean icon displayed in the GUI tool --
            <small-icon></small-icon>
    File name of small icon (16 x 16) Yes
            <large-icon></large-icon>
    File name of large icon (32 x 32) Yes
          </icon>
    Closing tag for the definition of a Session Bean icon displayed in the GUI tool --
          <session-type>Stateless</session-type>
    Session Bean type --
          <transaction-type>Container</transaction-type>
    Transaction management type --
          <env-entry>
    Opening tag for the environment entry definition Auto#3
            <description xml:lang="en"></description>
    Description of the environment entry
     
            <env-entry-name>CscServerName</env-entry-name>
    Environment entry name
     
            <env-entry-type>java.lang.String</env-entry-type>
    Data type of the environment entry
     
            <env-entry-value>HCSC</env-entry-value>
    Value of the environment entry
     
          </env-entry>
    Closing tag for the environment entry definition
     
          <env-entry>
    Opening tag for the environment entry definition
     
            <description xml:lang="en"></description>
    Description of the environment entry
     
            <env-entry-name>CscClusterName</env-entry-name>
    Environment entry name
     
            <env-entry-type>java.lang.String</env-entry-type>
    Data type of the environment entry
     
            <env-entry-value>Cluster</env-entry-value>
    Value of the environment entry
     
          </env-entry>
    Closing tag for the environment entry definition
     
          <env-entry>
    Opening tag for the environment entry definition
     
            <description xml:lang="en"></description>
    Description of the environment entry
     
            <env-entry-name>AdapterName</env-entry-name>
    Environment entry name
     
            <env-entry-type>java.lang.String</env-entry-type>
    Data type of the environment entry
     
            <env-entry-value>CTMADP</env-entry-value>
    Value of the environment entry
     
          </env-entry>
    Closing tag for the environment entry definition
     
          <container-transaction>
    Opening tag for the definition of the container transaction --
            <description xml:lang="en"></description>
    Description of the container transaction --
            <method>
    Opening tag for the method definition --
              <description xml:lang="en"></description>
    Description of the method --
              <method-intf></method-intf>
    Interface type to which the method belongs --
              <method-name>*</method-name>
    Method name --
            </method>
    Closing tag for the method definition --
            <trans-attribute>Required</trans-attribute>
    Transaction attribute allocated to the method --
          </container-transaction>
    Closing tag for the definition of the container transaction --
          <session-runtime>
    Opening tag for the runtime definition --
            <lookup-name>CSCMsgServiceAdapterEJB
            </lookup-name>
    Name used when looking up EJB from the client --
            <optional-name>CTMADP</optional-name>
    Optional name for the remote interface Auto#3
            <maximum-sessions>0</maximum-sessions>
    Maximum number of sessions Yes
            <stateless>
    Opening tag for the stateless definition --
              <pooled-instance>
    Opening tag for the definition relating to pooled instances --
                <minimum>1</minimum>
    Minimum number of pooled instances Yes
                <maximum>0</maximum>
    Maximum number of pooled instances Yes
              </pooled-instance>
    Closing tag for the definition relating to pooled instances --
              <instance-timeout>0</instance-timeout>
    Timeout period for instance acquisition Yes
            </stateless>
    Closing tag for the stateless definition --
            <enable-scheduling>false</enable-scheduling>
    Specifies whether to enable scheduling for the bean (whether to use it as a scheduler Gate) --
            <pass-by-reference>true</pass-by-reference>
    Specifies whether to use pass by reference when invoking the bean Auto#3
            <scheduling>
    Opening tag for the definition of information relating to CTM integration --
              <queue-name>CSCMsgServiceAdapterEJB
              </queue-name>
    Name of the queue used for scheduling --
              <parallel-count>1</parallel-count>
    The number of threads prepared by CTM to invoke an application --
              <queue-length></queue-length>
    Length of the queue used for scheduling --
            </scheduling>
    Closing tag for the definition of information relating to CTM integration --
            <front-ejb>false</front-ejb>
    Specifies whether the EJB is a front EJB (an EJB the client invokes directly) --
          </session-runtime>
    Closing tag for the runtime definition --
          <start-order>10</start-order>
    Specifies the order in which J2EE applications are started and stopped --
        </hitachi-session-bean-property>
    Closing tag for the definition of Session Bean attributes --
      </ejb-jar>
    Closing tag for the definition of EJB-related information --
    </hitachi-application-all-property>
    Root tag --

    Legend:
    Yes: Can be modified.
    Auto: Modified automatically.
    --: Cannot be modified.

    #1
    Specify the service ID.

    #2
    Set automatically when the General custom adapter is deployed.

    #3
    Added or overwritten automatically when the General custom adapter is deployed.

Notes

(4) Custom adapter definition file

The function of the custom adapter definition file and the properties you can set in the file are described below.

Function
Sets information about a General custom adapter.

File location
 
Service-Platform-installation-directory\CSC\samples\customadapter\csccustomadapter.properties
 

Specifiable properties
custom-adapter.dt-skip={ true | false }
Specifies whether to skip conversion of the message structure during data transformation. If you omit this key or its value, structure conversion is not skipped.
  • true
    Skips structure conversion.
  • false
    Does not skip structure conversion.
When specifying a value, you must specify true or false. If you specify a value other than true or false, an error occurs during command execution.