Shared Library example for Oracle Weblogic Server

1. Compile your code and package it in a jar file. In this example I have written a simple program that has a function that just takes a string as input and prints hello infront of the string.   package wonders; public class MyTestClass { static { System.out.println("MyTestClass class Loaded

Continue reading »

Using WLDF to view Historical Data

1. Go to the Home Page and click on Monitoring Dashboard under charts & graph 2. This will open the dashboard in a new tab. There are some built in views. You can select JVM Runtime Heap and click on the start button on the top. 3. You should be

Continue reading »

JMX Code to print Datasource Status

You need to provide the server host name and port number in the JMX code and also set the class path before compiling it. import java.io.IOException; import java.net.MalformedURLException; import java.util.Hashtable; import org.apache.log4j.Logger; import javax.management.MBeanServerConnection; import javax.management.MalformedObjectNameException; import javax.management.ObjectName; import javax.management.remote.JMXConnector; import javax.management.remote.JMXConnectorFactory; import javax.management.remote.JMXServiceURL; import javax.naming.Context; public class WLMonitMain {

Continue reading »

How to decrypt WebLogic Datasource Password

You need to copy the datasource password present in the -jdbc.xml present under \config\jdbc to the password variable in the WLST Script.   Change the path variable to point to your domain from weblogic.security.internal import * from weblogic.security.internal.encryption import * password = "{AES}0+5YrFk+fD9BFIykr3H+wPsNmPRP/GIOUId7SPqBgNg=" path = "D:/Oracle/Middleware/user_projects/domains/pega7_domain/security" encryptionService = SerializedSystemIni.getEncryptionService(path) cService

Continue reading »