According to
EJB specification Page 197, the return type of ejbCreate()
should be primary key class, which must provide suitable implementation of hashCode() and equals(Object) methods.
So that will rule out primitives, it can be wrapper classes though.