You can configure Toplink Essentials, Oracle’s JPA implementation, to automatically generate the required database objects for your EJB 3.0 entity classes.
For example, i have a simple entity class called Customer:
@Entity
@Table(name = "cust")
public class Customer implements Serializable {
@Id
@SequenceGenerator(name = "cust_id_seq_gen", sequenceName = "cust_id_seq",
[...]