Custom Java Objects
   
 
 
|Using Custom Dataports
     
3
 
Using Custom Dataports
 
If you are creating your own custom dataport you need to take care of the following two steps:
Create a jar file of classes required for your dataport.
Upload it to the lib directory through the zDE File Manager.
 
All the jar files related to the standard dataports provided by the zeroCode Design Environment are stored in the stdlib directory. The stdlib directory also contains an XML file called standardDataPorts.xml which contains all the details of the standard dataports supported by zeroCode. This file also needs to be updated in the process of creation of any custom dataport. In this file you need to append the information related to the dataport you have built, such as:
What parameters your dataport is using
What interface the dataport implements
What class the dataport refers to
The attributes your dataport uses  etc.
After you have updated the dataport descriptor, you may upload the jar file to the lib directory. You need not necessarily reconfigure resin in order to make effective use of this dataport through the zDE. Even if an entry has not been made in the resin.conf (the configuration file for Resin), the newly uploaded file is read from the lib directory.
After uploading the new custom dataport to the lib directory, you may need to make changes to this jar file. In such cases, the changes made to your custom dataport will become effective only in the following two cases:
By making an entry in the resin.conf, the changes made to the jar file for your custom dataport take effect instantly. For this, you will need to add a classpath entry for concerned jar file in “resin.conf”.
The site concerned has to be restarted: On start of site, the modified jar file for the custom dataport can be read, by default, from the lib directory.
Having satisfied either of these conditions, you can start using the custom dataport that you modified.
 
     
3