uCosminexus Service Platform, Reception and Adapter Definition Guide
This section describes the development of custom receptions.
Custom receptions are developed in the development environment.
The structure of the custom reception EAR file created in the development environment is as follows:
|- META-INF | |- application.xml ... 1. | |- cosminexus.xml ... 2. | |- MANIFEST.MF ... 3. |- Reception process file ... 4. |
Do not change the structure of the custom reception EAR file. If you want to use certain definition information required to operate reception processes, define the information in a custom reception user file created for that purpose. For details on custom reception user files, see A.2(3)(d) Custom reception user file.
Developers create reception process files by archiving the implementation files of the reception process together with the necessary definition files.
The reception process file is described in detail below.
You can select the WAR or EJB-JAR file format for a reception process file. Select the format that is appropriate for the protocol supported by the reception process.
Use the library JAR files of the APIs provided by the custom reception framework to implement reception processes. When implementing a reception process, the following JAR files must be specified in the classpath:
Service-Platform-installation-directory\CSC\lib\cscmsg.jar Service-Platform-installation-directory\CSC\lib\cscmsg_urecp_custom.jar |
The following processing is implemented in a reception process:
For details on the custom reception framework APIs used during implementation, see A.3 APIs of the custom reception framework.
Set the deployment descriptor for the reception process file.
Set the content as appropriate for the custom reception you are defining.
Create a reception process file as an archive containing the implementation files for the reception process and the necessary definition files.
The creation procedure depends on the format of the reception process file.
Do not give a reception process file a name that starts with csc. If the file name starts with csc, normal operation is not guaranteed.
The following four definition files are set in a custom reception:
Each file is described below.
Set the deployment descriptor for the custom reception EAR file.
To set the deployment descriptor, add the settings for the reception process to the template provided by Service Platform. The template file is located in the following directory:
Service-Platform-installation-directory\CSC\samples\urecp\application.xml
The table below shows which elements and values in the deployment descriptor template file are editable. Note that the DTD of the deployment descriptor is application_1_3.dtd.
Table A-3 Elements in deployment descriptor template file
| Element | Editable |
|---|---|
<?xml version="1.0" encoding="UTF-8"?> |
No |
<!DOCTYPE application PUBLIC "-//Sun Microsystems, Inc.//DTD J2EE Application 1.3//EN" "http://java.sun.com/dtd/application_1_3.dtd"> |
No |
<!-- All Rights Reserved. Copyright (C) 2010, Hitachi, Ltd. --> |
No |
<application> |
No |
<display-name>CSCMsgCustomServiceDelivery</display-name> |
No |
<description></description> |
Yes |
<module> |
Yes |
<web> |
Yes |
<web-uri>web-uri</web-uri> |
Yes |
<context-root>context-root</context-root> |
Yes |
</web> |
Yes |
</module> |
Yes |
<module> |
Yes |
<ejb>ejb</ejb> |
Yes |
</module> |
Yes |
<module> |
Yes |
<java>java</java> |
Yes |
</module> |
Yes |
</application> |
No |
Set the application property file for the custom reception EAR file.
To set the application property file, add the settings for the reception process to the template file provided by Service Platform. The template file is located in the following directory:
Service-Platform-installation-directory\CSC\samples\urecp\cosminexus.xml
The table below shows which elements and values in the template of the application property file are editable. Note that the DTD of the application property file is cosminexus_8_0.dtd.
Table A-4 Elements in the application property template file
| Element | Editable |
|---|---|
<?xml version="1.0" encoding="UTF-8"?> |
No |
<!DOCTYPE cosminexus-app PUBLIC "-//Hitachi, Ltd.//DTD Cosminexus 8.0//EN" "file:///C:/Program%20Files/Hitachi/Cosminexus/CC/admin/dtds/cosminexus_8_0.dtd"> |
No |
<!-- All Rights Reserved. Copyright (C) 2010, Hitachi, Ltd. --> |
No |
<cosminexus-app> |
No |
<start-order>180</start-order> |
No |
<ejb-jar> |
No |
<module-name>cscmsg_urecp_custom.jar</module-name> |
No |
<session> |
No |
<ejb-name>CSCMsgCustomFwInitializerEJB</ejb-name> |
No |
<maximum-sessions>0</maximum-sessions> |
No |
<stateless> |
No |
<pooled-instance> |
No |
<minimum>1</minimum> |
No |
<maximum>1</maximum> |
No |
</pooled-instance> |
No |
</stateless> |
No |
<start-order>10</start-order> |
No |
</session> |
No |
<session> |
No |
<ejb-name>CSCMsgCustomOperationCallerEJB</ejb-name> |
No |
<maximum-sessions>0</maximum-sessions> |
No |
<stateless> |
No |
<pooled-instance> |
No |
<minimum>0</minimum> |
No |
<maximum>0</maximum> |
No |
</pooled-instance> |
No |
</stateless> |
No |
<start-order>20</start-order> |
No |
<ejb-transaction-timeout> |
No |
<method> |
No |
<method-name>*</method-name> |
No |
</method> |
No |
<transaction-timeout>0</transaction-timeout> |
No |
</ejb-transaction-timeout> |
No |
</session> |
No |
</ejb-jar> |
No |
</cosminexus-app> |
No |
You can create a manifest file (MANIFEST.MF) for the custom reception EAR file.
Note that creating a manifest file is optional.
Create a custom reception user file in situations where, for example, you want to store the settings for a reception process in an external file. The reception process can use a custom reception framework API to read the custom reception user file. For details on the API used to read the custom reception user file, see A.3 APIs of the custom reception framework.
Register the custom reception user file as a self-defined file when defining the custom reception in the development environment. For details on defining custom receptions, see A.4 Custom reception definition.
Use commands such as ant and jar to create a custom reception EAR file that archives the reception process file and associated definition files.
All Rights Reserved. Copyright (C) 2015, Hitachi, Ltd.