Oracle JDBC Driver is slow working under Jboss Wildfly - oracle

I've encountered a problem where my fairly low-load Camel-based application being deployed to Jboss Wildfly AS executed SQL statements rather slowly compared to the same application running in JBoss EAP or as a Spring Boot Jar.
A single SQL call took 22 ms on average for the JBoss EAP / Spring Boot Jar running version. But under Wildfly AS it took 1-2 seconds. The difference is dramatic.
Later, I installed Jboss EAP and deployed my app there getting back 22 ms per call.
I enabled OJDBC tracing using ojdbc11_g module and the -Doracle.jdbc.Trace=true setting. Analysing logs from the different environments, I didn't notice a particular operation inside the Oracle Driver to be long. All the operations executed in the Wildfly were x5, x10, and sometimes x20 longer than the corresponding ones being executed via Jar.
I'm still confused and have no clue what could be the reason for such a dramatic performance degradation under Wildfly.
Any ideas?
Versions used:
OpenJDK 17.0.3 and Oracle JDK 17
ojdbc11 v21.8.0.0
Wildfly AS 26.1.2
JBoss EAP 7.4.7

Related

Maven hard-deploy in JBOSS 7

Previousally we where using JBOSS 5 and the codehaus plugin (http://mojo.codehaus.org/jboss-maven-plugin) to deploy war to JBOSS. We where using the jboss:hard-depoly maven goal. This goal could be executed even if my JBOSS server was not up
Recently we moved to JBOSS 7, and started using the plugin (http://docs.jboss.org/jbossas/7/plugins/maven/latest/) . we are now using the goal jboss-as:deploy goal. This plugin does not support hard-deploy and jboss must be started to run this goal.
Is there a specfic reason to not support the hard-deploy goal?Simply copying the war file to deployements directory in JBOSS 7 still works and why this goal is not included?
jboss-as plugin uses JBoss Management api to do everything it does. If Jboss AS7 is not up, there will of course be no JBoss Management endpoint handling requests. Having such hard-deploy would imply totally different approach - one would have to define JBoss home and parse its configuration offline. Since this is not in general supported by the plugin, I'd imagine that is the reason hard-deploy goal is not supported as well.

How do i migrate application from Tomcat 6.0.35 to JBoss AS 7.1.1

Is there any tool or set of guidelines to migrate application using Spring, from Tomcat 6.0.35 to JBoss AS 7.1.1 ? Or is it better to just host app in JBoss and work backwards to fix issues one by one as suggested by some?
There is a migration center, but it says Tomcat is coming soon.
The biggest issues you would likely face are dependencies that you've included in your application that JBoss AS or WildFly already include. This is a little old, but might be helpful too.
Other than that it's tough to say what would need to be changed without knowing your environment and current configuration. The main idea behind Java EE is ideally it should work on any application server. That said, Spring isn't a Java EE standard and Tomcat is just a servlet container :) Not that there is anything wrong with either.

deploy Apache ServiceMix 4 application into JBoss Application Server 7

I have an standalone Apache ServiceMix 4.4 application, it works nicely. Now, I want to deploy this application inside a JBoss Application Server 7. I use Maven as project and dependency management tool.
My objective is deploying the application not touching any line of code, only maven POM files. I can add new dependencies, change some versions (minor) and use different tools. I want, as a second objective, integrate all the Apache CXF DOSGi container features into JBoss AS ones seamlessly.
I think it is possible, but I found information for old releases of JBoss and ServiceMix or incomplete guides like this.
Can someone provide more information about that?
EDIT
I have found some issues in JBoss issue tracker:
Initial runtime support for Karaf based products
And some JBoss forum topics:
Migrating osgi bundles running in Karaf to JBoss 7 as OSGI container
I forgot to mention that my application is using Apache Karaf OSGi runtime.
Well Servicemix is "pre-"setup of a Container (Apache Karaf) and lot's of other Apache Projects like ActiveMq and Camel plus some ServiceMix specialties. So why would you want to deploy this setup in another Container?
If you want to do something like this, try to deploy std. Apache Camel, ActiveMQ and CXF and your own app in JBoss.

Any issues migrating from JDK6 to JDK7 with Spring & Tomcat?

I'd like to take advantage of some JDK7 features. What issues might I run into given that I use Apache Tomcat 7.0.x (latest) and Spring 3.1 (latest)?
There were a few compilation gotchas where JDK 6 could infer the generic type properly where JDK 7 could not. This was apparently a bug in JDK 6 as referenced here.
If you are using container-specific resources (e.g., data sources, etc.) be sure to verify these are still operating properly (though this will be immediately obvious on Spring startup if any of these are wired in).
If you are using Spring Security, and you upgrade, you do not need to make any changes per se to get get things running. However, you should take advantage of their less verbose configuration options (especially for REST URL's) that are available in Spring Security 3.1.
Other than that, our upgrade was seamless.
With the last Ubuntu update (11.10) I switched to JDK 7 (OpenJDK 1.7.0_147). I'm using Spring 3.0, Tomcat 6, and JRE 6 on the server (we have both VM and "physical" server installations). The code, compiled with JDK 7 runs on this configuration without any problems. I'm sure, switching to Spring 3.1 won't cause any changes. Not so sure about Tomcat 7, but hopefully this information will be useful to you.
You might run into a problem if you're using Java 7 features in a JSP. Tomcat by default user Java 1.6 for JSP compilation. See http://tomcat.apache.org/tomcat-7.0-doc/jasper-howto.html#Production%20Configuration
To solve the problem you'll want to override the compilerSourceVM and compilerSourceVM init parameters in your application's web.xml file. More on that here: https://stackoverflow.com/a/20194823/1029261

How to override TOMCAT Oracle ojdbc14 driver in the application?

The TOMCAT server is using an Oracle 9G ojdbc14 driver to its jndi connections in the /common/lib folder.
My web application uses Maven + Spring and I'm getting the dataSource using Spring jndi features.
I'm trying to bypass TOMCAT old ojdbc14 driver with a newer one (ojdbc14 10.2.0.4.0).
I've tried putting the jars in the WEB-INF/lib folder as a project dependency, but it doesn't work the application keeps using the old oracle driver that is in the TOMCAT folder.
I'm trying to bypass the TOMCAT oracle driver because I cannot update it to the newest version because there are lots of other projects using it.
Does anyone have a clue?
This won't work, Tomcat won't use the JDBC driver of your webapp to create a connection pool. In other words, you'll have to either replace the version in common/lib or to use a standalone connection pool at the application level.

Resources