简体   繁体   English

插入Java连接池层?

[英]Insert Java connection pooling layer?

I have a vendor supplied Java console application for loading historical data into their webapp and an Oracle 11g backend all runing on redhat. 我有一个供应商提供的Java控制台应用程序,用于将历史数据加载到他们的web应用程序中,以及一个Oracle 11g后端,它们都在redhat上运行。 Performance testing is projecting upwards of a month or more to load our volume of historical data. 性能测试预计将花费一个月或更长时间,以加载大量历史数据。

I have no access to the source code, and can only configure the connection in property files. 我无权访问源代码,并且只能在属性文件中配置连接。 The documentation specifies using the oracle thin client - I can also get it to run with the OCI client but that is slower still. 该文档指定使用oracle瘦客户端-我也可以使其与OCI客户端一起运行,但这仍然很慢。 I've looked at ADDM reports on the DB and consistently it recommends using connection pooling as its number one finding. 我查看了数据库上的ADDM报告,并且始终如一地建议使用连接池作为其首要发现。

Is there a way to fake out or simulate connection pooling - make the application think its requesting a connection from the DB but its coming from a custom pooling layer? 有没有办法伪造或模拟连接池-使应用程序认为它正在请求来自数据库的连接,但它来自自定义池层?

I've also tried increasing the heap on the java app but it doesn't even use a fraction of what I give it, and doesn't seem to be multithreaded at all. 我也尝试增加Java应用程序上的堆,但是它甚至不使用我提供的内容的一小部分,并且似乎根本没有多线程。

Any tips or suggestions are welcome. 欢迎任何提示或建议。

What did you have to specify on the properties file? 您必须在属性文件中指定什么?

I think your problem is the vendor's code does the work setting up the javax.sql.Datasource (and it uses non-pooled datasource), hence you can't simply switch it into connection-pooled datasource. 我认为您的问题是供应商的代码完成了javax.sql.Datasource的设置工作(并且它使用了非池化数据源),因此您不能简单地将其切换为连接池化数据源。

If you can specify JNDI address to the vendor's code then yes you can setup a pooled Datasource. 如果可以在供应商的代码中指定JNDI地址,则可以,您可以设置池化数据源。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM