Home » Author Archives: Zemian Deng (page 2)

Author Archives: Zemian Deng

How to setup custom SSLSocketFactory’s TrustManager per each URL connection

java-logo

We can see from javadoc that javax.net.ssl.HttpsURLConnection provided a static method to override with setDefaultSSLSocketFory() method. This allow you to supply a custom javax.net.ssl.TrustManager that may verify your own  CA certs handshake and validation etc. But this will override the default for all “https” URLs per your JVM! So how can we override just a single https URL? Looking at ...

Read More »

Poking around your REST application with a scriptable endpoint

java-interview-questions-answers

I love the fact that JDK comes with a ScriptEngine. It’s so flexible when you want to evaluate and troubleshoot your application that’s already deployed in an server environment. Add this REST endpoint into a Java EE app, and it will give you instant access to internal states of the app.             package myrestapp; import ...

Read More »

Creating your own loop structure in Java 8 lambda

java-logo

Java doesn’t have an easy construct of repeat something N number of times. We can make a for loop of course, but many times we don’t even care about the variable that we created in the loop. We just want repeat N times of some code and that’s it. With the lambda available in Java 8, you may attempt something ...

Read More »

How to process stream and read text file in Java 8

java-logo

I have converted one of my old utility class using latest Java8. I use this often to print content of manifest file to check any mysterious jar file for version etc. Just run “java ztools.PrintJar /path/to/my.jar” to see output. In the new code, you will see how I use the Java 8 stream processing to filter what I need from ...

Read More »

How to use NodeManager to control WebLogic Servers

oracle-weblogic-logo

In my previous post, you have seen how we can start a WebLogic admin and multiple managed servers. One downside with that instruction is that those processes will start in foreground and the STDOUT are printed on terminal. If you intended to run these severs as background services, you might want to try the WebLogic node manager wlscontrol.sh tool. I ...

Read More »

How to monitor multiple JVM’s on a server with VisualVM

java-logo

In the last article I have shown you how to start WebLogic Server with single admin and mulitiple managed servers. After those are started, how do you go check their health status? You can use the admin’s /console webapp. But there  is also another tool that comes with all the default Oracle/Open JDK 6+: the VisualVM. I will show you ...

Read More »

How to start multiple WebLogic managed servers

oracle-weblogic-logo

The WebLogic Server docs recommand you to create a dedicated admin server and then sepearate managed servers for application deployment. Here I will show you how to create one or more managed server in the same host as the admin server. I assume you already have WLS installed with your own domain created and running. If you haven’t done this ...

Read More »

How to create MySQL DataSource in WebLogic Server

mysql-logo

One cool thing about using an application server is that it allows you to create DataSource outside of your application and it can manage it along with thread pool and transaction manager etc. With WebLogic Server, it comes with quite a few built in JDBC drivers such as Oracle Database and MySQL etc ready for your use. Here I will ...

Read More »

WebLogic Classloader Analysis Tool

oracle-weblogic-logo

The WebLogic Server has a built-in webapp called Classloader Analysis Tool, and you may access it through http://localhost:7001/wls-cat You need to login with same user as you configured for the /console webapp. With the CAT, you may check what classes are loaded by your application in the server. This is extremely handy if your app is loading jar that’s already ...

Read More »

Developing Java EE applications with Maven and WebLogic 12c

apache-maven-logo

The WebLogic Server 12c has very nice support for Maven now. The doc for this is kinda hidden though, so here is a direct link http://docs.oracle.com/middleware/1212/core/MAVEN To summarize the doc, Oracle did not provide a public Maven repository manager hosting for their server artifacts. However they do now provide a tool for you to create and populate your own. You ...

Read More »
Do you want to know how to develop your skillset and become a ...

Subscribe to our newsletter to start Rocking right now!

To get you started we give you our best selling eBooks for FREE!
Get ready to Rock!
To download the books, please verify your email address by following the instructions found on the email we just sent you.

THANK YOU!

Close