[jboss-user] [EJB 3.0] - Re: @PersistenceUnit on private javax.persistence.EntityMana

ALRubinger do-not-reply at jboss.com
Thu Mar 6 17:08:55 EST 2008


Well, JBoss automatically ships with the Hypersonic database to give you features requiring persistence out of the box...like JMS.

But even if you use the Hypersonic DB, you still need to:

* Create a database (namespace, not database server) for your application (See references for your DB impl).
* Create your DB schema to match that which JPA/EJB3 Entities expect.  See hbm2ddl configuration for Hibernate, can be done from persistence.xml; this will handle this step for you via autogen to save you this step and keep everything in line during development.
* Create a datasource to define the connection pool to your DB.  If you use Hypersonic built-in, this is already done.  Otherwise you must make your own *-ds.xml file and place in "deploy".  http://wiki.jboss.org/wiki/Wiki.jsp?page=DSdotXML
* Create a persistence.xml to define your persistence unit (this will point to your datasource); yes this is where implementation-specific config may be done (ie. Hibernate in JBoss's case)


View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4134690#4134690

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4134690



More information about the jboss-user mailing list