Log in to follow, share, and participate in this community.
Article Hibernate in a Layered Architecture
Hibernate in a Layered ArchitectureHibernate in a Layered ArchitectureThis page is used to centralize the issues developers have with a layered architecture and Hibernate as the persistence layer. Usually, you have some kind of service layer on top of ...
Distributed Objects With HibernateProblem:You are building a three tier distributed system and you are passing persistent objects between tiers. When you send the objects back to the server, you want to save the only the changes. Solutions:1)Hiberna...
A case for insensitivenessCompatible with Hibernate 2.1.8, easily adaptable to 3. Written on June, 2005, by Pietro Polsinelli. Consider this requirement: on a case sensitive db, say named "Elcaro", have case in-sensitive queries. So if I searc...
Article Best Practices for Thick-Client Applications (i.e., non-web apps.)
Best Practices for Thick-Client Applications (i.e., non-web apps.)Christian: I have now written a proof of concept that shows how to work with Hibernate in a two-tiered thick client scenario. Please read my weblog entry. This should answer most questions on this page. Started by Gun...
Remote Lazy LoadingThis code demonstrates custom collection type and custom tuplizer (since Hibernat 3.1).Tuplizer registers custom proxy factory to return proxies using custom serialization.Proxy is desirialized on client with callback...
Managing multiple databases transparentlyThe ideas here meet the problems of a single application that reads and persists entities on multiple databases, even not of the same type, e.g. one is an Oracle instance, the other a MySQL one. In our case, we have a...
Article Page View and User Tracking via Interceptors
Page View and User Tracking via InterceptorsThis article discusses using interceptors to provide transparent (to the coder) support for page view and user tracking via the Interceptor mechanism. If you use JAAS authentication (e.g., Tomcat form-based authentica...
Audit LoggingIt appears to be a common request for users of Hibernate to want to log changes to data in an Audit History table. I'm yet to see any solution that works in the forums, mainly due to problems with getting pre-update v...
UserType for non-default TimeZoneHibernate's built-in date, time and timestamp types assume that dates in the database are in Java's default time zone, implicitly. If this assumption is false (and you can't make it true by calling java.util.TimeZone....
UserVersionType for non-default TimeZoneThis is a variation on UserType for non-default TimeZone with the column being a UserVersionType. While the changes to the code there are not major, adding the code there would (IMHO) clutter that page too much....
Article UserType for dealing with fixed length CHAR fields
UserType for dealing with fixed length CHAR fieldsThis usertype can be used to cope with databases that store strings as fixed length CHAR fields. When it loads up a CHAR, it will trim trailing blanks, so that for instance if you are storing a surname as "JONES " in ...
Security: JAAS LoginModuleThe Java Authentication and Authorization API (JAAS) provides a standard way for applications to handle user identification and permission issues. Many people compare JAAS to PAM modules on Unix/Linux systems. ...
Article Security: Declarative permissions using JAAS and Interceptors
Security: Declarative permissions using JAAS and InterceptorsDisclaimer: this code compiles but has not yet been tested because I wish to use a hibernate-based Policy instead of the standard text-based one. Use with caution. In Security: JAAS LoginModule I mentioned that ...
Article Security: adding message digests via interceptors
Security: adding message digests via interceptorsThis article discusses using an Interceptor to automatically generate MAC digests for saved and updated records. This provides a mechanism to identify database records created or modified by unauthorized and presumabl...
QueryCacheHibernate version 2.1.4 introduced the concept of a pluggable QueryCache by making net.sf.hibernate.cache.QueryCache an interface as opposed to a concrete class. The standard implementation (net.sf.hibernate.cache.Sta...
Performance: Hibernate3 startup timeI'm having sucess with the following methodology in hibernate3 and Tomcat 5.5.x to speed up the Hibernate SessionFactory building by making use of the Configuration().addCacheableFile API call. This is only rec...
PaginationCompatible with Hibernate 3.2.4 SP1. Last rewritten on July, 2007, by Pietro Polsinelli. In the last update (for version 3.2.4), the code has been simplified. I propose here a pagination solution, which took ...
Statistics InterpreterI wrote this small web interface to dynamically communicate with Hibernate Statistics implementation (in case you don't have JMX :-). It uses BeanShell (www.beanshell.org) to interpret [Interpreter API] our commands f...