[ https://issues.apache.org/jira/browse/PIVOT-885?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13586957#comment-13586957 ]
Karel Hübl commented on PIVOT-885: ---------------------------------- I think that Spring or any DI framework can be easily integrated by extending BXMLSerializer and overriding the newTypedObject method. May be the BXML annotation could be handled more generic in BXMLSerializer class - not only to bind objects from namespace to deserialized class fields, but to synchronize fields and namespace. In my proposed implementation there is injection listener, which ensures each injected field is added to the namespace, but I thing it is not common for DI frameworks to publish "field injected events". Why not to add all not null @BXML anotated fields to namespace by BXMLSerializer after newTypedObject is called... K. > Add support for dependecy injection and RMI > ------------------------------------------- > > Key: PIVOT-885 > URL: https://issues.apache.org/jira/browse/PIVOT-885 > Project: Pivot > Issue Type: New Feature > Reporter: Karel Hübl > Assignee: Sandro Martini > Fix For: 2.1 > > Attachments: extensions-sample.zip, pivot-extensions.zip > > > As pivot application devoloper, I would like to have support for dependency > injection in Pivot. My requirements are: > - support for field injection (at least) > - support for @PostConstruct methods > - support for @RuntimeScoped classes - only one instance may be constructed > during Runtime. Usefull when one needs share injected instances. > - in relevant cases, inject dependencies also into namespace. > I implemented prototype of this functionality, source codes including unit > tests and sample application are included. The dependency injection is > implemented in proposed org.apache.pivot.beans.injection package. > Please consider adding this functionality in future Pivot release. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira