[ 
http://mifosforge.jira.com/browse/MIFOS-2696?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=60690#action_60690
 ] 

Adam Monsen commented on MIFOS-2696:
------------------------------------

This came up recently on the mifos-developer mailing list: 
http://thread.gmane.org/gmane.comp.finance.mifos.devel/9906/focus=9909

> Migrate from Hibernate XML configuratation to JPA/Entity Annotations based 
> configuration
> ----------------------------------------------------------------------------------------
>
>                 Key: MIFOS-2696
>                 URL: http://mifosforge.jira.com/browse/MIFOS-2696
>             Project: mifos
>          Issue Type: Improvement
>          Components: Configuration
>    Affects Versions: Unscheduled
>            Reporter: Udai Gupta
>            Assignee: mifosdeveloperqueue
>             Fix For: Gazelle Backlog
>
>         Attachments: hbm2jpaPOJOfromMIFOShbm.zip, HBMxml2AnnotationsHint.patch
>
>
> Hibernate, like all other object/relational mapping tools, requires metadata 
> that governs the transformation of data from one representation to the other. 
> In Hibernate 2.x mapping metadata is most of the time declared in XML text 
> files. Alternatively XDoclet can be used utilizing Javadoc source code 
> annotations together with a compile time preprocessor.
> The same kind of annotation support is now available in the standard JDK, 
> although more powerful and with better tools support. IntelliJ IDEA and 
> Eclipse for example, support auto-completion and syntax highlighting of JDK 
> 5.0 annotations which are compiled into the bytecode and read at runtime 
> using reflection. No external XML files are needed.
> The EJB3 specification recognizes the interest and the success of the 
> transparent object/relational mapping paradigm. It standardizes the basic 
> APIs and the metadata needed for any object/relational persistence mechanism. 
> Hibernate EntityManager implements the programming interfaces and lifecycle 
> rules as defined by the EJB3 persistence specification and together with 
> Hibernate Annotations offers a complete (and standalone) EJB3 persistence 
> solution on top of the mature Hibernate core.
> http://docs.jboss.org/hibernate/stable/annotations/reference/en/html_single
> There is patch attached with this issue showing how this can be achieved with 
> least modification.
> There is zip file attached with this issue which contain pojo generated by 
> hibernate tool (with EJB3 and JDK5)
> https://www.hibernate.org/hib_docs/tools/reference/en/html_single/#d0e1193
> We can not use this generated code because
>  - These POJO might be incomplete, for example query (named queries) are not 
> add due to http://opensource.atlassian.com/projects/hibernate/browse/HBX-465, 
> but adding named queries are quite simple using annotations
>  - The Classes in Mifos might not be clean POJO (which is bad but for now we 
> have to live with that)
>  - We have to be very careful while applying the annotations and removing 
> respective xml config file so that meta-data for hibernate remains same.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://mifosforge.jira.com/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

------------------------------------------------------------------------------
Beautiful is writing same markup. Internet Explorer 9 supports
standards for HTML5, CSS3, SVG 1.1,  ECMAScript5, and DOM L2 & L3.
Spend less time writing and  rewriting code and more time creating great
experiences on the web. Be a part of the beta today.
http://p.sf.net/sfu/beautyoftheweb
_______________________________________________
Mifos-issues mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mifos-issues

Reply via email to