www.ironjacamar.orgCommunity Documentation

Chapter 8. Code generator

Table of Contents

8.1. Introduction
8.2. Functionality
8.3. Running the tool
8.3.1. Developer Input
8.4. Generated code
8.4.1. Apache Ant build environment
8.4.2. Apache Ant + Ivy build environment
8.4.3. Gradle build environment
8.4.4. Apache Maven build environment

The IronJacamar project includes a resource adapter code generator which can generate a complete code skeleton that will help developers get started with their development tasks.

The code generator will generate a resource adapter code skeleton based on the user input. The code generator supports

The code generator can be run on the command line by

./codegenerator.sh
      

from the doc/codegenerator directory.

The code generator supports the following arguments


The developer must then answer various questions regarding the properties of the resource adapter.

This section describes the questions that are asked in order to generate the code.

Table 8.2. Developer input

QuestionSpecDesciptionType
Profile version (1.7/1.6/1.5/1.0) All Defines which Java EE Connector Architecture specification that the resource adapter should target  
Type (O/Outbound/I/Inbound/B/Bidirectional) JCA 1.5+ Defines if the resource adapter should contain outbound communication., inbound communication or both  
Package name All The package name of the resource adapter  
Transaction support (N/NoTransaction/L/LocalTransaction/X/XATransaction) All The transaction support level  
Reauthentication (Y/Yes/N/No) All If the resource adapter supports reauthentication  
Use annotations (Y/Yes/N/No) JCA 1.6+ Should annotations be used for specifying the structure. If 'No' is selected a META-INF/ra.xml is generated  
Include a ResourceAdapter (Y/Yes/N/No) JCA 1.5+ Should an instance of a resource adapter class be included in the archive Outbound
Resource adapter class name JCA 1.5+ The class name of the resource adapter Outbound or Bidirectional
Should the resource adapter class be Serializable (Y/Yes/N/No) JCA 1.5+ Should the resource adapter class be serializable Outbound
Managed connection factory class name All The class name of the managed connection factory Outbound or Bidirectional
Managed connection class name All The class name of the managed connection Outbound or Bidirectional
Connection interface class name All The class name of the connection interface Outbound or Bidirectional
Connection implementation class name All The class name of the connection implementation Outbound or Bidirectional
Connection factory interface class name All The class name of the connection factory interface Outbound or Bidirectional
Connection factory implementation class name All The class name of the connection factory implementation Outbound or Bidirectional
Resource adapter config properties All Include a configuration properties in the resource adapter instance Outbound or Bidirectional
Managed connection factory config properties All Include a configuration properties in the managed connection factory instance Outbound or Bidirectional
Use ResourceAdapterAssociation (Y/Yes/N/No) All Associate the managed connection factory instance with the resource adapter instance Outbound or Bidirectional
Use CCI (Y/Yes/N/No) All Use the Common Client Interface for the connection / connection factory in the 'Outbound' part of the resource adapter Outbound or Bidirectional
MessageListener interface name JCA 1.5+ The name of the message listener interface for the activation Inbound or Bidirectional
ActivationSpec class name JCA 1.5+ The class name of the activation specification instance Inbound or Bidirectional
ActivationSpec config properties JCA 1.5+ Include configuration properties in the activation specification instance Inbound or Bidirectional
Activation class name JCA 1.5+ The class name of the activation instance Inbound or Bidirectional
Add methods to connection interface (Y/Yes/N/No) [N]: All Use for add methods to connection interface Outbound or Bidirectional
Include an admin object (Y/Yes/N/No) JCA 1.5+ Should an admin object be added to the project  
Use ResourceAdapterAssociation on admin object(Y/Yes/N/No) JCA 1.5 Associate the admin object instance with the resource adapter instance  
Admin object interface name JCA 1.5+ The interface name of the admin object  
Admin object class name JCA 1.5+ The class name of the admin object  
Admin object config properties JCA 1.5 Include a configuration properties in the admin object instance  
Generate a MBean class (Y/Yes/N/No) All Generate a MBean for the resource adapter  
Integrate EIS test server (Y/Yes/N/No) All Should the IronJacamar test EIS server be integrated  
Use JBoss Logging (Y/Yes/N/No) [N]: All Use JBoss Logging instead of Java Util Logging  
Build environment [A/Ant/I/Ant+Ivy/M/Maven/G/Gradle] All Type of build environment  

The generated code will consist of the classes making up the resource adapter and a test suite environment based on the embedded distribution.