mdb and batch

2016-12-18 Thread hwaastad
Hi, I was wondering if someone has an example how to use an mdb with batching (enableBatch)? currently I only get: IllegalStateException: The last message delivery must be completed with an afterDeliver before another message can be delivered So there must be something fundamentally wrong :-) /h

Re: mdb and batch

2016-12-18 Thread Romain Manni-Bucau
Hi did you check AMQ prefetch settings? Romain Manni-Bucau @rmannibucau | Blog | Old Blog | Github | LinkedIn |

Re: mdb and batch

2016-12-18 Thread hwaastad
Hi, I'm actually looking out for some info on how to configure batching (best practice). If I set jms.prefetchPolicy.all on connection< mdb instancelimit it seems to be working. /hw -- View this message in context: http://tomee-openejb.979440.n4.nabble.com/mdb-and-batch-tp4680775p4680777.html

EJB remote access (WAR to WAR) throws java.lang.ClassCastException: com.sun.proxy.$Proxy*** cannot be cast to ***

2016-12-18 Thread alltomee
Good night. I'm struggling with this problem forever, so I resolved to put this question here. Any help will be welcome I'm migrating from Glassfish to TomEE. By now, all WARs has been moved and working by default at TomEE, except one. I have two WARs, one called EJBSERVER and another called EJBC

Re: EJB remote access (WAR to WAR) throws java.lang.ClassCastException: com.sun.proxy.$Proxy*** cannot be cast to ***

2016-12-18 Thread alltomee
I solved, just removed @LocalBean from Hello class. But now I can't access the same EJB locally (inside EJBSERVER itself). -- View this message in context: http://tomee-openejb.979440.n4.nabble.com/EJB-remote-access-WAR-to-WAR-throws-java-lang-ClassCastException-com-sun-proxy-Proxy-cannot-be-c

Re: EJB remote access (WAR to WAR) throws java.lang.ClassCastException: com.sun.proxy.$Proxy*** cannot be cast to ***

2016-12-18 Thread alltomee
I've created a local interface called HelloLocal, and added annotation @Local(HelloLocal.class) to Hello class. Everithing is working now (local and remote client). I don't needed to create the local interface at Glassfish using the annotation @LocalBean, so anyone know why this happen? Thank you.

Re: mdb and batch

2016-12-18 Thread Romain Manni-Bucau
You have 2 params: concurrency (instance limit) and how many messages are queued before being distributed to the processor (the mdb). Exceptions can be bugs depending amq version and your code. Le 18 déc. 2016 12:08, "hwaastad" a écrit : > Hi, > I'm actually looking out for some info on how to

Re: EJB remote access (WAR to WAR) throws java.lang.ClassCastException: com.sun.proxy.$Proxy*** cannot be cast to ***

2016-12-18 Thread Romain Manni-Bucau
Local bean defines a class used as API in the webapp classloader so not accessible to other apps. Local uses the interface and a potential classloader copy between apps so not shocking it works. Sharing HelloJNDI in tomee lib should make it naturally working. Le 18 déc. 2016 16:50, "alltomee" a é