Sunday, January 19, 2014
Integrate Apache Web Server and Oracle Weblogic Application Server
What is the main use of Oracle WebLogic Web Server Plugins?
1. Oracle WebLogic Web Server Plug-Ins are plugins for popular Web Servers like Apache HTTP Server, iPlanet Web Server, Microsoft Internet Information Server (IIS).
2. This plugin diverts the incoming HTTP(s) requests within the Web Server and reverse proxies the incoming requests across WebLogic Server Clusters.
Prerequisites:
1] Download and Install Apache Web Server (2.2)
2] Download and Install Oracle Weblogic Server 12c
3] Download Oracle Weblogic Web Server Plugins
4] Deploy some sample Web Applications to the application server cluster environments
Steps Involved:
1] Download the Oracle Weblogic Web Server plugin from Oracle website.
http://www.oracle.com/technetwork/middleware/ias/downloads/wls-plugins-096117.html
2] Unzip the plugin downloaded.
3] This archived file have plugins for the all the platforms (Linux, Solaris, AIX, HP-UX, Windows). Select the desired platform based on your need. I’m using Apache Web server which is running in Linux machine, so following is the desired plugin I’m looking for.
à WLSPlugin12c-64bit-Apache2.2-Linux64-x86_64.zip
4] Now unarchive the WLSPlugin12c-64bit-Apache2.2-Linux64-x86_64.zip file like below.
5] Copy the mod_wl.so to modules folder of the apache web server.
6] Copy the libclntsh.so and libnnz11.so files to lib folder of the apache web server.
7] The plugin installation setup part is done, now we need to proceed with configuration part.
à Load the mod_wl.so module to the Apache Web Server
à Set all the required web server parameters
à Get the application servers IP Address and Port numbers
Applications are deployed to the 3 managed servers mentioned above.
So now specify that in the WebLogicCluster parameters list as 192.168.56.1:7001,192.168.56.1:4003 and 192.168.56.1:4005. Use the same Context root (/Monioring_Application) that we mentioned in application.xml deployment descriptors in <Location> tag.
8] Last step but not least step, include the mod_wl.conf in the main Apache httpd.conf file like below.
9] In order to the changes to reflect, restart the apache web server is required.
10] Access the web application deployed to Oracle Weblogic Application server using the Apache Web Server.
à Using Application Servers IP_Address:Port
--> Through Apache Web Server IP_Address:Port. Now the incoming HTTP(s) requests within the Apache Web Server and reverse proxies the incoming requests across WebLogic Server Clusters 192.168.56.1:7001, 192.168.56.1:4003 & 192.168.56.1:4005 automatically by web server.
Friday, December 20, 2013
Logtail – Weblogic Application Servers
Logtail is an AJAXified logfile download and tailing application. In some big development projects it helps Developers, Testers and Administrators to multiple log files on multiple machines through the use of browsers.
Step1: Download
Download the Logtail Web Application as WAR file from the sourceforge.net website.
http://sourceforge.net/projects/logtail/files/logtail/logtail-0.2/
Step 2: Installation(Deployment)
As this is the web application (WAR) project, we need to deploy this in some application servers like Apache Tomcat, Oracle Weblogic, Oracle Glassfish, Redhat JBoss or IBM Websphere.
Step 3: Configuration Steps
1] Deploy the logtail-0.2.war to application server; in my case I’m deploying it to the Oracle Weblogic Application Server.
2] Before starting the Managed Server (JVM) it’s very important to add the Logtail-configuration.xml file to the Java classpath. And finally export the JAVA_OPTIONS parameter.
JAVA_OPTIONS="-Dweblogic.security.SSL.trustedCAKeyStore="/optional/Oracle12c/Middleware/wlserver_12.1/server/lib/cacerts" -Dlogtail-config="/optional/installers/logtail-config.xml" ${JAVA_OPTIONS}"
export JAVA_OPTIONS
3] Now we need to create the Logtail-config.xml file and add the required logs to the xml file inside the <logs> <log-source> </log-source></logs> tag.
<?xml version="1.0" encoding="UTF-8"?>
<logtail>
<!--
logtail looks in all log-sources for files. You can either configure a direct file
or a directory. If you configure a directory ALL files in that directory are shown
by logtail.
-->
<logs>
<!-- Application Logs -->
<log-source>
<path>/optional/application-logs/</path>
<decorator-name>DefaultDecorator</decorator-name>
</log-source>
<!-- Weblogic Server Logs for Server server01 -->
<log-source>
<path>/optional/Oracle/Middleware/user_projects/domains/base-domain/servers/server01/logs/</path>
<decorator-name>DefaultDecorator</decorator-name>
</log-source>
</logs>
<decorators>
<decorator>
<name>DefaultDecorator</name>
<class-name>logtail.decorator.RegexDecorator</class-name>
<config>
<!--
You can highlight parts of the logfile by providing a regular expression
(see http://en.wikipedia.org/wiki/Regular_expression and
http://java.sun.com/j2se/1.4.2/docs/api/java/util/regex/Pattern.html
for details).
css-style must be valid CSS-styles. See http://en.selfhtml.org/ for details.
Highlighting patterns are applied from top to bottom of this list. So general
patterns should be placed at the top of this list.
-->
<!-- Highlight log4j stuff -->
<highlight>
<regexp>.*DEBUG.*</regexp>
<css-style>color: black; background-color: #EEEEEE;</css-style>
</highlight>
<highlight>
<regexp>.*INFO.*</regexp>
<css-style>color: black; background-color: #CCCCCC;</css-style>
</highlight>
<highlight>
<regexp>.*WARN.*</regexp>
<css-style>color: black; background-color: yellow;</css-style>
</highlight>
<highlight>
<regexp>.*ERROR.*</regexp>
<css-style>color: white; background-color: #DD0000;</css-style>
</highlight>
<highlight>
<regexp>.*FATAL.*</regexp>
<css-style>color: white; background-color: #FF0000;</css-style>
</highlight>
<!-- Highlight IP-addresses -->
<highlight>
<regexp>d{1,3}.d{1,3}.d{1,3}.d{1,3}</regexp>
<css-style>color: purple; background-color: #FFFFFF;</css-style>
</highlight>
<!-- Highlight everything in parentheses -->
<highlight>
<regexp>([^)]*)</regexp>
<css-style>color: green; background-color: #FFFFFF;</css-style>
</highlight>
<!-- Highlight everything in brackets -->
<highlight>
<regexp>[[^]]*]</regexp>
<css-style>color: blue; background-color: #FFFFFF;</css-style>
</highlight>
</config>
</decorator>
</decorators>
</logtail>
4] Once the Logtail-0.2.war is deployed and Logtail-config.xml added to the class path, we are good to start application server using the start-up script we customized
.
5] Now just open up the browser and enter the URL:
http://localhost:7005/logtail-0.2
That’s it!! Now all the Developers, Testers and Administrators can access the various logs using the browsers like Chrome, Firefox or IE.
Saturday, September 14, 2013
Test web services with weblogic
Console URL: http://localhost:7001/wls_utc/
1] Deploy your sample web services application to weblogic application server and expand it. There you can see the developed web services, in my case it's "ArithmeticService".
2] Click on that web services and goto the testing tab of the same. Two options will be available there,
--> WSDL
--> Test Client
3] Click on the Test client to access the test client console.
http://localhost:7001/wls_utc/
4] That's it, now you can test your web service from the weblogic test client like below.
Note: In weblogic server "Development mode" alone this test web service console will be exist. If you weblogic server is running in "Production mode" it will not exist. To enable to the test client console, we need to deploy the wlstestclient.ear that bundled along with weblogic server.
I hope that this help someone !!
Deploy and Run Web Applications on Oracle Cloud Environment
With the new Oracle Cloud environment you no longer have to install a WebLogic Application server or a Oracle Database server in your local machine, you can instead use instances hosted in the Oracle Cloud.
The first step is get the trial version of oracle cloud instance from the following link. This trial account includes an Oracle Weblogic Application server and Database Server.
https://cloud.oracle.com/mycloud/f?p=service:java:0
Once your request gets approved you'll get an email with the cloud connection information for your instance. Save that mail - it has all the basic connection information and you'll be referring to it on a frequent basis. Now you can deploy your web application, please follow the steps below to get it done.
1] Open Server window --> Oracle --> Oracle Cloud --> New
2] Give your Identity domain, Java service name, Administator and Password. Don't forgot to download the "Oracle Cloud SDK" from following link http://www.oracle.com/technetwork/middleware/weblogic/downloads/java-cloud-sdk-1848874.html
3] That's it !! Now just right click your application and deploy it in the cloud weblogic application server.
4] It will request you for the Username,password and Idenity domain name.
5] Now your web appication is running in cloud with no hurdles. Actually this is the first look of my website www.industryvertical.co.in !!
6] Now it's very easy to monitor the deployed applications using Oracle Enterprise Cloud Manager(OEM).
Saturday, August 24, 2013
Oracle Weblogic Server 12.1.2.0.0 Series : Feature 2 – Node manager Configuration
What is Nodemanager ?
Node Manager process to control server instances in any WebLogic Server domain until the server instances reside on the same machine as the Node Manager process.Node Manager is a WebLogic Server utility that enables you to start, shut down, and restart Administration Server and Managed Server instances from a remote location. Although Node Manager is optional, it is recommended if your WebLogic Server environment hosts applications with high availability requirements.
What is the new about nodemanger in weblogic 12.1.2.0.0 version ?
Weblogic 12.1.2.0.0 version introduces simplified Java version of Node Manager.
1] For each WebLogic domain you create, a domain-specific Node Manager configuration is created by default.
2] Including pre-configured scripts to install and uninstall Node Manager as a Windows service.
3] Complete with security credentials, properties file, domain registration, and start scripts available under the binary folder of the domain.
4] Start the Node manger (StartNodeManager.sh) as simple like Administartion Server (StartWeblogic.cmd).
5] Once the node manager is started verify the status of the nodemanger under Machines Tab, it’s should be “Reachable”.
6] Now it’s easy to start, stop managed servers from weblogic admin console with the use of nodemanager.
Thanks to oracle for the simplification introduced in nodemanager setup.
Thursday, August 22, 2013
Oracle Weblogic Server 12.1.2.0.0 Series : Feature 1 – Dynamic Clusters
What Are Dynamic Clusters ?
A dynamic cluster is any cluster that contains one or more dynamic servers. Dynamic clusters are started by using the single shared server template. We can use the server template to specify the heap configuration (xms, xmx, permsize), Classpath and Server startup arguments.
With Dynamic clusters it is now very easy to scale up the number of server instances in a domain. When configuring the dynamic cluster, you can specify the number of server instances. When you need additional server capacity, you can then start a server instance without having to first manually configure it and add it to the cluster.
1] Create a Dynamic Cluster
2] Specify the number of Dynamic servers, Server name prefix and Server Template for all the dynamic servers.
3] Specify the starting Listening and SSL Listening port of the managed servers, it will increment the ports automatically.
4] Notice the servers tab, there we can see the number of dynamic servers specified with mentioned server name prefix and port numbers.
5] All the servers are assigned to a single machine, so that we can start the managed servers from weblogic admin console itself using “Node Manager”.
à Start the Node Manager using the startNodeManager.sh script available in {DOMAIN_HOME}/bin directory.
Note: Configuration and starting up of the Node Manager is simplified in weblogic 12.1.2.0.0 version. Hello Oracle, really thanks for that!!
6] All the servers are started successfully, without any issues using the “Node Manager”.
7] Alas!! You have started around 7 managed servers with minimum Heap Size (-Xms) of 256MB. Please shutdown some of them using the nodemanger from admin console, otherwise you might face heavy slowness in couple of minutes.
That’s it !! You have set up a dynamic clusters setup in your environment which introduced in Webogic 12.1.2.0.0 version. In the forthcoming post we will discuss about “Elastic JMS servers” .
Saturday, June 29, 2013
Weblogic Exploded war,ear Deployment
In this post, we will see how to deploy the web applications in exploded form and we will also discuss the advantages of it compared with archived form deployment. To know how to do exploded directory deployment just keep on reading !!
Steps Involved:
1] Locate the Archived war,ear file of the application.
2]Directory structure:
--> create a two sub folders(META-INF,Monitor) under exploded_dep directory
3] Create a subfolder(Monitor) and Unzip the archived war,ear file inside that subfolder.
4] Content of application.xml
5] That’s it !! Now the exploded form web application is ready for the deployment , just do the deployment in application server!!
6] Application deployed successfully, and it’s in active state.Now access the application using the context root /Monitoring_Application.
http://localhost:7001/Monitoring_Application
I hope everything is clear, let us know if you have any queries !!