[Boards: 3 / a / aco / adv / an / asp / b / bant / biz / c / can / cgl / ck / cm / co / cock / d / diy / e / fa / fap / fit / fitlit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mlpol / mo / mtv / mu / n / news / o / out / outsoc / p / po / pol / qa / qst / r / r9k / s / s4s / sci / soc / sp / spa / t / tg / toy / trash / trv / tv / u / v / vg / vint / vip / vp / vr / w / wg / wsg / wsr / x / y ] [Search | Free Show | Home]

SPRING JAVA

This is a blue board which means that it's for everybody (Safe For Work content only). If you see any adult content, please report it.

Thread replies: 19
Thread images: 3

File: spring_3.png (19KB, 648x270px) Image search: [Google]
spring_3.png
19KB, 648x270px
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
>>
File: context.jpg (251KB, 800x1000px) Image search: [Google]
context.jpg
251KB, 800x1000px
>>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.
>>
File: puff_it.png (67KB, 230x230px) Image search: [Google]
puff_it.png
67KB, 230x230px
>>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
Thread posts: 19
Thread images: 3


[Boards: 3 / a / aco / adv / an / asp / b / bant / biz / c / can / cgl / ck / cm / co / cock / d / diy / e / fa / fap / fit / fitlit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mlpol / mo / mtv / mu / n / news / o / out / outsoc / p / po / pol / qa / qst / r / r9k / s / s4s / sci / soc / sp / spa / t / tg / toy / trash / trv / tv / u / v / vg / vint / vip / vp / vr / w / wg / wsg / wsr / x / y] [Search | Top | Home]

I'm aware that Imgur.com will stop allowing adult images since 15th of May. I'm taking actions to backup as much data as possible.
Read more on this topic here - https://archived.moe/talk/thread/1694/


If you need a post removed click on it's [Report] button and follow the instruction.
DMCA Content Takedown via dmca.com
All images are hosted on imgur.com.
If you like this website please support us by donating with Bitcoins at 16mKtbZiwW52BLkibtCr8jUg2KVUMTxVQ5
All trademarks and copyrights on this page are owned by their respective parties.
Images uploaded are the responsibility of the Poster. Comments are owned by the Poster.
This is a 4chan archive - all of the content originated from that site.
This means that RandomArchive shows their content, archived.
If you need information for a Poster - contact them.