Ржевский Дмитрий Rzhevskiy Dmitry
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.
Posted at 03:47AM янв 15, 2009 by Дима in Java | Комментарии[3]


опубликовал Andy Апрель 02, 2009 at 01:33 PM MSD #
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 #
<mappingIncludes>**/*.class</mappingIncludes>
line.Andy, thank you for advice.
опубликовал Dima Апрель 08, 2009 at 03:20 AM MSD #