as far as I understand you mix EJB2 and EJB3 specification.
CMP or BMP Container/Bean Managed Persistence is part of EJB2 spec.
With EJB3 you will have simple Java classes with JPA annotations. The application server or even the JVM supports that you bind a persistence manager like Hibernate or Toplink to persist the data to a database.
You might use specific annotations of toplink or hibernate to have more control about the the persistence manager but it is not necessary from the beginning.
or the specification itself
might be a good starting point.
Also you will find help within the JBoss wiki pages
You were right I was imixing EJB2 and EJB3.
As you have mentioned annotation is not necessary to have control of persistence manager. I have a question is it necessary to use third party ORM tool, like Toplink or Hibernate for EJB3? Does this implementation of ORM is provided by JBOSS container or JPA 2.0 ?
for example I have following persistence.xml file, if I am commenting the provider " <provider>org.hibernate.ejb.HibernatePersistence</provider> " I am not seeing any tables being created in Database. When I uncomment the provider and properties, my application is creating table and inserting data.
If container by default provides it I mean if it is possible then what do we substitute for provider or any other configuration which let me use container' s own persistence management.
<?xml version="1.0" encoding="UTF-8"?>
<persistence version="1.0" xmlns="http://java.sun.com/xml/ns/persistence" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd">
<persistence-unit name="BookAuthorApp3-ejbPU" transaction-type="JTA">
<!-- <provider>org.hibernate.ejb.HibernatePersistence</provider> -->
<property name="hibernate.dialect" value="org.hibernate.dialect.PostgreSQLDialect" />
<property name="hibernate.hbm2ddl.auto" value="update"/>