Message:
A new issue has been created in JIRA.
---------------------------------------------------------------------
View the issue:
http://opensource.atlassian.com/projects/hibernate/secure/ViewIssue.jspa?key=HB-127
Here is an overview of the issue:
---------------------------------------------------------------------
Key: HB-127
Summary: CounterGenerator Bug
Type: Bug
Status: Unassigned
Priority: Major
Project: Hibernate2
Components:
core
Versions:
2.0 final
Assignee:
Reporter: Maks Glukhovtsev
Created: Tue, 10 Jun 2003 8:23 AM
Updated: Tue, 10 Jun 2003 8:23 AM
Environment: Sybase 11.9.2
Description:
When using "vm" generator, experiencing problem of trying to insert a non-unique value of PK.
When sleep() inserted in generate() (just for test purposes), problem disappeared.
So, with minor changes:
private static long counter = 0;
protected long getCount() {
synchronized(CounterGenerator.class) {
if (counter==0) counter=System.currentTimeMillis();
return counter++;
}
}
public Serializable generate(SessionImplementor cache, Object obj) {
return new Long( getCount() );
}
problem has been resolved.
please.. do something more serious about it :)
---------------------------------------------------------------------
JIRA INFORMATION:
This message is automatically generated by JIRA.
If you think it was sent incorrectly contact one of the administrators:
http://opensource.atlassian.com/projects/hibernate/Administrators.jspa
If you want more information on JIRA, or have a bug to report see:
http://www.atlassian.com/software/jira
|