This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
I am using JBoss4.0.2 I successfully deployed entity bean, session bean. I am using avenir jdbc driver. While creating entity bean, i am passing the primary key (java.lang.Float). I want it to be autogenerated. Should, i must use any third party IDGenerator, or is there inbuilt IDGenerator comes with JBoss, and how to use it. If third party IDGenerator class must be used then how to use it? Also one thing i need to know is, when i deployed the entity bean first time, it created a new table with the same name of entity bean, which i given in ejb-jar.xml in the tag <ejb-name>, but i want the existing table to map to the entity bean, and for that i also have given <abstract-schema-name>tablename</abstract-schema-name>, is something missing, please help me.
How exactly would you autogenerate a float? Given a currently-allocated id value 'x', what is 'the next value of x?'. Since database floating-point resolution can differ significantly from how Java represents floats, plus all the usual concerns about rounding and decimal-to-binary conversion noise, this seems like a really dangerous choice of type for a primary key.