Properties Files play an important role in java applications. Almost every application requires it when it needs to be made configurable through some external control. Sometimes J2EE applications might need to read and write back to the file while participating in some JTA transaction. In those cases it is often required that properties file should revert back to there previous state in case of a failovers. This is practically difficult in file read and write operation performed using simple java IO. In such a case we need better mechanism which can control transaction for any kind of Operations. Until JCA it was difficult and involved proprietary code usage but now we can use JCA.

The Properties File adapter is fully compiant with JCA 1.0 Spec. However as soon as JCA 1.5 containers becomes available the adapter would be upgraded to 1.5 spec as it offers many enhanced features like bidirectional messaging.

The current version of Adapter 1.0 alpha offers following features.

  • Implementation of Common Client Interface.
  • Implementation of Interaction.
  • Implementation of MappedRecord.

The following limitation however exists owing to the 1.0 Compliancy and being an alpha release.

  • Transaction is not supported at this moment. It'll be supported in 1.0 final release.
  • Bidirectional messaging not supported at this moment. (1.5 version will support this)

Installation of Adapter is very simple.

the build directory contains following file(s) / directory

  • propra.rar (Resource Adapter Deployable Archive)
  • ejbPropRA.jar (EJB Client for Resource Adapter)
  • org/** (Directory Containing classes for ejb Test Client)
  • runclient.cmd (batch file for running test client)

The procedure is:

  • Deploy the RAR file in ejb compliant J2EE Server(s). Currently tested is WebLogic 6.x, 7.x. it should work in others as well.
  • The adapter assumes a properties file to be lying in the location c:\ It can be changed but it requires a change in ra.xml file (In weblogic it can be done through web console)
  • If you wish to change the name of the property in the properties file and wish to access that property through ejb then EJB source needs to be modified and rebuilt.
  • Deploy the EJB JAR file as another application.
  • change the settings in runclient.cmd to accomodate your systems' settings.
  • Run the client and see if it works.

The binary/source codes are available from the site.

The following developer(s) is/are involved in developing the module.