Hibernate Annotations is my preferred way to map my entity classes, since they don't require any external file (thus keeping mapping info in your Java files), is fully integrated with all Hibernate mapping capabilities and Hibernate documentation encourages us to use this kind of configuration because it's more efficient.
Annotation driven mapping in Hibernate uses the standard JPA API annotations and introduce some specific extensions to deal with some Hibernate features. You can find a full reference in the official documentation.
Sie wollen die Programmiersprache Java lernen? Dann sind Sie hier genau richtig! Im Java Blog Buch werden nach und nach mehr oder weniger aufeinander aufbauende Lektionen veröffentlicht, so dass am Ende eine Art Buch zur Java Programmierung entsteht. Navigieren Sie sich einfach durch das Kapitelverzeichnis auf der linken Seite oder durchstöbern Sie das Inhaltsverzeichnis!
Gerne dürfen Sie auch interessante Themen vorschlagen, über welche wir dann ggf. bloggen werden.
Aber jetzt wünsche ich Ihnen viel Spaß beim Java lernen!
Ps.: Sollten Sie sich dazu berufen fühlen, einen Beitrag zu diesem Werk zu leisten oder gleich als Autor einzusteigen, so nehmen Sie doch einfach Kontakt zu uns auf.
Hibernate saveOrUpdate trap for web developers and StaleStateException
Summary: Hibernate users should be aware of saveOrUpdate method if they continue to use the same persistent object even if a transaction failed at some point.
Details:
Suppose you have a persistent object bound to your web(like JSF) views. Entered some data (which will lead to a db ConstraintViolationException) and tried to save it (at your DAO service) by using saveOrUpdate method. As we expected, it will throw a ConstraintViolationException and you'll rollback the transaction.
Then, go back to the entry page, correct the wrong field value at the same object, and try to save it again. You'll get a StaleStateException since saveOrUpdate method assigned identifier values automatically to your new object when you attempt to save it first. Later, when the save operation failed, it didn't roll back your object's state to its initial state. The summary of the flow causing this error is as below;
Relational databases define a strict structure and provide a rigid way to maintain data for a software application. Apache's open source CouchDB offers a new method of storing data, in what is referred to as a schema-free document-oriented database model. Instead of the highly structured data storage of a relational model, CouchDB stores data in a semi-structured fashion, using a JavaScript-based view model for generating structured aggregation and report results from these semi-structured documents. CouchDB has been developed from the ground up with Web applications as the primary focus and has its sights on becoming the de-facto database for Web application development.
Looking at recent articles and various BPM solutions, it would be easy to assume that BPEL is now the defacto standard to be used when implementing a workflow engine. From a technical perspective this may well be correct, however few people will claim that BPEL can be easily understood by the end-user, a.k.a the business analyst, who definitely prefers a graph based notation such as BPMN.
We have used Spring Roo in a web project and show how we generated an early prototype and transistioned to early development and then to production code.
Very interesting article, seems to be an extract of the author's book on rapid sw development from 1996 (sic). Many points (especially #4 e.g.) look quite familiar to me.
C. Krueger. PFE '01: Revised Papers from the 4th International Workshop on Software Product-Family Engineering, page 282--293. London, UK, Springer, (2002)