There is no way to do this that is ejb3-spec compliant, however, you can use some hibernate extensions to accomplish this.
1. You need create an id genretor class that implements org.hibernate.id.IdentifierGenerator implementing the generate method to return your custom generated pk.
2. Annotate the primary key getter method for you ejb with the following
@Column(name = "ID")
@GeneratedValue(generator = "myCustomIDGen")
@GenericGenerator(name = "myCustomIDGen", strategy = "full_classname_of_your_IdentifierGenerator_implementation")
Thanks a lot for you reply. I will check those Hibernate extensions and give them a try.