Hi
logs are about the JCA threads and JTA contexts. That's ok.
Your code seems ok, you need to close MessageProducer too. You can
create CDI producers to get Session but I have to admit I don't know
if @RequestScoped would work here. A custom scope started/stopped in a
MDB interceptor would work.
Hello,
as someone who previously used only plain tomcat I finally decided to let
go of old principles and start using parts of EJB that looks promising.
I am very quite accustomed to CDI and I must say the syntax I've seen in
most examples so far is confusing and for the most part not so pretty.
Hi,
Thanks a lot for the help. I could get the samples working and try out few
samples.
thanks,
Supun Malinga
On Wed, Oct 23, 2013 at 7:46 PM, Supun Malinga wrote:
> Thanks a lot. Will do..
>
> thanks,
>
> Supun Malinga
>
>
> On Wed, Oct 23, 2013 at 12:47 PM, Romain Manni-Bucau <
> rmannibu.
Oh and btw, even more important: don't use this neat trick for anything you
really depend on in your app. Otherwise you will fail in production if the
server gets booted or a cluster node gets added under heavy load.
What I mean: This trick is perfect for refreshing statistics or cleaning up old
And as discussed with Romain on IRC a few minutes ago:
This works in OpenEJB, because it's smart ;)
But I would not bet a dime that this is clear from the spec. So it is probably
not portable and possibly won't work on other EJB containers.
There is of course an easy alternative solution.
Just
Hi
The spec mandates @PostConstruct to finish before business method are
called. That's what we do blocking to start the @Async method. If you
rmethod is not @Async it obviously doesn't work.
Romain Manni-Bucau
Twitter: @rmannibucau
Blog: http://rmannibucau.wordpress.com/
LinkedIn: http://fr.linke
Hi!
Mark might have a good point, which can be shown with the current example
(see code).
By removing @Asynchronous from this EJB, Tomee does blocks for ever.
If @Asynchronous is not commented out, then it works perfectly, with async
doingHardWork() method being executed after the @PostConstruct i