This seems to be an oracle problem rather than a jboss prob.
You'll have to compare the execution plan to get some hints.
How do you execute the query from jboss ?
Do you use parameters/placeholders in this query ?
connection url is:
<connection-url>jdbc:oracle:thin:@(DESCRIPTION = (LOAD_BALANCE=on) (ADDRESS=(PROTOCOL=TCP) (HOST = kopsdb1_vip.yurticikargo.com.tr) (PORT = 1521)) (ADDRESS = (PROTOCOL = TCP)(HOST = kopsdb2_vip.yurticikargo.com.tr)(PORT = 1521)) (CONNECT_DATA= (SERVER = DEDICATED) (SERVICE_NAME = KOPS)))</connection-url>
we use oracle10g rack system and try to do load balancing.
so i think its application server problem. because lots of sql statement execute in system and some of then slower in application server.
same sql statement execute in pl/sql and jdeveloper faster than application server. these sql staments contains more than joins and hints (for index)