I've started to write some basic tests for ejb container lifecycle,
based on the cts.tests from the testsuite for:
https://jira.jboss.org/jira/browse/JBAS-5332
So basically what i do is:
- deploy the cts.jar
- run a cts tests
- call the serviceController to do a stop/destroy/create/start on the tested bean
- run the test a 2nd time
- undeploy the cts.jar
I do that for the container, then for the cache, the pool.
This was actually not working for any container. So i've moved some obvious things
around,
which should put that in a better shape.
Still - after talking to Alexey it seems that it could be a bit more difficult doing the
same with CMP.
At the moment the persistenceManager is created/stopped/destroyed in the entityContainer
itself and
started in the EJBModule. And it seems that it's needed to be started in that way.
But this makes the bean not usable after restarting just the container - moving this parts
into
the EJBModule seems to work (at least for the simple testcase).
But i still don't know whether this makes sense or not?
Most probably we also need to do a bit more testing to make sure that it's really
function correctly,
but at least those tests exposed some problems.
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4178316#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...