OSGI HengSin/Issues

From ADempiere
Revision as of 19:32, 1 January 2011 by Red1 (Talk) (missing rule element handler solved)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
This Wiki is read-only for reference purposes to avoid broken links.
Any window table has export function..
..that exports to 2Pack besides Excel formats! Please see OSGI HengSin/File2PackZip

The Challenge

  • This Project is migrating ADempiere to the OSGI framework.
  • It will be tougher for everyone else (later, including me) if i do not take the meticulous time writing it all down, in excruciating detail.
  • This can be the available historical record of a project in the making as it happens.
  • If you have any question go ahead and ask in the discussion tab. I will be glad to answer intelligently (to intelligible questions).
  • You can also try asking HengSin himself.
  • In all, hope you enjoy reading and following or joining the project as i have. - Redhuan D. Oon

What Is Going On?

Here i record any revision changes of the OSGI HengSin project and issues i discovered which i promptly debug and try to find workarounds, reporting back to the Kenai project for HengSin final consideration. My tasks are:

  1. Update every revision done in Kenai project into local workspace
  2. Conduct standard launch of server and client products for OSGI Hengsin/Beta testing.
  3. Test Java POS creating some sales.
  4. Test related Invoice accounts posting and display of AccountViewer.
  5. Test customised Window Tables and print preview.
  6. Continue testing the builds deployment if not issue at this juncture.
  7. Document every damn twig i find so the human race may progress.

Issue Tracking

Occasionally some issue happens either due to bug or compatibility with my 360LTS (also constantly udpated from latest SVN trunk). Here i will document what i do to resolve them. Or just the roads i traveled to even comprehend the destination. This is also important as my MacBook may be the only living link between our SVN Trunk and this Kenai project.

  1. I debug from my Eclipse and put breaks at the suspected sourcecode line of issue.
  2. I research what the code is trying to do and why the issue occur.
  3. I attempt a workaround*.
  4. When the workaround works (if i ever find a workaround), then i prepare an Issue posting to the Kenai project.
  5. I then wait for HengSin's approval or remedy.
  6. I study his remedy and then set to document it here. I think i only have time to record my own learning curve. You go and make your own Discovery Channel.

ISSUES

Using Extensions

  • Missing PostgreSQL Selection is my maiden issue posting and i am not that proud that its accepted in full by HengSin. It is because i followed his prepared solution for the Oracle connection and merely copied over to the PostgreSQL one.
  • The use of OSGI framework of registered extensions is classic here.
  • For example, in order to have more DB connections, we need not do it in tightly coupled code, but loosely done by putting them as Extensions.
  • This follows the OSGI principle of Tightly Cohesive, Loosely Coupled. If it is hard to imagine, think about your kids' behaviour playing cyber games.
  • More graphics here.

Bundles Refactoring

  • Protected Class Issue arises when we separate into separate bundle projects that are decoupled from each other.
  • Here in the UI Swing bundle, it no longer see the usual protected class/methods even though it imports from the core.report package where those class/methods reside.
  • I workaround by moving those class/methods into the UI Swing bundle.
  • However HengSin's approach is merely to unprotect those class/methods in the core.report package of the Base bundle. (See Revision 6584).
  • There is a suggested fragment solution as described here in Nirmal's Blog

Event Manager

  • Event Manager Issue reveals the use of Declared Services (DS) approach to wrap events such as in the case of ModelValidator.
  • Here are the code changes in Revision 6596.
  • The issue is because this misses a new bundle - org.eclipse.equinox.event which HengSin updated in the target.platform source. So to bring into my instance via org.adempiere.sdk-feature, opening the adempiere.cquery to Resolve and Materialize. However that did not work but using the Resolve to Wizard works.

2Pack Refactoring

  • As promised by HengSin, this is a major refactoring effort, and surely it is a goldmine of discovery.

Extensions IDs Matching

  • Here the first one i came across is of the same kind as OSGI HengSin/Using Extensions.
  • This bug issue reveals the extensive use of such Extensions to loosely couple the call of sub-ElementHandlers.
  • Thus an implementer can access the HangleRegistry for such Handlers as registered by the org.adempiere.pipo.handler Extensions.
  • The extensions and their IDs can also be read up in the pipoHandler's plugin.xml.
  • The issue is caused by some of the IDs as not matching those in the ElementHandlers' classes.
  • A patch here shows the matching IDs.
  • The 2Pack PackOut.xml is now much better than before. Packout

Sub-Tags UnResolved

Missing Rule Element Handler

Sub Topic Listing

Footnotes

*Workaround - is a remedy i attempted but to avoid looking silly, i humbly classify all my attempts as 'workarounds', meaning that they could not possibly be the right exact solution. Usually they are not. But at least i told the creator where to look. :)