Is Ehcache a NoSQL store? No, I would not characterise it as that, but I have seen it used for some NoSQL use cases. In these situations it compared very well — with higher performance and more flexible consistency than the well-known NoSQL stores. Let me explain.
EJBs in Scala schreiben
Was spricht eigentlich dagegen, eine EJB in Scala zu implementieren? Um diese Frage zu beantworten, habe ich ein Demo-Projekt aufgesetzt, in dem ich zwei EJBs in Scala implementiere.
WSRP is an open standard proposed by OASIS for several years. The spec now is sponsored by a number of
big names like IBM and BEA. There are currently two active implementation of the spec. One is wsrp4j from
Apache foundation (still a incubator project, been developed since 2002). The other one is a subproject of
dev.java.net Open-Portal.
I have been exposed and done lot of development on the Apache's wsrp4j project. Thus, in this guide I will
mainly discuss wsrp4j implementation.
At this point, wsrp4j project is still under heavy development and re-construction. It is almost impossible
to get the trunk snapshot in the project repository and make it work without pulling all your hair out to figure
out how to set it up properly. This mostly caused by the lack of documentation and support from its developers.
Still, there is a stable (enough) revision which we can use to make a perfect wsrp4j environment.
The wsrp4j revison I use here is 440430 along with pluto portal 1.0.1 release for setting up a producer.
Jetspeed 2.1 (latest version currently) will be used as a container for wsrp4j consumer (wsrp4j-proxyportlet).
Of course, you can use pluto to setup wsrp4j consumer as well. But that is very easy to do.
Plus, pluto portal doesn't provide a lot of bell and whistle in the GUI side as Jetspeed portal does.
The first part of the visual git tutorial explains how to locally track project files with the git version control system. It shows how to add and commit changes, how to browse the history, revert changes and how to work with tags and branches.
RESTORE DATABASE Example. MS SQL is a pain, pain, pain.
Hint: Use e.g.
RESTORE FILELISTONLY FROM DISK='C:\MyData.bak'
to get the necessary information.
Here the command from the cited blog entry:
ALTER DATABASE MyData
SET SINGLE_USER WITH
ROLLBACK IMMEDIATE
RESTORE DATABASE MyData
FROM DISK = 'C\:BackupMyData.bak'
WITH MOVE 'MyData_Data' TO 'C:\Data\datafile.mdf',
MOVE 'MyData_Log' TO 'C:\Data\logfile.ldf',
REPLACE
Trading at BetFair betting exchange with Apache SCXML
The main concept of trading is to buy at low price and to sell at high price, e.g. to buy/sell shares at a stock exchange. Similar idea is behind a betting exchange, but instead of shares issued by companies there are horse racing, tennis and football markets, instead of buying/selling shares, bets are placed. For example if two bets are placed on the same horse in a horse race, one bet at a lower price that the horse will lose and second bet at a higher price that the horse will win ,then whether or not a horse is a winner there is always a profit from these two bets.
This article show you how you can fix bugs for maven-plugins (eclipse setup for hacking the code, debugging etc.) with a concrete project: maven-eclipse-plugin. Lets start …
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;
Finally a useful article on eclipse.ini memory settings: "Many users seem to have problems with running out of memory when using Eclipse 3.2 in combination with additonal plugins such as those from JBoss Tools or even Eclipse WTP."
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 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.
Spring, JPA, and JTA with Hibernate and JOTM
2007-04-24 20:35
have been struggling for a couple of hours today to modify a Spring JPA configuration with a single datasource, Hibernate as the JPA provider and the JpaTransactionManager to a configuration with two XA datasources, Hibernate as the JPA provider, and the JtaTransactionManager with JOTM as the standalone JTA provider.
since the Spring and Hibernate reference manual and Javadoc documentation merely contain a number of hints on how to configure JPA with a JTA transaction manager and others are struggling as well i decided to post how i finally got it to work.