Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Version 7.00.177.00 of Jiwa included some changes that will likely cause plugins to no longer compile, or produce unexpected errors at runtime.

What changed

We removed the JiwaFinancials.Jiwa.JiwaApplication.Manager.Instance singleton property

The Manager class had a property named Instance, which could be used like this:

...

Code Block
languagec#
titleCollectionItem Factory Example
var debtorPrice = Manager.CollectionItemFactory.CreateCollectionItem<JiwaFinancials.Jiwa.JiwaInventory.DebtorSpecificInventorySpecific>();
debtorPrice.Debtor.Search();
Inventory.DebtorPrices.Add(debtorPrice);

 

Why the changes were made

We found that in the development of our REST API, the singleton pattern was inhibiting the ability to have multiple users using the REST API concurrently. In order for us to provide the REST API we had to move away from the singleton pattern.

Jira Legacy
serverJiwa Service
columnskey,summary,type,created,updated,due,assignee,reporter,priority,status,resolution
serverIdf9231aec-a65a-32ae-94f3-7114fec5f253
keyDEV-5680

Migration Steps

Always use a factory to create an instance of a class implementing any of the following interfaces:

  • IJiwaBusinessLogic
  • IJiwaCollection
  • IJiwaCollectionItem
  • IJiwaDialog
  • IJiwaEntity
  • IJiwaForm

Move constructor code to Setup method

Any classes implementing the above interfaces should not have any reference in their constructor to their Manager property - move that to the Setup method and ensure the first line of code in the overridden Setup method is calling the base Setup method.

...