Programme Java

Facebook Twitter
Using Java DB in Desktop Applications Articles Index Sun Microsystems recently announced that it is distributing and supporting Java DB based on the 100 percent Java technology, open-source Apache Derby database. Derby was previously available under its earlier name, Cloudscape, from its former owners: Cloudscape, Informix, and IBM. IBM donated the Derby product source code to the Apache Foundation as an open-source project. Sun, IBM, other companies, and individuals have been actively involved in development of the relational database as part of the Apache Derby community. Using Java DB in Desktop Applications
Simplify your application delivery with One-JAR
Hibernate Sessions in Two Tier Rich Client Applications Hibernate Sessions in Two Tier Rich Client Applications One of the most populare articles in this blog so far ist the one about, well: Hibernate Sessions in Two Tier Rich Client Applications. Although the original article is writen in german I keep refering to this article, even in english communities. Therefore I decided to break my habit of writing articles in german only and provide a english version which you are reading right now. This is NOT a direct translation so there might be some differnces in scope, focus and detail. Everybody working with Java and Databases is probably aware of Hibernate.
Apache log4j 1.2 - Short introduction to log4j Log4j has three main components: loggers, appenders and layouts. These three types of components work together to enable developers to log messages according to message type and level, and to control at runtime how these messages are formatted and where they are reported. Logger hierarchy The first and foremost advantage of any logging API over plain System.out.println resides in its ability to disable certain log statements while allowing others to print unhindered. This capability assumes that the logging space, that is, the space of all possible logging statements, is categorized according to some developer-chosen criteria.

Apache log4j 1.2 - Short introduction to log4j

Single session. Start transaction when you need to do a set of operations (like update data after dialog box OK button), commit the tx at the end. The connection though is constantly open (since it's the same session), and thus all opportunities for caching can be used by both Hib and RDBMS. It may also be a good idea to implement a transparent session re-open in case the connection went dead -- users tend to leave applications open for extended periods of time, and it should continue to work Monday even if DB server was rebooted on weekend. Update Jens Schauder provided a reason to use multiple sessions: partial (unwanted) updates to the session. java - Session management using Hibernate in a Swing application java - Session management using Hibernate in a Swing application
Swing + Hibernate
At JBoss World last week in Berlin I presented some advanced Hibernate patterns. Well, I planned to talk longer about the Swing and Hibernate demo app I wrote a few days before but it turned out that although 100% of the audience was using Hibernate, only one poor soul had to work with Hibernate in a two-tier desktop application scenario. So I spent more time on the other patterns and only showed the Swing demo for about 5 minutes at the end of the presentation. I thought more people would be interested in this, it comes up frequently on forums and the Wiki. Developers who have to access a database from a Swing application with no middle tier always have the same questions: How do I use the Session?  Hibernate and Swing demo app  Hibernate and Swing demo app
ps_ts-6096-nimbus.pdf (application/pdf Object)
Tables