Hibernate configuration issue with DB2Dialect

Our application is throwing the following error due to some incompatible issues with DB2Dialect.

2011-11-29 11:03:10,638 ERROR java.lang.UnsupportedOperationException: dialect does not support GUIDs
at org.hibernate.dialect.Dialect.getSelectGUIDString(Dialect.java:754)
at org.hibernate.id.GUIDGenerator.generate(GUIDGenerator.java:50)
at org.hibernate.event.def.AbstractSaveEventListener.saveWithGeneratedId(AbstractSaveEventListener.java:122)
at org.hibernate.event.def.DefaultSaveOrUpdateEventListener.saveWithGeneratedOrRequestedId(DefaultSaveOrUpdateEventListener.java:210)
at org.hibernate.event.def.DefaultSaveEventListener.saveWithGeneratedOrRequestedId(DefaultSaveEventListener.java:56)
at org.hibernate.event.def.DefaultSaveOrUpdateEventListener.entityIsTransient(DefaultSaveOrUpdateEventListener.java:195)
at org.hibernate.event.def.DefaultSaveEventListener.performSaveOrUpdate(DefaultSaveEventListener.java:50)
at org.hibernate.event.def.DefaultSaveOrUpdateEventListener.onSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:93)

The issue seems to be related to the following entry in hibernate xml files.

<generator class="guid" />

*) We would like to know the common <generator> element which is compatible with ORACLE and DB2, etc.
*) We would like to know how to separate the hbm configurations based on database (ORACLE, DB2, MYSQL, etc.).

We have fixed the issue by making customized class as follows.

import org.hibernate.dialect.DB2Dialect;

public class MyDB2Dialect extends DB2Dialect
{

public String getSelectGUIDString()
{

	return "select GENERATE_UNIQUE() from DUAL";
}

}