Well, for some reason the JBoss Tools Team refuses to add easy Seam support for JBoss 5.
If you create a new Seam war project with JBoss 5, you get many weird errors.
Some suggest to add all entities to persistence.xml....
http://seamframework.org/Documentation/RunningSeamExamplesWithJBossApplicationServer5
and
https://jira.jboss.org/browse/JBSEAM-3821
But the real soultion is this:
add the following line to persistence.xml:
<property name="jboss.entity.manager.factory.jndi.name" value="java:/myEntityManagerFactory">
remove the following lines in components.xml:
<persistence:entity-manager-factory name="entityManagerFactory"
persistence-unit-name="MYPU"/>
<persistence:managed-persistence-context name="entityManager" auto-create="true"
entity-manager-factory="#{entityManagerFactory}"/>
add the following line:
<persistence:managed-persistence-context name="entityManager" auto-create="true"
entity-manager-factory="#{entityManagerFactory}"
persistence-unit-jndi-name="java:/myEntityManagerFactory"/>
Also hot depoly doesn't work anymore with JBoss 5 AS if you start it normally.
Try to start JBoss AS 5 in debug mode, then hot deploy should work again.
Don't know why though...
Happy Coding all !
Ray.
Keine Kommentare:
Kommentar veröffentlichen