Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Primary Key Generation using entity command in Jboss

 
Sivakumar Nachimuthu
Ranch Hand
Posts: 52
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have written a custom implementation for Primary Key Generation using entity command. This implementation works fine for entity beans having Integer as Primary Key Class. The Class Cast Exception is being thrown for the beans having java.lang.Long as primary key Class.

I have the following ejb doclet code in my bean



The exception is thrown when i call local.getEventId() method .






Where should i specify the primary class as java.lang.Long to avoid this exception.

Thanks
Siva
[ December 19, 2005: Message edited by: Sivakumar Nachimuthu ]
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic