-
Notifications
You must be signed in to change notification settings - Fork 0
Eclipse
Eclipse is an Integrated development environment (IDE) often used to develop Java applications.
It is mentioned here as a representation of an arbitrary IDE used for the development of programmable Xyna Factory plugins such as Coded Services, Trigger or Filter.
There are two different ways Xyna Factory interacts with Eclipse development:
- Updating and Deployment manually and using Ant
- Updating and Deployment using SVN and SVN Access
Plugin development is typically started from a Java Template provided by the Xyna Factory containing empty classes and methods to be implemented. Used interfaces and classes are contained in JAR files. Deployment of the plugin implies building a JAR file containing the implementation classes, transferring it to the server and notifying the server of it. Some changes occurring in the Xyna Factory make it necessary to update the used JAR files in Eclipse: Coded Service signature changes, changes of used XMOM Objects, etc.
The following JAR files might be used by plugin templates:
- Xyna base classpath
- xynafactory.jar
- Libraries used by Xyna: log4j2, etc.
- Generated code
- mdm.jar: Contains classes of all the modeled Data Types and Exception Types.
- servicedefinition.jar: Contains interfaces/adapter classes for the implementation of Services (Service Group, Instance Service)
The following structure is recommended:
/projectroot /projectroot/server.properties (used by Ant) /projectroot/common/lib /projectroot/servicegroups/<servicegroupname> /projectroot/servicegroups/<servicegroupname>/src /projectroot/servicegroups/<servicegroupname>/lib /projectroot/servicegroups/<servicegroupname>/build.xml (if using Ant) /projectroot/servicegroups/<servicegroupname>/xmldefinition/<servicegroupname>.xml /projectroot/filter/<filtername> ... (see above) /projectroot/trigger/<triggername> ... (see above)
Always use build.xml, not buildService.xml to execute Ant targets.
Templates can be obtained through the CLI and partially (only Coded Services and Instance Services) in the Xyna Process Modeller.
If using SVN Access they can just be checked out from SVN.
CLI commands are: ./xynafactory.sh buildserviceproject/buildfilterproject/buildtriggerproject
The downloaded ZIP file contains two Eclipse projects:
- CommonLibs (
common/
) is the project shared between all Java projects for commonly used libraries. It must only be imported once. - Project (
mdmimpl/<ServiceName>/
) is the Java project to implement.
Calling ant deploy
builds and then deploys the JAR file on the server.
Committing changes to SVN notifies the Xyna Factory to check out the changes, triggering the server-side build and deployment process.
Copy the new JAR files to the server in the saved folder of the revision folder corresponding to the workspace you are developing in, e.g. $XYNA_HOME/revisions/rev_<id>/saved/services/<servicegroupname>
or $XYNA_HOME/revisions/rev_<id>/saved/filter/<filtername>
.
CLI commands are:
./xynafactory.sh deploydatatype
./xynafactory.sh addtrigger
./xynafactory.sh addfilter
New libraries can be deployed by using the Xyna Process Modeller by opening a certain Service Group and clicking upload libraries.
Calling ant updateMDMandXynaFactoryJar
updates mdm.jar and xynafactory.jar. This is typically necessary when changes occured in used Data Types.
Calling ant updateServiceDefinition
updates servicedefinition.jar. This is typically necessary when changes occured in the signatures of the Services contained in the Service Group or Data Type.
Changes are committed by the server, which then only have to be checked out by the Eclipse user. Afterwards, the Eclipse project has to be refreshed.
Related CLI commands are:
./xynafactory.sh buildmdmjar
./xynafactory.sh buildservicedefinitionjar
The following options are available in order to use additional libraries:
- Add the libraries to the global classpath (
$XYNA_HOME/server/lib
) and restart the server - Add the libraries to a Shared Library
- Add the libraries to the plugin
When the JAR files have been added to the Shared Library, change the used Shared Libraries here.
See Uploading Libraries.