-
1. Re: connectionMap.remove in WrapperDatasourceService never c
vickyk Oct 10, 2008 2:52 AM (in response to ladam)Hello Ludwig.
"ladam" wrote:
Before I file a issue in the jira / provide a patch I wanted to post this here for any feedback because I am not sure if I fully understand the functionalities involved here.
Did you got a chance to investigate the issue furthur, if so then update the details over here so that I can take it form there?
Regards,
Vicky -
2. Re: connectionMap.remove in WrapperDatasourceService never c
ladam Oct 10, 2008 3:20 AM (in response to ladam)Hello Vicky,
thanks for your reply.
That's the situation currently:
* We've confirmed on our side that the ungarbaged entries in the connectionMap are definitely the cause of our growing heap dump
* After some intense searching I've found an old discussion around this @https://jira.jboss.org/jira/browse/JBAS-1678. Michael Kopp mentioned there on a side note that the connections are not removed because the section is commented. In current versions this code section is missing completely.
* I've not checked the cvs log so far if there are any reasons.
Basically, Adrian states, that the remote connections are "an anti-pattern" and shouldn't be used, so my guess is that this really slipped through.
As we don't have the option not to use remote data sources for various reasons, we plan to patch WrapperDatasourceService to do a connectionMethod.remove() in the doConnectionMethod()-function as it has been originally. However I am unsure of any side effects this might have- perhaps you have some feedback regarding this.
Thanks.
Ludwig -
3. Re: connectionMap.remove in WrapperDatasourceService never c
ladam Oct 10, 2008 3:22 AM (in response to ladam)"ladam" wrote:
...we plan to patch WrapperDatasourceService to do a connectionMethod.remove() in the doConnectionMethod()-function ...
Edit: Of course it should be connectionMap.remove() :-) -
4. Re: connectionMap.remove in WrapperDatasourceService never c
vickyk Oct 10, 2008 4:09 AM (in response to ladam)"ladam" wrote:
As we don't have the option not to use remote data sources for various reasons, we
Can you let me know your use case ?
In a typical jee application using WrapperDatasourceService is not needed thus it is stated as anti-pattern. -
5. Re: connectionMap.remove in WrapperDatasourceService never c
ladam Oct 10, 2008 4:41 AM (in response to ladam)Hi Vicky,
sure.
The need for using remote data sources is more forced by our system environment and the restrictions forced by our auditors than by the application design.
In our production environment we have a backend jboss that does a JMS-based processing of incoming messages and is also handling the data sources. Databases are completely in the internal network, no NAT / open ports to them are allowed, NAT to the backend is allowed.
In the production DMZ we have two webapp jboss (that have their own local datasources).
In a completely different network we have tools (standard java apps) running, that do data parsing, reports, some cronjobs for data maintenance, that need access to the data. As we don't have the options to give these tools direct access to the databases (nor they may run in the production env, nor we may open database ports) we need them to use remote datasources provided by the backend. There's no option that we may change this setup on mid-term. And to completely remove the processing tools and switch to complete message based transactions is not very feasible for the tasks they need to do...
Best regards,
Ludwig -
6. Re: connectionMap.remove in WrapperDatasourceService never c
dommarco Oct 26, 2008 4:19 AM (in response to ladam)Hi Ludwig,
we have exactly the same problem. How did you solved it?
Best regards,
-rochi -
7. Re: connectionMap.remove in WrapperDatasourceService never c
ladam Oct 27, 2008 2:56 AM (in response to ladam)Hi Rochi,
well, basically we are patching the WrapperDataSource.
This hasn't been done yet as I wanted to get some feedback first.
Once we've done that, we'll file a JIRA and provide a patch.
Best regards,
Ludwig -
8. Re: connectionMap.remove in WrapperDatasourceService never c
dommarco Oct 27, 2008 2:19 PM (in response to ladam)Hi Ludwig,
sounds good. If you want I can make some tests.
Best regards,
-rochi -
9. Re: connectionMap.remove in WrapperDatasourceService never c
ladam Oct 28, 2008 1:02 PM (in response to ladam)Hi,
after I haven't heard something from Adrian I've filed it as a bug- please find the reference @ https://jira.jboss.org/jira/browse/JBAS-6149.
@rochi: I've also attached the patched WrapperDataSourceService for you, hope that helps. We haven't yet tested in production, so please have a look at it for yourself before you use it in your production. -
10. Re: connectionMap.remove in WrapperDatasourceService never c
vickyk Oct 29, 2008 12:26 AM (in response to ladam)"ladam" wrote:
Hi,
after I haven't heard something from Adrian I've filed it as a bug- please find the reference @ https://jira.jboss.org/jira/browse/JBAS-6149.
Can you attach the "svn diff" for this patch, this issues is not given much priority as the usage pattern you had been using is inappropriate ? -
11. Re: connectionMap.remove in WrapperDatasourceService never c
dommarco Nov 5, 2008 11:41 AM (in response to ladam)Hi ludwig,
I've been using it for 3 days with around 20 queries per second without problems.
Thanks a lot!
Best regards,
-rochi -
12. Re: connectionMap.remove in WrapperDatasourceService never c
ladam Nov 6, 2008 3:02 AM (in response to ladam)Glad that I could help.
Vicky: I've attached a diff-patch to the Issue.
Ludwig -
13. Re: connectionMap.remove in WrapperDatasourceService never c
vickyk Nov 6, 2008 3:08 AM (in response to ladam)Thanks Ludwig, I will spend some time in looking at the patch over the weekend probably.