There is no index annotation for EJB 3.
We ran into this problem ourselfs. What you can do is:
use the hibernate annotation, which I personally dislike, since it gets you hibernate dependend, as you already pointed out. The other option is to use hbm.xml files to describe these aspects of your entities. As the documentation states mixing of annotations and hbm.xml files should be working.
Of course you can always patch hibernate.
Regards, Milan Wölke
I will use Hibernate annotation @Index.
But why is @Index ignored when hibernate.hbm2ddl.auto type is set to "update"?
Bug or feature?
I also do not understand why does not exist similar annotation in official EJB3 standard
because I dont know any real database with no additional indexes.