My suggestion is
1) First try with simple example to create a session bean (In one project, do not use two projects). For example sayHello.
2) If that works, then create one
test pojo class which will map to a table.
3) create persistence.xml in META-INF directory
4) Inject EntityManager in your session bean and try to pesist pojo from session bean.
Search for simple tutorial, it will work.