Arquillian questions
by Mark Struberg
Hi folks!
I'm not sure if this is the right list, but I have some Arquillian questions.
I have a testng test for services which use a @RequestScoped EntityManager:
MyTest extends Arquillian {
private @Inject EntityManager em;
private @Inject MyService mySvc;
@BeforeClass
public void setupTests() {
em.getTransaction().begin();
em.delete(em.find(MyEntity.class, TEST_ID));
em.getTransaction().commit();
}
@Test
public void test1() {
mySvc.doDbStuff1();
}
@Test
public void test2() {
mySvc.doDbStuff2();
}
}
Since my service methods in the tests and @BeforeClass @AfterClass, etc all use the @RequestScoped EntityManager, each of those methods needs to get treated like an own Request.
Also: is there some way to manually restart the RequestContext? This is e.g. needed to simulate some issues with detached entities. I basically need full programmatical control over the various Context start/stop in my unit tests!
LieGrue,
strub
13 years
what about a seam2 - CDI Bridge ?
by Antoine Sabot-Durand
Reading the SeamNext thread and all these remarks about Seam 2 to Seam 3 migration I was wondering how difficult would it be to create a Seam 2 CDI extension to provide the same kind of bridge we have with Spring ?
This bridge would be one way : using Seam 2 bean in CDI (the other way is not relevant). It would help people to go thru the migration process don't you think ?
The biggest difficulty would probably be the Seam 2 navigation and providing some kind of extension to merge JSF2 and Seam 2 navigation seems a bit tricky.
Antoine SABOT-DURAND
13 years
jdbc connection with seam-persistence
by José Rodolfo Freitas
Hey guys, quick question:
Does seam-persistence provide any mechanism that handles jdbc connections
and sql native queries?
13 years