wood burning stoves 2.0*
The moose likes JBoss/WildFly and the fly likes Entity Bean Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » JBoss/WildFly
Bookmark "Entity Bean" Watch "Entity Bean" New topic
Author

Entity Bean

Kalyani Nayak
Greenhorn

Joined: Jan 01, 2006
Posts: 25
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.
Reid M. Pinchback
Ranch Hand

Joined: Jan 25, 2002
Posts: 775
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.


Reid - SCJP2 (April 2002)
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Entity Bean
 
Similar Threads
Primary Key of Entity bean
Trouble understanding abstract-schema-name
Can somebody help me please? :(
CMR configuration confusion
abstract schema name