BASIC Authentication with Apache

Create user.txt with the username and password separated by colon user.txt testuser:testuser Then use the htpasswd to encrypt the password Apache2\bin>htpasswd.exe -b user.txt testuser testuser Automatically using MD5 format. Updating password for user testuser Add the following in the httpd.conf file present in C:\Program Files\Apache Group\Apache2\bin LoadModule weblogic_module modules/mod_wl128_20.so <Location

Continue reading »

Updating invalidation-interval-secs Using Plan.xml

This article describes the usage of plan.xml to update deploment descriptors on the fly. In this example we will update the value of invalidation-interval-secs from 90 seconds to 30 seconds using plan.xml. invalidation-interval-secs Sets the time, in seconds, that WebLogic Server waits between doing house-cleaning checks for timed-out and invalid

Continue reading »

Creating Application Life Cycle Listener

Create a Class that extends ApplicationLifecycleListener. ApplicationListener.java package demo; import weblogic.application.ApplicationException; import weblogic.application.ApplicationLifecycleEvent; import weblogic.application.ApplicationLifecycleListener;; public class ApplicationListener extends ApplicationLifecycleListener { public void preStart(ApplicationLifecycleEvent evt) { System.out.println(“Event preStart received”); } public void postStart(ApplicationLifecycleEvent evt) { System.out.println(“Event postStart received”); } public void preStop(ApplicationLifecycleEvent evt) { System.out.println(“Event preStop received”); } public void

Continue reading »

Side by Side deployment/Versioning

Production redeployment of application/ versioning/ side by side deployment We need versioning for updating the application in production on runtime. The sessions which are already logged in will be using the previous version of the application and the new sessions created will use the new version of application. 1)In the

Continue reading »

Configuration: WLDF Mail Notification for Runtime Mbean

Weblogic Diagnostics Framework can be used to analyze, collect, archive and access diagnostic data generated by a running server and the applications deployed within its containers. Here I have provided configuration for sending mail notification on the harversted data for the runtime Mbean which you want to monitor. 1. From

Continue reading »

Registering Custom MBeans with Weblogic Server

Registering Custom Mbeans with Weblogic Server. Example.java package jmxMbeans; public class Example implements ExampleMBean { public void sayHello(String str) { System.out.println(“Hello ” + str + “‘!”); } } ExampleMbean.java package jmxMbeans; public interface ExampleMBean { void sayHello(String name); } Index.jsp <%@ page import=”javax.management.MBeanServer”%> <%@ page import=”javax.management.ObjectName”%> <%@ page import=”javax.naming.Context”%> <%@

Continue reading »

Plan.xml usage for Message Driven Bean

This post is an illustration of usage of plan.xml for overriding features of Message Driven Bean application dynamically. Administrators use deployment plans to easily change an application’s WebLogic Server configuration for a specific environment without modifying existing Java EE or WebLogic-specific deployment descriptors. Multiple deployment plans can be used to

Continue reading »

Configuring Dynamic LDAP Groups with IPlanetAuthenticator on Weblogic Server

IPlanet LDAP Server implements dynamic ldap groups by having schema as objectclass = groupOfURLs. A groupOfURLS class can have multiple memberURL attributes, each one consisting of an LDAP URL that enumerates a set of objects in the directory. The members of the group would be the union of these sets.

Continue reading »

Configuring two way SSL between Client and Weblogic server with Apache proxying the request.

Configure Apache for SSL Create the certificates using openssl (present in apache_home\bin) using the below steps: openssl genrsa -des3 -out server.key 1024 openssl req -config ..\conf\openssl.cnf -new -key server.key -out localhost openssl x509 -req -days 730 -in localhost -signkey server.key -out server.crt Add the following in the httpd.conf file <IfModule

Continue reading »

Force Shutingdown WLS Using JMX

import java.io.IOException; import java.net.MalformedURLException; import java.util.Hashtable; 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 weblogic.management.runtime.*; import javax.naming.Context; import java.lang.*; public class ShutdownServerUsingJMX { private static MBeanServerConnection connection; private static JMXConnector connector; private static final ObjectName service; static { try { service=new ObjectName(“com.bea:Name=DomainRuntimeService,Type=weblogic.management.mbeanservers.domainruntime.DomainRuntimeServiceMBean”); } catch (MalformedObjectNameException

Continue reading »