[JBoss Seam] - Re: Question about SeamTest
by dmitriy.lapko
I'm trying to use SeamTest and with some success.
But I have some unclear questions:
1) If Seam is not bounded to JSF, why SeamTest should be bounded to JSF Phases? I just not really like for testing purposes use all these FacesRequest multiple implemnetations just to call a method of the component... And this doesn't add flexibility to my tests - e.g. if I want to pass any value from one call of FacesRequest to other I have to create a global field in class.
2) If I use facinating Seam-features like EL in QL, I cannot unit test my application - I need all framework to be started to enable all these Interceptors for my code. What a pity...
3) If you would like to prepare some test data before executing FacesRequest or to check what was really done in database - you cannot use current configuration of database and have to add your own to make queries. Annoying...
Because of complexity of configuration of tests and of using them (to write integrational test you have to know Seam like half as Gavin knows it...) they are just unusable for normal team member. I'm sure that SeamTest using should be simplified, now it is too complex.
For now I have next problems which I cannot solve:
1) I have two consecutive FacesRequest calls to methods, first of which should start long running conversation and second should end it. First marked by @Begin and second - by @End annotations. The problem is that they don't work in the same conversation - in second call I have:
new FacesRequest() {
| @Override
| protected void invokeApplication() {
| invokeMethod("#{basket.createBasket}");
| }
| @Override
| protected void renderResponse() throws Exception {
| assert Manager.instance().isLongRunningConversation();
| }
| }.run();
|
| new FacesRequest() {
| @Override
| protected void updateModelValues() throws Exception {
| assert Manager.instance().isLongRunningConversation();
| }
| @Override
| protected void invokeApplication() {
| invokeMethod("#{basket.saveBasket}");
| }
| }.run();
|
So first assertion inside first request passed successfully. Second - fails. Why?
2) I run my unit tests inside the deployed and started application. I want to do it also with SeamTests. But disabling of starting embedd ejb container didn't help - anyway a new SeamPhaseListener is started and all other stuff which breaks the application inside which everything was started.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4103078#4103078
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4103078
18 years, 7 months
[JBoss Messaging] - Re: Connection caching
by travisb
The DefaultMessageListenerContainer relates to the JmsTemplate in that it is equally resource intensive with a cache level of CACHE_NONE. Our client works with CACHE_CONSUMER, but with a level of CACHE_SESSION or less, consumption halts and we quickly receive the following stacktrace in the server logs:
anonymous wrote : ERROR [org.jboss.logging.Log4jService$ThrowableListenerLoggingAdapter] Unhandled Throwable
| org.jboss.util.threadpool.ThreadPoolFullException: java.lang.RuntimeException: Pool is blocked
| at org.jboss.util.threadpool.BasicThreadPool.execute(BasicThreadPool.java:417)
| at org.jboss.util.threadpool.BasicThreadPool.runTaskWrapper(BasicThreadPool.java:192)
| at org.jboss.util.threadpool.BasicThreadPool.run(BasicThreadPool.java:212)
| at org.jboss.util.threadpool.BasicThreadPool.run(BasicThreadPool.java:206)
| at org.jboss.util.timeout.TimeoutFactory.doWork(TimeoutFactory.java:223)
| at org.jboss.util.timeout.TimeoutFactory.access$000(TimeoutFactory.java:41)
| at org.jboss.util.timeout.TimeoutFactory$1.run(TimeoutFactory.java:136)
|
When using CACHE_CONSUMER, the DMLC fails to recover when JBoss is recycled. Logs will indicate a successful recovery, but the DMLC will continue to receive null even though messages are available on the queue.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4103068#4103068
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4103068
18 years, 7 months