This content has been marked as final.
Show 3 replies
-
1. Re: Trouble with SeamTest when stateful session bean is anno
matt.drees Jun 11, 2007 11:58 PM (in response to tuxzilla)You can do
@Startup(depends={"orb.jboss.seam.core.ejb"})
I think. -
2. Re: Trouble with SeamTest when bean is annotated @Startup
tuxzilla Jun 12, 2007 12:53 PM (in response to tuxzilla)Unfortunately it didn't work either. I removed the ejb annotations and made it a POJO. Then I injected entityManager using @In, I got a similar problem, the root of which is due to the micro-container (and the JNDI) not available before the starting up of the bean:
[testng] 09:49:46,453 INFO [Component] Component: voteCount, scope: CONVERSA
TION, type: ENTITY_BEAN, class: com.n2.bo.VoteCount
[testng] 09:49:46,453 INFO [Lifecycle] starting up: entityManager
[testng] 09:49:46,453 INFO [Lifecycle] starting up: companyList
[testng] FAILED CONFIGURATION: @BeforeClass init
[testng] java.lang.IllegalArgumentException: EntityManagerFactory not found i
n JNDI
[testng] at org.jboss.seam.core.ManagedPersistenceContext.getEntityManage
rFactoryFromJndiOrValueBinding(ManagedPersistenceContext.java:164)
[testng] at org.jboss.seam.core.ManagedPersistenceContext.initEntityManag
er(ManagedPersistenceContext.java:77) -
3. Re: Trouble with SeamTest when stateful session bean is anno
tuxzilla Jun 12, 2007 2:24 PM (in response to tuxzilla)Never mind. On closer inspection, your solution of adding depends={"org.jboss.seam.core.ejb"} worked. Thanks.