Friday, November 27, 2015

WebLogic JDBC performance analyzing using Java Flight Recorder

Java Flight Recorder (JFR) is a tool for monitoring Java applications. JFR is integrated into Java Virtual Machine (JVM). It have less than 1% overhead and is capable for monitoring production systems without affecting performance.

To enable JFR with the JVM that will run a WebLogic server we need to start the WebLogic using 2 flags:

-XX:+UnlockCommercialFeatures
-XX:+FlightRecorder

The JVM default JMX port is 7091. We can change it and set it for example to 7093 using:

-Dcom.sun.management.jmxremote.port=7093

This is useful when monitoring multiple managed servers on the same machine. Each managed server can have it's own port.

For development servers we can also disable authentication and SSL using the following (this is an insecure setting, do not use it with production machines):

-Dcom.sun.management.jmxremote.authenticate=false
-Dcom.sun.management.jmxremote.ssl=false

We can then open the Java Mission control using the jmc command from JAVA_HOME bin folder

$ cd $JAVA_HOME/bin
$ ./jmc

Wednesday, November 18, 2015

Proxy Oracle Maven repository using Artifactory

Oracle have a Maven repository that hosts artifacts and maven plugins for ADF, WebLogic, SOA composites, Toplink, Coherence and other technologies. Repository is at http://maven.oracle.com. A short registration is required for use the repository. You need to login with your OTN account, read and accept the terms of use. Documentation for how to use the repository with JDeveloper and Hudson/Jenkins Continuous Integration (CI) you can find here:
http://docs.oracle.com/middleware/1213/core/MAVEN/introduction.htm#MAVEN8755

As many developers and CI servers use the repository you download from Oracle repository the same artifacts several times. This is a slow process and can bottleneck the external lines. A more effective solution is to use a repository manager and proxy the Oracle Maven repository on the internal network. This way you will download only 1 time each artifact from Oracle Maven repository and speed up the build process on developer machine or on Continuous Integration Servers.


Monday, November 9, 2015

Using Ansible to install WebLogic 12c R2 (12.2.1) and Fusion Middleware Infastructure on Oracle Linux 7.1

Before a couple of days Oracle release WebLogic 12c R2 (12.2.1). There are a lot of cool features like Java EE 7 support and Multitenancy Support for WebLogic domains. Installation of WebLogic server along with ADF runtime (Fusion Middleware Infrastructure) are not hard but requires a lot of parameters to be configured and a significant time when you need to repeat the actions in multiple virtual machines. Also Infrastructure updates are time consuming. Ansible is a great tool that help us automate this things. This article will demonstrate the creation of a WebLogic domain using Ansible. You can download code in my git hub account:




Fusion Middleware needs a Database repository for storing the required schemas. If you don't have a database already you can use an Ansible playbook i have create to install an Oracle Database 12c automatically. You can download the code here:

https://github.com/cvezalis/oracledb-ansible

You can configure your infrastructure variables in infa-vars.yml

You can test the playbook from the extracted folder using:

vagrant up

a virtual machine will be ready in a few minutes with no other interaction. You can access the Enterprise Manager at http://192.168.56.14:7001/em if you use the default settings.