So I create Thread pool executor that starts at Spring application context start. It spawns n Consumers in Activemq using a while loop. The problem is that if I undeploy my app from tomcat my activemq consumers become dead and stop receiving meddages. How do I make consumers stay alive and waiting after the parent spring app stops or how do I kill activemq consumers on application exit?
Inb4 /g/ is gay and don't know anything about JAVA.
Fix it yourself Pajeet
>>61609235
RTFM.
>>61609301
For fucks sake!
I hate programmers, JAVA and entite /g/ so fucking much.
Learn how to write proper documentation! When you can't find explanation of even the basic stuff in google for your framework, you that someone fucked up.
>>61609322
There is nothing in the fucking manual. Java manuals are cancer and give 0 examples of what the fuck they are babbling about.
Will giving different consumers different sessions fix the problem? Anyone?
>>61609373
Java is one of the best documented languages. Git good faggot.
>>61611472
but the content of these manuals is poor
>>61609373
PEBKAC - Problem exists between keyboard and chair.
>>61612991
yes it is
If I can understand every other documentation except for Java than the manual is shit.
In the end I just create new pool of connections and let the old ones die after some time.
>>61613276
>>61609235
>I want my components to keep running after the framework exits
nigga you're doing it wrong
>>61613276
ah! i created a @bean from my connection and now i can shut it down on application context close!
Nothing about that in the manual
>>61613969
Yeah, activemq consumers should probably die when the application is down. How do I make a pool for my sql connections? Every query generates TIME_Waits and the accumulate.
>>61614414
>How do I make a pool for my sql connections?
Don't, you'll fuck it up. Use one of the many existing SQL connection pools instead. Hell, Spring probably bundles 4 or 5 of them.
>>61615499
I'm reading about it. Still don't which one to choose. Tbh, It's a postgresql
>>61615857
Just use the Tomcat JDBC Connection Pool. Good enough.
>>61615902
So if I use this tomcat connector in my app and then deploy my war to tomcat nothing will interfere with each other?
Also, I'm pooling my database from ajax every 5 seconds to check i the task is done. Will using a socket be better? I'm using Spring controller to query the database and send data back to ajax.
Elixir doesn't have this problem