Jaffa Logo
Home Contact Us FAQs Site Map
Source Forge: Homepage Bugs @ Sourceforge Mailing Lists @ Sourceforge Task Manager @ Sourceforge CVS @ Sourceforge
Jaffa Site
Jaffa Runtime
Jaffa RAD
Jaffa Release Notes v2.1.0

This document describes the changes that have been made in the current development version of Jaffa, relative to the Jaffa 2.0.0 release.

For details about a previous release click here

What's New in Version 2.1.0

  1. Enhanced the Persistence engine to use the member variables of the domain objects in addition to the getters/setters.
    1. Added an optional attribute 'use-member' to the mapping files for domain classes. If this is specified, then the Persistence Engine will use the member variable for accessing/setting the data on the domain object. If not specified, then it'll continue to use the getters/setters.
    2. The member-variables, getters, setters can be private
  2. Enhanced the Persistence Engine to support Interfaces in addition to concrete classes. This involved the utilization of the Dynamic Proxy API to create a dynamic proxy for an Interface. The following changes were implemented:
    1. Created an IPersistent interface
    2. The Persistent class now implements the new IPersistent interface
    3. Refactored the various Persistence Engine classes to deal with the IPersistent interface instead of the Persistent class
    4. Added 2 new methods to the UOW
      1. newPersistentInstance(): This returns a regular instance for a 'Class' input or a dynamic proxy for an 'Interface' input
      2. getActualPersistentClass(): This returns the actual class that was used for creating a proxy
    5. Created the PersistentInstanceFactory for generating the dynamic proxy for an Interface
    6. It is recommended to use the newPersistentInstance() method of the UOW for instantiating a domain object
    7. However you do not need to change existing code, if you plan to continue using concrete classes, instead of Interfaces.
    8. The UnitTests were enhanced to use the new feature. Check the Part domain class. This is now an Interface.
  3. The domain_creator_1_1 pattern. It has the following features:
    1. The mapping files will now specify the optional 'use-member' attribute for each field so that the Persistence Engine uses the member variables for accessing/setting data on the domain object
    2. The setXyz() method on the domain class will be similar to the older version of the updateXyz() method.
    3. The updateXyz() method is now available for backwards compatibility only. It'll merely invoke the setXyz() method.
    4. Maintains a list of modified fields and their initial values
    5. Has helper methods for existence checks, findByPK
    6. Has getters for ForeignObjects. These will be lazily instantiated
    7. Has validators for the ForeignObjects. This will be invoked by the preAdd() and preUpdate() methods
    8. Has getters for related objects
    9. Has helper methods to create instances of related objects with the initialized related fields
    10. Has an implementation for the preAdd() method
      1. It ensures the uniqueness of the primary key
      2. Validates all foreign keys
    11. Has an implementation for the preUpdate() method
      1. Validates all the modified foreign keys
    12. Has an implementation for the preDelete() method
      1. Throws an exception if objects in association/aggregation relationship exist
      2. Performs cascading deletes for objects in composition relationship
    13. It will ignore a relationship if any of its fields have the 'ignore' flag set to true
    14. Uses the domain-creator-meta_1_1.dtd, which has the new optional attribute 'Name' for a relationship
  4. Added new variant options in persistent layer queries for MSSqlServer so it can do select for updates (Merged from v1.3.1)
  5. Added the ability to obtain messages from a ResourceBundle in the business-tier. The following changes were made:
    1. Enhanced the PropertyMessageResourcesFactory to create only one PropertyMessageResources instance per config. This will allow the presentation-tier and the business-tier to share the cache used by that PropertyMessageResources instance, when running in the same JVM
    2. Added the 'framework.messageResources.bundle' property to the framework.properties file. The value for this property should ideally be the same as the value specified in struts-config.xml to point to the same ResourceBundle
    3. Removed the 'framework.ApplicationResourcesLocation' parameter from web.xml. It has been replaced by the value for the 'framework.messageResources.bundle' property in framework.properties file.
    4. Added helper methods in MessageHelper, which will return the messages from the default Resource Bundle, as specified in the framework.properties file.
    5. CustomException
      1. Moved from the utils package to the exceptions package
      2. Provided getter for the arguments
      3. Overrides the getLocalizedMessage() which returns the message from the default ResourceBundle using the errorCode
    6. Refactored FrameworkException, ApplicationException, CustomRuntimeException
    7. ApplicationExceptions: Provided the 'public ApplicationException[] getApplicationExceptionArray()' method
    8. Moved the error messages from ErrorConstants to the ApplicationResources.pfragment file
    9. Removed the redundant ErrorConstants.java and ErrorConstants.properties files
    10. Removed the redundant org.jaffa.exceptions.MandatoryFieldException and references to it in the object-viewer pattern
    11. Fixed the Exception classes which extend CustomRuntimeException, ApplicationException, ValidationException, FrameworkException, MiddlewareException, UOWException
    12. Fixed Patterns
      1. object_viewer_2_0: Removed the references to the old MandatoryException from the Component Controller
      2. object_maintenance_2_0 : Fixed the references to the VoucherGeneratorException in the Tx and the references to ValidationException in FormBean
      3. domain_creator_1_1 : Fixed the exception references
  6. Added onValidate attribute for EditBox widget. It allows custom code snippets to be added into an editboxes leave field validation.
    1. The only constraint is that the object is referred to as 'field' and if you wish to return a false back you set isError to false.
  7. Added some Domain Object generation tools
    1. JDBCSchemaReader can reverse engineer a database schema (via JDBC) and generate Domain Object XML definitions
    2. ErWinSchemaReader can read an ER-Win model (saved in the XML format) and generate Domain Object XML definitions
  8. Added SyncSchema (it was in v2.0.0 but never mentioned in the release notes!). This is a developer tool and allows you to point to two database schemas and list all the table and field level changes between them. The goal is to eventually have this generate 'change scripts' to migrate the schema from the source definition to the target one.
  9. Created ApplicationExceptionWithContext to add a context to an ApplicationException. This is useful when dealing with a collection of data-sets and helps to pinpoint the context under which the error occurs.
  10. Added a convenience method to ApplicationExceptions to add context to its collection of ApplicationException instances
  11. Added a raiseError method to FormBase to accept an argument array
  12. Added postAdd, postUpdate and postDelete triggers to the IPersistent interface
  13. Added new bean moulding framework in org.jaffa.beans. Allows simple mapping between DataAccessObjects and DomainObjects for passing Domain Object Graphs between the business and presentation/web service tier
  14. Added new bean moulding framework in org.jaffa.beans. Allows sipmle mapping between DataAccessObjects and DomainObjects for passing Domain Object Graphs between the business and presentation/web service tier
  15. The data-security-policy_1_1 which supercedes the script_generator_1_0.Following are the changes to ver 1.1
    1. You can now specify a list of Roles in the Xml definition (Roles Element added)
    2. SqlPrefix element added to the dtd.
What's Changed

  1. Modified AppBuilder so when building v2.0 Viewers, it doesn't include associated related objects
  2. Updated AppBuilder to use new ListProperties, so labels are sorted prior to storing
  3. Updated v2.0 Viewer pattern JSP to add folding section tags around related objects (like the maintenance pattern)
  4. The object-maintenance_2_0 pattern no longer stamps the Comments or concatenates it with the previous value. It is recommended that this functionality be added manually at the domain object level by invoking the StringHelper.addCommentWithStamp() method. The domain-creator pattern will be enhanced at a later date to automatically generate the required code.
  5. Refactored CriteriaField and its various implementations. The main motivation for this change was to have the getValues() method return actual datatypes (String[], Boolean[],..) instead of Object[]. This is of great use to web service clients, enabling them to pass the correct datatype.
    1. Renamed 'Object[] getValues()' to 'Object[] returnValuesAsObjectArray()'
    2. Removed getFieldName(), since it was added for the CodeHelper component.
    3. Added 'String[] getValues()' to StringCriteriaField, 'Boolean[] getValues()' to BooleanCriteriaField and so on
  6. The CodeHelper component was modified, adding a CriteriaElementDto which encapsulates a fieldname and a criteria
    1. Consequently the ComponentController templates had to be refactored in object_finder, object_lookup and object_maintenance patterns.
  7. The domain_creator_1_1 pattern no longer uses the findByPK method to obtain Foreign and RelatedOne objects. This way the relationships need not be restricted to primary keys
  8. The logic related to one-to-one relationships in the domain_creator_1_1 pattern was further enhanced to take the cardinality into account and perform validations for a mandatory related object in adds/updates and cascade/restrict deletes for an optional related object
  9. Modified the LocaleContext to return the default context for the JVM, if no value was assigned
  10. Modified the MessageHelper to get the locale from the LocaleContext, if no locale is passed
  11. Modified the Pre(Add/Update/Delete)FailedException classes to extend the (Add/Update/Delete)FailedException classes respectively
  12. Changed the widget models so the 'isModelChanged()' is not set to true, if the model is updated with its current value.


  1. Added 'decimalOptional.format' to locale.properties.. This will be useful for suppressing the decimal portion of a number, if its zero
  2. Created the SkeletonLayout.jsp and modified the skeleton_component_2_0 pattern to use the new layout, instead of a custom layout
  3. Tools / Website / GenerateTOC.java -> Added command line parameters and changed page title to SiteMap so it can be integrated in to the build process of the Jaffa WebSite
  4. Added new variant options in persistent layer queries for MSSqlServer so it can do select for updates (Merged from v1.3.1)
  5. Modified the persistence engine to invoke the setQueryTimeout(5 seconds) on a Statement/PreparedStatement object when locking a record. Note: This setting works in MS-Sql-Server only
  6. The DomParser was enhanced to interpret the cardinality of the relationships and interpret if its optional or otherwise
  7. Enhanced the newExtendedURL() method of the URLHelper to support inputs without any protocol
  8. Enhanced the SourceDecomposerUtils.listCustomizations() method. It now supports a customizationFilter to filter the customization blocks
  9. It has been decided to move some of the logic from the PersistentTransaction to the preAdd/preUpdate triggers of the Persistent base class
    1. It has been decided to move some of the logic from the PersistentTransaction to the preAdd/preUpdate triggers of the Persistent base class
    2. This will give greater control over code execution, since a domain class can override or put custom code before/after the trigger code of the base class
    3. The PersistentHelper class was created to provide many convenience methods to checkMandatoryFields, duplicate-key checks, generate serialized keys, load from serialized keys
    4. Added a convenience method convertDataType() to the BeanHelper
    5. domain_creator_1_1 enhancements
      1. Made the performForeignKeyValidations() method public
      2. Created a new performPreDeleteReferentialIntegrity() method
      3. Removed the preAdd, preUpdate and preDelete methods from the domain-class, since the base class is expected to provide the appropriate functionality
      4. Added getKeyFields and getMandatoryFields methods in the meta class
    6. Provided default code for the preAdd/preUpdate trigger in the Persistent base class
      1. Will invoke the PersistentHelper.exists() to check against duplicate keys.
      2. Will invoke the performForeignKeyValidations() method to ensure no invalid foreign-keys are set.
      3. Will invoke PersistentHelper.checkMandatoryFields() to perform mandatory field checks.
      4. Will invoke the Rules Engine to perform mandatory field checks. Provide the preDelete code in the base Persistent class. This will invoke the performPreDeleteReferentialIntegrity() method
    7. Provided default code for the preDelete trigger in the base Persistent class. This will invoke the performPreDeleteReferentialIntegrity() method
    8. Removed the preAdd/preUpdate code from the PersistentTransaction class, since we have added similar code in Persistent class
    9. Fixed the PersistentDelegate, used by the proxy handler, appropriately, by overriding the preAdd and preUpdate methods of the base class
  10. The maintenance patern has been enhanced to support RadioButtons
    1. Note: Only static values can be specified.

Bug Fixes

  1. Corrected the handling of logical layouts in the Parser and Formatter classes
  2. Fixed the CheckBoxModel constructor to handle a null input correctly
  3. #891668. PolicyCache now clears the roleindex , component-role index and function-role index
  4. #850440. Pressing enter to submit a form will now force all leavefield validation to be executed.
  5. #899251. Usergrid supports tokens in default file. Will still work with literal string however and even allows default files with literal string to be compared against tokenized columns as long as the columns token value matches the literal string.
  6. Fixed the StatementHelper correcting the code that handles null objects during query generation
  7. Fixed the QueryInterceptor to remove a Criteria from its internal collection, even when the query fails. This allows us to perform further queries on the same UOW, even after any query failures.
  8. Corrected the ComponentForm template of the object_maintenance_2_0 pattern to correctly instantiate DateTimeModel objects
  9. Fixed bug in AppBuilder for v2.0 Maintenance Objects where there are multiple foreign objects wanting to use the same fields
  10. Fixed the findMessage and replaceTokens methods in MessageHelper to check for null arguments
  11. Fixed the faulty candidate key logic in the UnifaceSchemaReader, which treated them as mandatory fields
  12. Fixed the RulesEngine to support validations of any class and not just Persistent classes
  13. Corrected the DateOnlyFieldValidator and DateTimeFieldValidator of the RulesEngine to handle java.util.Date values appropriately

What's Deleted/Deprecated

  1. Removed the unnecessary 'useFileIo' variants of the getUrl() and getInputStream() methods in URLHelper
  2. The addCommentWithStamp() method has been deprecated in the MaintTx class. A similar function is now provided by the StringHelper.
  3. Removed the unnecessary variant-property 'lockConstructPreStatement' from the Persistence Engine
  4. Enhanced the newExtendedURL() method of the URLHelper to support inputs without any protocol
  5. script_generator_1_0 under java\patterns\library has been deprecated. It is been replaced by data_security_policy_1_1

File: release_notes_2_1_0.html, Last Modified: Thu Jul 15 2004 at 11:12:36am. This site has been built using PPWIZARD