Ржевский Дмитрий Rzhevskiy Dmitry

четверг янв 15, 2009

JDO (eng)

In the projects which I paticipated before I used Hibernate, IBatis, or  JDBC directly, but lately I have heard about using Object Oriented Databaseses ( CACH? in particular) for high louded projects. Speed of queryes processing ten times faster than when using in a relation database. But CACH? have shortcoming – using proprietary API – Jalape?o ( com.jalapeno.annotations.*).


The other option – the using of the open standard JDO and OO Database Versant which supports JDO.


JDO is convenient because the an aplication can be started  with RDBMS as well as with OODBMS. One should take into account that full-scale OODBMS is very expansive.

 


Taking into account this data I deside use JDO in new project. I decide use free DataNucleus as realization.



Steps:


Adding dependency :


................


<dependency>


<groupId>org.datanucleus</groupId>


<artifactId>datanucleus-rdbms</artifactId>


<version>1.0.3</version>


</dependency>


<dependency>


<groupId>org.datanucleus</groupId>


<artifactId>datanucleus-java5</artifactId>


<version>1.0.1</version>


</dependency>



..................


maven plugin setup: bytecode enhancement at compilation stage.


...........


<plugin>


<groupId>org.datanucleus</groupId>


<artifactId>maven-datanucleus-plugin</artifactId>


<version>1.0.2</version>


<configuration>


<log4jConfiguration>log4j.properties</log4jConfiguration>


<verbose>true</verbose>


</configuration>


<executions>


<execution>


<phase>compile</phase>


<goals>


<goal>enhance</goal>


</goals>


</execution>


</executions>


</plugin>


</plugins>


</build>


..................




adding metadata filepackage.jdo. Even if JDO annotations used it is nessesary declare classes in package.jdo !


Spring integration






What I like:


It is not nessesary write ID in model classes. Actuallty – thay only obstruct business description of subject domain.




In JDO queries (JDOQL) It is possible to indicate range – Very nessesary for view data with paging.


In is impossible in Hibernate(HQL) – this parameters nessesay setup from java code.






What not like:


In collections which returned return from queries simple method subList is absent !


It is necessary implement and contribute..




I find in internet OOBDMS for jdo which support JDO http://www.orientechnologies.com. I try use this product in production.

Комментарии:

If you define a class with annotations it is NOT necessary to define it in package.jdo

опубликовал Andy Апрель 02, 2009 at 01:33 PM MSD #

When I remove package.jdo I get exception:
org.datanucleus.exceptions.ClassNotPersistableException: The class "xxx.model.Team" is not persistable. This means that it either hasnt been enhanced, or that the enhanced version of the file is not in the CLASSPATH (or is hidden by an unenhanced version), or the Meta-Data/annotations for the class are not found. >>org.datanucleus.jdo.exceptions.ClassNotPersistenceCapableException: The class "The class "xxx.model.Team" is not persistable. This means that it either hasnt been enhanced, or that the enhanced version of the file is not in the CLASSPATH (or is hidden by an unenhanced version), or the Meta-Data/annotations for the class are not found." is not persistable. This means that it either hasnt been enhanced, or that the enhanced version of the file is not in the CLASSPATH (or is hidden by an unenhanced version), or the Meta-Data for the class is not found.

опубликовал Дима Апрель 08, 2009 at 02:55 AM MSD #

I reread maven2 guide http://www.datanucleus.org/products/accessplatform/guides/maven2/index.html and find that my maven plugin configuration missed

 <mappingIncludes>**/*.class</mappingIncludes>

line.
Andy, thank you for advice.

опубликовал Dima Апрель 08, 2009 at 03:20 AM MSD #

Опубликовать комментарий:
  • HTML Syntax: Подключен
Дмитрий Ржевский

Тэги:
cloud eagle experiments hadoop jelastic jelastic.com livejournal paraglider вычисления облако облачные орёл параплан

Calendar



Google Friend Connect.
Возможно через несколько лет не будет отдельных социальных сетей.
Они объединятся в одну открытую и распределённую систему.
Друзья Нравится

Feeds

Search

Links

Navigation


  • Я в ЖЖ    
  • MirTesen.ru
  • Я в "Linked In"

  • Мои друзья
  • Алекслёха
  • Latron

  • Links:
    log4j.ru
    Apache Maven
    моё родовое имение
    Виндсёрфинг


    Моё резюме
    My resume


    XFN Friendly

    Поиск